aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index bd1224fd216a..64e0f7587e6d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1040,14 +1040,11 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
1040 struct ieee80211_radiotap_iterator iterator; 1040 struct ieee80211_radiotap_iterator iterator;
1041 struct ieee80211_radiotap_header *rthdr = 1041 struct ieee80211_radiotap_header *rthdr =
1042 (struct ieee80211_radiotap_header *) skb->data; 1042 (struct ieee80211_radiotap_header *) skb->data;
1043 struct ieee80211_supported_band *sband;
1044 bool hw_frag; 1043 bool hw_frag;
1045 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1044 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1046 int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len, 1045 int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr, skb->len,
1047 NULL); 1046 NULL);
1048 1047
1049 sband = tx->local->hw.wiphy->bands[tx->channel->band];
1050
1051 info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; 1048 info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
1052 tx->flags &= ~IEEE80211_TX_FRAGMENTED; 1049 tx->flags &= ~IEEE80211_TX_FRAGMENTED;
1053 1050
@@ -1154,7 +1151,7 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
1154 * packet pass through because splicing the frames 1151 * packet pass through because splicing the frames
1155 * back is already done. 1152 * back is already done.
1156 */ 1153 */
1157 tid_tx = tx->sta->ampdu_mlme.tid_tx[tid]; 1154 tid_tx = rcu_dereference_protected_tid_tx(tx->sta, tid);
1158 1155
1159 if (!tid_tx) { 1156 if (!tid_tx) {
1160 /* do nothing, let packet pass through */ 1157 /* do nothing, let packet pass through */
@@ -1446,11 +1443,8 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
1446 struct ieee80211_tx_data tx; 1443 struct ieee80211_tx_data tx;
1447 ieee80211_tx_result res_prepare; 1444 ieee80211_tx_result res_prepare;
1448 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1445 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1449 u16 queue;
1450 bool result = true; 1446 bool result = true;
1451 1447
1452 queue = skb_get_queue_mapping(skb);
1453
1454 if (unlikely(skb->len < 10)) { 1448 if (unlikely(skb->len < 10)) {
1455 dev_kfree_skb(skb); 1449 dev_kfree_skb(skb);
1456 return true; 1450 return true;
@@ -1486,12 +1480,7 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
1486{ 1480{
1487 int tail_need = 0; 1481 int tail_need = 0;
1488 1482
1489 /* 1483 if (may_encrypt && local->crypto_tx_tailroom_needed_cnt) {
1490 * This could be optimised, devices that do full hardware
1491 * crypto (including TKIP MMIC) need no tailroom... But we
1492 * have no drivers for such devices currently.
1493 */
1494 if (may_encrypt) {
1495 tail_need = IEEE80211_ENCRYPT_TAILROOM; 1484 tail_need = IEEE80211_ENCRYPT_TAILROOM;
1496 tail_need -= skb_tailroom(skb); 1485 tail_need -= skb_tailroom(skb);
1497 tail_need = max_t(int, tail_need, 0); 1486 tail_need = max_t(int, tail_need, 0);
@@ -1766,6 +1755,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1766 ret = NETDEV_TX_OK; 1755 ret = NETDEV_TX_OK;
1767 goto fail; 1756 goto fail;
1768 } 1757 }
1758 rcu_read_lock();
1769 if (!is_multicast_ether_addr(skb->data)) 1759 if (!is_multicast_ether_addr(skb->data))
1770 mppath = mpp_path_lookup(skb->data, sdata); 1760 mppath = mpp_path_lookup(skb->data, sdata);
1771 1761
@@ -1780,13 +1770,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1780 !(mppath && compare_ether_addr(mppath->mpp, skb->data))) { 1770 !(mppath && compare_ether_addr(mppath->mpp, skb->data))) {
1781 hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc, 1771 hdrlen = ieee80211_fill_mesh_addresses(&hdr, &fc,
1782 skb->data, skb->data + ETH_ALEN); 1772 skb->data, skb->data + ETH_ALEN);
1773 rcu_read_unlock();
1783 meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, 1774 meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr,
1784 sdata, NULL, NULL); 1775 sdata, NULL, NULL);
1785 } else { 1776 } else {
1786 int is_mesh_mcast = 1; 1777 int is_mesh_mcast = 1;
1787 const u8 *mesh_da; 1778 const u8 *mesh_da;
1788 1779
1789 rcu_read_lock();
1790 if (is_multicast_ether_addr(skb->data)) 1780 if (is_multicast_ether_addr(skb->data))
1791 /* DA TA mSA AE:SA */ 1781 /* DA TA mSA AE:SA */
1792 mesh_da = skb->data; 1782 mesh_da = skb->data;
@@ -2266,7 +2256,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2266 2256
2267 /* headroom, head length, tail length and maximum TIM length */ 2257 /* headroom, head length, tail length and maximum TIM length */
2268 skb = dev_alloc_skb(local->tx_headroom + 400 + 2258 skb = dev_alloc_skb(local->tx_headroom + 400 +
2269 sdata->u.mesh.vendor_ie_len); 2259 sdata->u.mesh.ie_len);
2270 if (!skb) 2260 if (!skb)
2271 goto out; 2261 goto out;
2272 2262
@@ -2489,7 +2479,6 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
2489{ 2479{
2490 struct ieee80211_local *local = hw_to_local(hw); 2480 struct ieee80211_local *local = hw_to_local(hw);
2491 struct sk_buff *skb = NULL; 2481 struct sk_buff *skb = NULL;
2492 struct sta_info *sta;
2493 struct ieee80211_tx_data tx; 2482 struct ieee80211_tx_data tx;
2494 struct ieee80211_sub_if_data *sdata; 2483 struct ieee80211_sub_if_data *sdata;
2495 struct ieee80211_if_ap *bss = NULL; 2484 struct ieee80211_if_ap *bss = NULL;
@@ -2531,7 +2520,6 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
2531 2520
2532 info = IEEE80211_SKB_CB(skb); 2521 info = IEEE80211_SKB_CB(skb);
2533 2522
2534 sta = tx.sta;
2535 tx.flags |= IEEE80211_TX_PS_BUFFERED; 2523 tx.flags |= IEEE80211_TX_PS_BUFFERED;
2536 tx.channel = local->hw.conf.channel; 2524 tx.channel = local->hw.conf.channel;
2537 info->band = tx.channel->band; 2525 info->band = tx.channel->band;
@@ -2551,8 +2539,9 @@ void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
2551 skb_set_network_header(skb, 0); 2539 skb_set_network_header(skb, 0);
2552 skb_set_transport_header(skb, 0); 2540 skb_set_transport_header(skb, 0);
2553 2541
2554 /* send all internal mgmt frames on VO */ 2542 /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */
2555 skb_set_queue_mapping(skb, 0); 2543 skb_set_queue_mapping(skb, IEEE80211_AC_VO);
2544 skb->priority = 7;
2556 2545
2557 /* 2546 /*
2558 * The other path calling ieee80211_xmit is from the tasklet, 2547 * The other path calling ieee80211_xmit is from the tasklet,