aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-04-08 16:17:37 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-26 10:47:52 -0400
commitcc0ffdadee6e17cabcb9ce2081b5a637c87113ea (patch)
tree4f7ba6de024bafc5da6928839fc2e5145926f53e /drivers/net/wireless
parent0d54cd89c5cb669505946ab6789ef68b3a7d7f75 (diff)
iwlwifi: need check for valid qos packet before free
commit ece6444c2fe80dab679beb5f0d58b091f1933b00 upstream. For 4965, need to check it is valid qos frame before free, only valid QoS frame has the tid used to free the packets. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 11fc639903fe..3f0a234b5966 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2008,7 +2008,9 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2008 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " 2008 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
2009 "%d index %d\n", scd_ssn , index); 2009 "%d index %d\n", scd_ssn , index);
2010 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2010 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
2011 iwl_free_tfds_in_queue(priv, sta_id, tid, freed); 2011 if (qc)
2012 iwl_free_tfds_in_queue(priv, sta_id,
2013 tid, freed);
2012 2014
2013 if (priv->mac80211_registered && 2015 if (priv->mac80211_registered &&
2014 (iwl_queue_space(&txq->q) > txq->q.low_mark) && 2016 (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
@@ -2034,14 +2036,17 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2034 tx_resp->failure_frame); 2036 tx_resp->failure_frame);
2035 2037
2036 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2038 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
2037 iwl_free_tfds_in_queue(priv, sta_id, tid, freed); 2039 if (qc && likely(sta_id != IWL_INVALID_STATION))
2040 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
2041 else if (sta_id == IWL_INVALID_STATION)
2042 IWL_DEBUG_TX_REPLY(priv, "Station not known\n");
2038 2043
2039 if (priv->mac80211_registered && 2044 if (priv->mac80211_registered &&
2040 (iwl_queue_space(&txq->q) > txq->q.low_mark)) 2045 (iwl_queue_space(&txq->q) > txq->q.low_mark))
2041 iwl_wake_queue(priv, txq_id); 2046 iwl_wake_queue(priv, txq_id);
2042 } 2047 }
2043 2048 if (qc && likely(sta_id != IWL_INVALID_STATION))
2044 iwl_txq_check_empty(priv, sta_id, tid, txq_id); 2049 iwl_txq_check_empty(priv, sta_id, tid, txq_id);
2045 2050
2046 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) 2051 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
2047 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); 2052 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");