iwlwifi: need check for valid qos packet before free

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>

authored by Wey-Yi Guy and committed by John W. Linville ece6444c 11446011

+9 -4
+9 -4
drivers/net/wireless/iwlwifi/iwl-4965.c
··· 2015 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " 2016 "%d index %d\n", scd_ssn , index); 2017 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2018 - iwl_free_tfds_in_queue(priv, sta_id, tid, freed); 2019 2020 if (priv->mac80211_registered && 2021 (iwl_queue_space(&txq->q) > txq->q.low_mark) && ··· 2043 tx_resp->failure_frame); 2044 2045 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2046 - iwl_free_tfds_in_queue(priv, sta_id, tid, freed); 2047 2048 if (priv->mac80211_registered && 2049 (iwl_queue_space(&txq->q) > txq->q.low_mark)) 2050 iwl_wake_queue(priv, txq_id); 2051 } 2052 - 2053 - iwl_txq_check_empty(priv, sta_id, tid, txq_id); 2054 2055 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) 2056 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
··· 2015 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " 2016 "%d index %d\n", scd_ssn , index); 2017 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2018 + if (qc) 2019 + iwl_free_tfds_in_queue(priv, sta_id, 2020 + tid, freed); 2021 2022 if (priv->mac80211_registered && 2023 (iwl_queue_space(&txq->q) > txq->q.low_mark) && ··· 2041 tx_resp->failure_frame); 2042 2043 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2044 + if (qc && likely(sta_id != IWL_INVALID_STATION)) 2045 + iwl_free_tfds_in_queue(priv, sta_id, tid, freed); 2046 + else if (sta_id == IWL_INVALID_STATION) 2047 + IWL_DEBUG_TX_REPLY(priv, "Station not known\n"); 2048 2049 if (priv->mac80211_registered && 2050 (iwl_queue_space(&txq->q) > txq->q.low_mark)) 2051 iwl_wake_queue(priv, txq_id); 2052 } 2053 + if (qc && likely(sta_id != IWL_INVALID_STATION)) 2054 + iwl_txq_check_empty(priv, sta_id, tid, txq_id); 2055 2056 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) 2057 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");