aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-01-28 07:07:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:19:17 -0500
commitfe3bf0f59e97193f8619707f5d9458ce71a4f8d8 (patch)
treeee7377bafb7854dde44b07961c74f4ccc851dd1a /net
parent9e7234923789897858e1a475c579b5e2e6ad5b74 (diff)
mac80211: A-MPDU Tx MLME data initialization
This patch initialize A-MPDU MLME data for Tx sessions. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/sta_info.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 1f74bd296357..ddc1f47194dd 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -117,8 +117,10 @@ static void sta_info_release(struct kref *kref)
117 while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) { 117 while ((skb = skb_dequeue(&sta->tx_filtered)) != NULL) {
118 dev_kfree_skb_any(skb); 118 dev_kfree_skb_any(skb);
119 } 119 }
120 for (i = 0; i < STA_TID_NUM; i++) 120 for (i = 0; i < STA_TID_NUM; i++) {
121 del_timer_sync(&sta->ampdu_mlme.tid_rx[i].session_timer); 121 del_timer_sync(&sta->ampdu_mlme.tid_rx[i].session_timer);
122 del_timer_sync(&sta->ampdu_mlme.tid_tx[i].addba_resp_timer);
123 }
122 rate_control_free_sta(sta->rate_ctrl, sta->rate_ctrl_priv); 124 rate_control_free_sta(sta->rate_ctrl, sta->rate_ctrl_priv);
123 rate_control_put(sta->rate_ctrl); 125 rate_control_put(sta->rate_ctrl);
124 kfree(sta); 126 kfree(sta);
@@ -157,17 +159,26 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
157 sta->local = local; 159 sta->local = local;
158 sta->dev = dev; 160 sta->dev = dev;
159 spin_lock_init(&sta->ampdu_mlme.ampdu_rx); 161 spin_lock_init(&sta->ampdu_mlme.ampdu_rx);
162 spin_lock_init(&sta->ampdu_mlme.ampdu_tx);
160 for (i = 0; i < STA_TID_NUM; i++) { 163 for (i = 0; i < STA_TID_NUM; i++) {
161 /* timer_to_tid must be initialized with identity mapping to 164 /* timer_to_tid must be initialized with identity mapping to
162 * enable session_timer's data differentiation. refer to 165 * enable session_timer's data differentiation. refer to
163 * sta_rx_agg_session_timer_expired for useage */ 166 * sta_rx_agg_session_timer_expired for useage */
164 sta->timer_to_tid[i] = i; 167 sta->timer_to_tid[i] = i;
168 /* tid to tx queue: initialize according to HW (0 is valid) */
169 sta->tid_to_tx_q[i] = local->hw.queues;
165 /* rx timers */ 170 /* rx timers */
166 sta->ampdu_mlme.tid_rx[i].session_timer.function = 171 sta->ampdu_mlme.tid_rx[i].session_timer.function =
167 sta_rx_agg_session_timer_expired; 172 sta_rx_agg_session_timer_expired;
168 sta->ampdu_mlme.tid_rx[i].session_timer.data = 173 sta->ampdu_mlme.tid_rx[i].session_timer.data =
169 (unsigned long)&sta->timer_to_tid[i]; 174 (unsigned long)&sta->timer_to_tid[i];
170 init_timer(&sta->ampdu_mlme.tid_rx[i].session_timer); 175 init_timer(&sta->ampdu_mlme.tid_rx[i].session_timer);
176 /* tx timers */
177 sta->ampdu_mlme.tid_tx[i].addba_resp_timer.function =
178 sta_addba_resp_timer_expired;
179 sta->ampdu_mlme.tid_tx[i].addba_resp_timer.data =
180 (unsigned long)&sta->timer_to_tid[i];
181 init_timer(&sta->ampdu_mlme.tid_tx[i].addba_resp_timer);
171 } 182 }
172 skb_queue_head_init(&sta->ps_tx_buf); 183 skb_queue_head_init(&sta->ps_tx_buf);
173 skb_queue_head_init(&sta->tx_filtered); 184 skb_queue_head_init(&sta->tx_filtered);