Staging: sxg: convert to netdev_ops
[safe/jmp/linux-2.6] / net / mac80211 / sta_info.c
index 634f65c..c5f14e6 100644 (file)
@@ -202,6 +202,7 @@ void sta_info_destroy(struct sta_info *sta)
                /* Make sure timer won't free the tid_rx struct, see below */
                if (tid_rx)
                        tid_rx->shutdown = true;
+
                spin_unlock_bh(&sta->lock);
 
                /*
@@ -227,6 +228,11 @@ void sta_info_destroy(struct sta_info *sta)
                tid_tx = sta->ampdu_mlme.tid_tx[i];
                if (tid_tx) {
                        del_timer_sync(&tid_tx->addba_resp_timer);
+                       /*
+                        * STA removed while aggregation session being
+                        * started? Bit odd, but purge frames anyway.
+                        */
+                       skb_queue_purge(&tid_tx->pending);
                        kfree(tid_tx);
                }
        }
@@ -275,8 +281,6 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
                 * enable session_timer's data differentiation. refer to
                 * sta_rx_agg_session_timer_expired for useage */
                sta->timer_to_tid[i] = i;
-               /* tid to tx queue: initialize according to HW (0 is valid) */
-               sta->tid_to_tx_q[i] = ieee80211_num_queues(&local->hw);
                /* rx */
                sta->ampdu_mlme.tid_state_rx[i] = HT_AGG_STATE_IDLE;
                sta->ampdu_mlme.tid_rx[i] = NULL;