diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 4fcbf634b548..acd9b61fbc07 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1366,6 +1366,35 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx) | |||
1366 | return 0; | 1366 | return 0; |
1367 | } | 1367 | } |
1368 | 1368 | ||
1369 | bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw, | ||
1370 | struct ieee80211_vif *vif, struct sk_buff *skb, | ||
1371 | int band, struct ieee80211_sta **sta) | ||
1372 | { | ||
1373 | struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); | ||
1374 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
1375 | struct ieee80211_tx_data tx; | ||
1376 | |||
1377 | if (ieee80211_tx_prepare(sdata, &tx, skb) == TX_DROP) | ||
1378 | return false; | ||
1379 | |||
1380 | info->band = band; | ||
1381 | info->control.vif = vif; | ||
1382 | info->hw_queue = vif->hw_queue[skb_get_queue_mapping(skb)]; | ||
1383 | |||
1384 | if (invoke_tx_handlers(&tx)) | ||
1385 | return false; | ||
1386 | |||
1387 | if (sta) { | ||
1388 | if (tx.sta) | ||
1389 | *sta = &tx.sta->sta; | ||
1390 | else | ||
1391 | *sta = NULL; | ||
1392 | } | ||
1393 | |||
1394 | return true; | ||
1395 | } | ||
1396 | EXPORT_SYMBOL(ieee80211_tx_prepare_skb); | ||
1397 | |||
1369 | /* | 1398 | /* |
1370 | * Returns false if the frame couldn't be transmitted but was queued instead. | 1399 | * Returns false if the frame couldn't be transmitted but was queued instead. |
1371 | */ | 1400 | */ |