diff options
author | Shanyu Zhao <shanyu.zhao@intel.com> | 2010-06-01 20:13:58 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-14 13:51:37 -0400 |
commit | b561e8274f75831ee87e4ea378cbb1f9f050a51a (patch) | |
tree | edccfc3caea047e36b94e04ea6cf29a19dd416ba /drivers | |
parent | da5ae1cfff4cc5b9392eab59b227ad907626d7aa (diff) |
iwlagn: verify flow id in compressed BA packet
The flow id (scd_flow) in a compressed BA packet should match the txq_id
of the queue from which the aggregated packets were sent. However, in
some hardware like the 1000 series, sometimes the flow id is 0 for the
txq_id (10 to 19). This can cause the annoying message:
[ 2213.306191] iwlagn 0000:01:00.0: Received BA when not expected
[ 2213.310178] iwlagn 0000:01:00.0: Read index for DMA queue txq id (0),
index 5, is out of range [0-256] 7 7.
And even worse, if agg->wait_for_ba is true when the bad BA is arriving,
this can cause system hang due to NULL pointer dereference because the
code is operating in a wrong tx queue!
Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Pradeep Kulkarni <pradeepx.kulkarni@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index a732f1094e5d..7d614c4d3c62 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -1299,6 +1299,11 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
1299 | sta_id = ba_resp->sta_id; | 1299 | sta_id = ba_resp->sta_id; |
1300 | tid = ba_resp->tid; | 1300 | tid = ba_resp->tid; |
1301 | agg = &priv->stations[sta_id].tid[tid].agg; | 1301 | agg = &priv->stations[sta_id].tid[tid].agg; |
1302 | if (unlikely(agg->txq_id != scd_flow)) { | ||
1303 | IWL_ERR(priv, "BA scd_flow %d does not match txq_id %d\n", | ||
1304 | scd_flow, agg->txq_id); | ||
1305 | return; | ||
1306 | } | ||
1302 | 1307 | ||
1303 | /* Find index just before block-ack window */ | 1308 | /* Find index just before block-ack window */ |
1304 | index = iwl_queue_dec_wrap(ba_resp_scd_ssn & 0xff, txq->q.n_bd); | 1309 | index = iwl_queue_dec_wrap(ba_resp_scd_ssn & 0xff, txq->q.n_bd); |