diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index cfc473e1b05..680bcb7093d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -429,6 +429,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
429 | struct sta_info *sta = tx->sta; | 429 | struct sta_info *sta = tx->sta; |
430 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); | 430 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); |
431 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; | 431 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; |
432 | struct ieee80211_local *local = tx->local; | ||
432 | u32 staflags; | 433 | u32 staflags; |
433 | 434 | ||
434 | if (unlikely(!sta || | 435 | if (unlikely(!sta || |
@@ -476,6 +477,12 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
476 | info->control.vif = &tx->sdata->vif; | 477 | info->control.vif = &tx->sdata->vif; |
477 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 478 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
478 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); | 479 | skb_queue_tail(&sta->ps_tx_buf, tx->skb); |
480 | |||
481 | if (!timer_pending(&local->sta_cleanup)) | ||
482 | mod_timer(&local->sta_cleanup, | ||
483 | round_jiffies(jiffies + | ||
484 | STA_INFO_CLEANUP_INTERVAL)); | ||
485 | |||
479 | return TX_QUEUED; | 486 | return TX_QUEUED; |
480 | } | 487 | } |
481 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 488 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
@@ -513,6 +520,8 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) | |||
513 | else if (tx->sta && (key = rcu_dereference(tx->sta->key))) | 520 | else if (tx->sta && (key = rcu_dereference(tx->sta->key))) |
514 | tx->key = key; | 521 | tx->key = key; |
515 | else if (ieee80211_is_mgmt(hdr->frame_control) && | 522 | else if (ieee80211_is_mgmt(hdr->frame_control) && |
523 | is_multicast_ether_addr(hdr->addr1) && | ||
524 | ieee80211_is_robust_mgmt_frame(hdr) && | ||
516 | (key = rcu_dereference(tx->sdata->default_mgmt_key))) | 525 | (key = rcu_dereference(tx->sdata->default_mgmt_key))) |
517 | tx->key = key; | 526 | tx->key = key; |
518 | else if ((key = rcu_dereference(tx->sdata->default_key))) | 527 | else if ((key = rcu_dereference(tx->sdata->default_key))) |
@@ -584,7 +593,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
584 | struct ieee80211_hdr *hdr = (void *)tx->skb->data; | 593 | struct ieee80211_hdr *hdr = (void *)tx->skb->data; |
585 | struct ieee80211_supported_band *sband; | 594 | struct ieee80211_supported_band *sband; |
586 | struct ieee80211_rate *rate; | 595 | struct ieee80211_rate *rate; |
587 | int i, len; | 596 | int i; |
597 | u32 len; | ||
588 | bool inval = false, rts = false, short_preamble = false; | 598 | bool inval = false, rts = false, short_preamble = false; |
589 | struct ieee80211_tx_rate_control txrc; | 599 | struct ieee80211_tx_rate_control txrc; |
590 | u32 sta_flags; | 600 | u32 sta_flags; |
@@ -593,7 +603,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) | |||
593 | 603 | ||
594 | sband = tx->local->hw.wiphy->bands[tx->channel->band]; | 604 | sband = tx->local->hw.wiphy->bands[tx->channel->band]; |
595 | 605 | ||
596 | len = min_t(int, tx->skb->len + FCS_LEN, | 606 | len = min_t(u32, tx->skb->len + FCS_LEN, |
597 | tx->local->hw.wiphy->frag_threshold); | 607 | tx->local->hw.wiphy->frag_threshold); |
598 | 608 | ||
599 | /* set up the tx rate control struct we give the RC algo */ | 609 | /* set up the tx rate control struct we give the RC algo */ |
@@ -1142,13 +1152,12 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, | |||
1142 | 1152 | ||
1143 | if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && | 1153 | if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && |
1144 | (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION)) { | 1154 | (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION)) { |
1145 | unsigned long flags; | ||
1146 | struct tid_ampdu_tx *tid_tx; | 1155 | struct tid_ampdu_tx *tid_tx; |
1147 | 1156 | ||
1148 | qc = ieee80211_get_qos_ctl(hdr); | 1157 | qc = ieee80211_get_qos_ctl(hdr); |
1149 | tid = *qc & IEEE80211_QOS_CTL_TID_MASK; | 1158 | tid = *qc & IEEE80211_QOS_CTL_TID_MASK; |
1150 | 1159 | ||
1151 | spin_lock_irqsave(&tx->sta->lock, flags); | 1160 | spin_lock(&tx->sta->lock); |
1152 | /* | 1161 | /* |
1153 | * XXX: This spinlock could be fairly expensive, but see the | 1162 | * XXX: This spinlock could be fairly expensive, but see the |
1154 | * comment in agg-tx.c:ieee80211_agg_tx_operational(). | 1163 | * comment in agg-tx.c:ieee80211_agg_tx_operational(). |
@@ -1173,7 +1182,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, | |||
1173 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 1182 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
1174 | __skb_queue_tail(&tid_tx->pending, skb); | 1183 | __skb_queue_tail(&tid_tx->pending, skb); |
1175 | } | 1184 | } |
1176 | spin_unlock_irqrestore(&tx->sta->lock, flags); | 1185 | spin_unlock(&tx->sta->lock); |
1177 | 1186 | ||
1178 | if (unlikely(queued)) | 1187 | if (unlikely(queued)) |
1179 | return TX_QUEUED; | 1188 | return TX_QUEUED; |
@@ -2011,14 +2020,12 @@ void ieee80211_tx_pending(unsigned long data) | |||
2011 | while (!skb_queue_empty(&local->pending[i])) { | 2020 | while (!skb_queue_empty(&local->pending[i])) { |
2012 | struct sk_buff *skb = __skb_dequeue(&local->pending[i]); | 2021 | struct sk_buff *skb = __skb_dequeue(&local->pending[i]); |
2013 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 2022 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
2014 | struct ieee80211_sub_if_data *sdata; | ||
2015 | 2023 | ||
2016 | if (WARN_ON(!info->control.vif)) { | 2024 | if (WARN_ON(!info->control.vif)) { |
2017 | kfree_skb(skb); | 2025 | kfree_skb(skb); |
2018 | continue; | 2026 | continue; |
2019 | } | 2027 | } |
2020 | 2028 | ||
2021 | sdata = vif_to_sdata(info->control.vif); | ||
2022 | spin_unlock_irqrestore(&local->queue_stop_reason_lock, | 2029 | spin_unlock_irqrestore(&local->queue_stop_reason_lock, |
2023 | flags); | 2030 | flags); |
2024 | 2031 | ||
@@ -2244,8 +2251,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, | |||
2244 | 2251 | ||
2245 | info->control.vif = vif; | 2252 | info->control.vif = vif; |
2246 | 2253 | ||
2247 | info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT; | 2254 | info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT | |
2248 | info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ; | 2255 | IEEE80211_TX_CTL_ASSIGN_SEQ | |
2256 | IEEE80211_TX_CTL_FIRST_FRAGMENT; | ||
2249 | out: | 2257 | out: |
2250 | rcu_read_unlock(); | 2258 | rcu_read_unlock(); |
2251 | return skb; | 2259 | return skb; |