diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-06-02 15:36:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 15:36:51 -0400 |
commit | 1c62c72b1a3c4478fb9069503d20c41b1f385ca1 (patch) | |
tree | 939634bedbabfcd389ab7ad96ab7e161e25b2061 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |
parent | da1fdb02d9200ff28b6f3a380d21930335fe5429 (diff) | |
parent | 9f6e1bafac4f3c58c8a670496adcc4d313d3c7f7 (diff) |
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-lib.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 1004cfc403b1..501d97f19170 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -184,6 +184,7 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
184 | int tid; | 184 | int tid; |
185 | int sta_id; | 185 | int sta_id; |
186 | int freed; | 186 | int freed; |
187 | unsigned long flags; | ||
187 | 188 | ||
188 | if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) { | 189 | if ((index >= txq->q.n_bd) || (iwl_queue_used(&txq->q, index) == 0)) { |
189 | IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d " | 190 | IWL_ERR(priv, "Read index for DMA queue txq_id (%d) index %d " |
@@ -199,9 +200,10 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
199 | tid = (tx_resp->ra_tid & IWL50_TX_RES_TID_MSK) >> IWL50_TX_RES_TID_POS; | 200 | tid = (tx_resp->ra_tid & IWL50_TX_RES_TID_MSK) >> IWL50_TX_RES_TID_POS; |
200 | sta_id = (tx_resp->ra_tid & IWL50_TX_RES_RA_MSK) >> IWL50_TX_RES_RA_POS; | 201 | sta_id = (tx_resp->ra_tid & IWL50_TX_RES_RA_MSK) >> IWL50_TX_RES_RA_POS; |
201 | 202 | ||
203 | spin_lock_irqsave(&priv->sta_lock, flags); | ||
202 | if (txq->sched_retry) { | 204 | if (txq->sched_retry) { |
203 | const u32 scd_ssn = iwlagn_get_scd_ssn(tx_resp); | 205 | const u32 scd_ssn = iwlagn_get_scd_ssn(tx_resp); |
204 | struct iwl_ht_agg *agg = NULL; | 206 | struct iwl_ht_agg *agg; |
205 | 207 | ||
206 | agg = &priv->stations[sta_id].tid[tid].agg; | 208 | agg = &priv->stations[sta_id].tid[tid].agg; |
207 | 209 | ||
@@ -256,6 +258,7 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
256 | iwlagn_txq_check_empty(priv, sta_id, tid, txq_id); | 258 | iwlagn_txq_check_empty(priv, sta_id, tid, txq_id); |
257 | 259 | ||
258 | iwl_check_abort_status(priv, tx_resp->frame_count, status); | 260 | iwl_check_abort_status(priv, tx_resp->frame_count, status); |
261 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
259 | } | 262 | } |
260 | 263 | ||
261 | void iwlagn_rx_handler_setup(struct iwl_priv *priv) | 264 | void iwlagn_rx_handler_setup(struct iwl_priv *priv) |
@@ -319,7 +322,8 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
319 | void iwlagn_temperature(struct iwl_priv *priv) | 322 | void iwlagn_temperature(struct iwl_priv *priv) |
320 | { | 323 | { |
321 | /* store temperature from statistics (in Celsius) */ | 324 | /* store temperature from statistics (in Celsius) */ |
322 | priv->temperature = le32_to_cpu(priv->statistics.general.temperature); | 325 | priv->temperature = |
326 | le32_to_cpu(priv->_agn.statistics.general.temperature); | ||
323 | iwl_tt_handler(priv); | 327 | iwl_tt_handler(priv); |
324 | } | 328 | } |
325 | 329 | ||
@@ -1528,3 +1532,18 @@ int iwlagn_manage_ibss_station(struct iwl_priv *priv, | |||
1528 | return iwl_remove_station(priv, vif_priv->ibss_bssid_sta_id, | 1532 | return iwl_remove_station(priv, vif_priv->ibss_bssid_sta_id, |
1529 | vif->bss_conf.bssid); | 1533 | vif->bss_conf.bssid); |
1530 | } | 1534 | } |
1535 | |||
1536 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, | ||
1537 | int sta_id, int tid, int freed) | ||
1538 | { | ||
1539 | WARN_ON(!spin_is_locked(&priv->sta_lock)); | ||
1540 | |||
1541 | if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) | ||
1542 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | ||
1543 | else { | ||
1544 | IWL_DEBUG_TX(priv, "free more than tfds_in_queue (%u:%d)\n", | ||
1545 | priv->stations[sta_id].tid[tid].tfds_in_queue, | ||
1546 | freed); | ||
1547 | priv->stations[sta_id].tid[tid].tfds_in_queue = 0; | ||
1548 | } | ||
1549 | } | ||