aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/main.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-11-23 22:33:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-28 15:04:44 -0500
commita7af530d45969a63e20708417b70c547596ce3a9 (patch)
treec643269ad98d2689e1a011e13e2568615f01b0df /drivers/net/wireless/iwmc3200wifi/main.c
parent2351178c52fedf1846c84b35418f4102487ec00e (diff)
iwmc3200wifi: 802.11n Tx aggregation support
To support 802.11n Tx aggregation support with iwmc3200 wifi, we have to handle the UMAC_CMD_OPCODE_STOP_RESUME_STA_TX notification from the UMAC. Before sending an AddBA, the UMAC synchronizes with the host in order to know what is the last Tx frame it's supposed to receive before it will be able to start the actual aggregation session. We thus have to keep track of the last sequence number that is scheduled for transmission on a particular RAxTID, send an answer to the UMAC with this sequence number. The UMAC then does the BA negociation and once it's done with it sends a new UMAC_CMD_OPCODE_STOP_RESUME_STA_TX notification to let us know that we can resume the Tx flow on the specified RAxTID. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Reviewed-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/main.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c
index 92e4eaf32ff2..087f04355c1b 100644
--- a/drivers/net/wireless/iwmc3200wifi/main.c
+++ b/drivers/net/wireless/iwmc3200wifi/main.c
@@ -248,7 +248,7 @@ static void iwm_watchdog(unsigned long data)
248 248
249int iwm_priv_init(struct iwm_priv *iwm) 249int iwm_priv_init(struct iwm_priv *iwm)
250{ 250{
251 int i; 251 int i, j;
252 char name[32]; 252 char name[32];
253 253
254 iwm->status = 0; 254 iwm->status = 0;
@@ -292,6 +292,8 @@ int iwm_priv_init(struct iwm_priv *iwm)
292 return -EAGAIN; 292 return -EAGAIN;
293 293
294 skb_queue_head_init(&iwm->txq[i].queue); 294 skb_queue_head_init(&iwm->txq[i].queue);
295 skb_queue_head_init(&iwm->txq[i].stopped_queue);
296 spin_lock_init(&iwm->txq[i].lock);
295 } 297 }
296 298
297 for (i = 0; i < IWM_NUM_KEYS; i++) 299 for (i = 0; i < IWM_NUM_KEYS; i++)
@@ -299,6 +301,12 @@ int iwm_priv_init(struct iwm_priv *iwm)
299 301
300 iwm->default_key = -1; 302 iwm->default_key = -1;
301 303
304 for (i = 0; i < IWM_STA_TABLE_NUM; i++)
305 for (j = 0; j < IWM_UMAC_TID_NR; j++) {
306 mutex_init(&iwm->sta_table[i].tid_info[j].mutex);
307 iwm->sta_table[i].tid_info[j].stopped = false;
308 }
309
302 init_timer(&iwm->watchdog); 310 init_timer(&iwm->watchdog);
303 iwm->watchdog.function = iwm_watchdog; 311 iwm->watchdog.function = iwm_watchdog;
304 iwm->watchdog.data = (unsigned long)iwm; 312 iwm->watchdog.data = (unsigned long)iwm;
@@ -572,6 +580,7 @@ void iwm_link_off(struct iwm_priv *iwm)
572 580
573 for (i = 0; i < IWM_TX_QUEUES; i++) { 581 for (i = 0; i < IWM_TX_QUEUES; i++) {
574 skb_queue_purge(&iwm->txq[i].queue); 582 skb_queue_purge(&iwm->txq[i].queue);
583 skb_queue_purge(&iwm->txq[i].stopped_queue);
575 584
576 iwm->txq[i].concat_count = 0; 585 iwm->txq[i].concat_count = 0;
577 iwm->txq[i].concat_ptr = iwm->txq[i].concat_buf; 586 iwm->txq[i].concat_ptr = iwm->txq[i].concat_buf;