Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
authorJohn W. Linville <linville@tuxdriver.com>
Fri, 9 Apr 2010 17:42:26 +0000 (13:42 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 9 Apr 2010 17:42:26 +0000 (13:42 -0400)
Conflicts:
drivers/net/wireless/iwlwifi/iwl-4965.c

1  2 
drivers/net/wireless/iwlwifi/iwl-4965.c

index 6edae9b83bb7785dec0ad77be07fdcee2b849e43,8972166386cb5f79f1c214dda5f8e9a1164e341f..8c889fdddf0e2784ece837ac900fdaa7112d1ea1
@@@ -2013,8 -2014,10 +2013,10 @@@ static void iwl4965_rx_reply_tx(struct 
                        index = iwl_queue_dec_wrap(scd_ssn & 0xff, txq->q.n_bd);
                        IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
                                           "%d index %d\n", scd_ssn , index);
 -                      freed = iwl_tx_queue_reclaim(priv, txq_id, index);
 +                      freed = iwlagn_tx_queue_reclaim(priv, txq_id, index);
-                       iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
+                       if (qc)
+                               iwl_free_tfds_in_queue(priv, sta_id,
+                                                      tid, freed);
  
                        if (priv->mac80211_registered &&
                            (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
                                   le32_to_cpu(tx_resp->rate_n_flags),
                                   tx_resp->failure_frame);
  
 -              freed = iwl_tx_queue_reclaim(priv, txq_id, index);
 +              freed = iwlagn_tx_queue_reclaim(priv, txq_id, index);
-               iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
+               if (qc && likely(sta_id != IWL_INVALID_STATION))
+                       iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
+               else if (sta_id == IWL_INVALID_STATION)
+                       IWL_DEBUG_TX_REPLY(priv, "Station not known\n");
  
                if (priv->mac80211_registered &&
                    (iwl_queue_space(&txq->q) > txq->q.low_mark))
                        iwl_wake_queue(priv, txq_id);
        }
-       iwlagn_txq_check_empty(priv, sta_id, tid, txq_id);
+       if (qc && likely(sta_id != IWL_INVALID_STATION))
 -              iwl_txq_check_empty(priv, sta_id, tid, txq_id);
++              iwlagn_txq_check_empty(priv, sta_id, tid, txq_id);
  
        if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
                IWL_ERR(priv, "TODO:  Implement Tx ABORT REQUIRED!!!\n");