diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 3b84c16cf054..f708367092d1 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -170,9 +170,16 @@ void sta_info_destroy(struct sta_info *sta) | |||
170 | dev_kfree_skb_any(skb); | 170 | dev_kfree_skb_any(skb); |
171 | 171 | ||
172 | for (i = 0; i < STA_TID_NUM; i++) { | 172 | for (i = 0; i < STA_TID_NUM; i++) { |
173 | del_timer_sync(&sta->ampdu_mlme.tid_rx[i].session_timer); | 173 | spin_lock_bh(&sta->ampdu_mlme.ampdu_rx); |
174 | del_timer_sync(&sta->ampdu_mlme.tid_tx[i].addba_resp_timer); | 174 | if (sta->ampdu_mlme.tid_rx[i]) |
175 | del_timer_sync(&sta->ampdu_mlme.tid_rx[i]->session_timer); | ||
176 | spin_unlock_bh(&sta->ampdu_mlme.ampdu_rx); | ||
177 | spin_lock_bh(&sta->ampdu_mlme.ampdu_tx); | ||
178 | if (sta->ampdu_mlme.tid_tx[i]) | ||
179 | del_timer_sync(&sta->ampdu_mlme.tid_tx[i]->addba_resp_timer); | ||
180 | spin_unlock_bh(&sta->ampdu_mlme.ampdu_tx); | ||
175 | } | 181 | } |
182 | |||
176 | rate_control_free_sta(sta->rate_ctrl, sta->rate_ctrl_priv); | 183 | rate_control_free_sta(sta->rate_ctrl, sta->rate_ctrl_priv); |
177 | rate_control_put(sta->rate_ctrl); | 184 | rate_control_put(sta->rate_ctrl); |
178 | 185 | ||
@@ -227,18 +234,13 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, | |||
227 | sta->timer_to_tid[i] = i; | 234 | sta->timer_to_tid[i] = i; |
228 | /* tid to tx queue: initialize according to HW (0 is valid) */ | 235 | /* tid to tx queue: initialize according to HW (0 is valid) */ |
229 | sta->tid_to_tx_q[i] = local->hw.queues; | 236 | sta->tid_to_tx_q[i] = local->hw.queues; |
230 | /* rx timers */ | 237 | /* rx */ |
231 | sta->ampdu_mlme.tid_rx[i].session_timer.function = | 238 | sta->ampdu_mlme.tid_state_rx[i] = HT_AGG_STATE_IDLE; |
232 | sta_rx_agg_session_timer_expired; | 239 | sta->ampdu_mlme.tid_rx[i] = NULL; |
233 | sta->ampdu_mlme.tid_rx[i].session_timer.data = | 240 | /* tx */ |
234 | (unsigned long)&sta->timer_to_tid[i]; | 241 | sta->ampdu_mlme.tid_state_tx[i] = HT_AGG_STATE_IDLE; |
235 | init_timer(&sta->ampdu_mlme.tid_rx[i].session_timer); | 242 | sta->ampdu_mlme.tid_tx[i] = NULL; |
236 | /* tx timers */ | 243 | sta->ampdu_mlme.addba_req_num[i] = 0; |
237 | sta->ampdu_mlme.tid_tx[i].addba_resp_timer.function = | ||
238 | sta_addba_resp_timer_expired; | ||
239 | sta->ampdu_mlme.tid_tx[i].addba_resp_timer.data = | ||
240 | (unsigned long)&sta->timer_to_tid[i]; | ||
241 | init_timer(&sta->ampdu_mlme.tid_tx[i].addba_resp_timer); | ||
242 | } | 244 | } |
243 | skb_queue_head_init(&sta->ps_tx_buf); | 245 | skb_queue_head_init(&sta->ps_tx_buf); |
244 | skb_queue_head_init(&sta->tx_filtered); | 246 | skb_queue_head_init(&sta->tx_filtered); |