diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-26 02:22:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 02:22:42 -0500 |
commit | 04488734806948624dabc4514f96f14cd75b9a50 (patch) | |
tree | 74f3a3c10a7177a5f86398b83ad7bf0569fe8b89 /drivers/net/wireless/iwlwifi | |
parent | 54831a83bfe656c4c54e287c734c6b0ccaa3719b (diff) | |
parent | c4d49794ff2838038fd9756eae39c39a5a685833 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 22 |
5 files changed, 27 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index aebe8c51d3e1..b07874f7da7f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2008,7 +2008,7 @@ 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 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 2011 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
2012 | 2012 | ||
2013 | if (priv->mac80211_registered && | 2013 | if (priv->mac80211_registered && |
2014 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && | 2014 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index f3d662c8cbcf..2cf92a51f041 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1116,7 +1116,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1116 | scd_ssn , index, txq_id, txq->swq_id); | 1116 | scd_ssn , index, txq_id, txq->swq_id); |
1117 | 1117 | ||
1118 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 1118 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
1119 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 1119 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1120 | 1120 | ||
1121 | if (priv->mac80211_registered && | 1121 | if (priv->mac80211_registered && |
1122 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && | 1122 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && |
@@ -1144,16 +1144,14 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1144 | tx_resp->failure_frame); | 1144 | tx_resp->failure_frame); |
1145 | 1145 | ||
1146 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 1146 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
1147 | if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) | 1147 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1148 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | ||
1149 | 1148 | ||
1150 | if (priv->mac80211_registered && | 1149 | if (priv->mac80211_registered && |
1151 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) | 1150 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) |
1152 | iwl_wake_queue(priv, txq_id); | 1151 | iwl_wake_queue(priv, txq_id); |
1153 | } | 1152 | } |
1154 | 1153 | ||
1155 | if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) | 1154 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); |
1156 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); | ||
1157 | 1155 | ||
1158 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) | 1156 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) |
1159 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); | 1157 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index d390eef2efe5..728410083cb8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -2787,8 +2787,8 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2787 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) | 2787 | if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) |
2788 | priv->staging_rxon.flags = 0; | 2788 | priv->staging_rxon.flags = 0; |
2789 | 2789 | ||
2790 | iwl_set_rxon_ht(priv, ht_conf); | ||
2791 | iwl_set_rxon_channel(priv, conf->channel); | 2790 | iwl_set_rxon_channel(priv, conf->channel); |
2791 | iwl_set_rxon_ht(priv, ht_conf); | ||
2792 | 2792 | ||
2793 | iwl_set_flags_for_band(priv, conf->channel->band); | 2793 | iwl_set_flags_for_band(priv, conf->channel->band); |
2794 | spin_unlock_irqrestore(&priv->lock, flags); | 2794 | spin_unlock_irqrestore(&priv->lock, flags); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 8f0c564e68b0..1b0701b876c3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -451,6 +451,8 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv); | |||
451 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, | 451 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, |
452 | struct iwl_tx_queue *txq); | 452 | struct iwl_tx_queue *txq); |
453 | int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); | 453 | int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); |
454 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, | ||
455 | int sta_id, int tid, int freed); | ||
454 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, | 456 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, |
455 | int slots_num, u32 txq_id); | 457 | int slots_num, u32 txq_id); |
456 | void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); | 458 | void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index d365d13e3291..6eff3d4d0616 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -120,6 +120,20 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
120 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); | 120 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); |
121 | 121 | ||
122 | 122 | ||
123 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, | ||
124 | int sta_id, int tid, int freed) | ||
125 | { | ||
126 | if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) | ||
127 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | ||
128 | else { | ||
129 | IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n", | ||
130 | priv->stations[sta_id].tid[tid].tfds_in_queue, | ||
131 | freed); | ||
132 | priv->stations[sta_id].tid[tid].tfds_in_queue = 0; | ||
133 | } | ||
134 | } | ||
135 | EXPORT_SYMBOL(iwl_free_tfds_in_queue); | ||
136 | |||
123 | /** | 137 | /** |
124 | * iwl_tx_queue_free - Deallocate DMA queue. | 138 | * iwl_tx_queue_free - Deallocate DMA queue. |
125 | * @txq: Transmit queue to deallocate. | 139 | * @txq: Transmit queue to deallocate. |
@@ -1131,6 +1145,7 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
1131 | struct iwl_queue *q = &txq->q; | 1145 | struct iwl_queue *q = &txq->q; |
1132 | struct iwl_tx_info *tx_info; | 1146 | struct iwl_tx_info *tx_info; |
1133 | int nfreed = 0; | 1147 | int nfreed = 0; |
1148 | struct ieee80211_hdr *hdr; | ||
1134 | 1149 | ||
1135 | if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { | 1150 | if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { |
1136 | IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " | 1151 | IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " |
@@ -1145,13 +1160,16 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
1145 | 1160 | ||
1146 | tx_info = &txq->txb[txq->q.read_ptr]; | 1161 | tx_info = &txq->txb[txq->q.read_ptr]; |
1147 | iwl_tx_status(priv, tx_info->skb[0]); | 1162 | iwl_tx_status(priv, tx_info->skb[0]); |
1163 | |||
1164 | hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data; | ||
1165 | if (hdr && ieee80211_is_data_qos(hdr->frame_control)) | ||
1166 | nfreed++; | ||
1148 | tx_info->skb[0] = NULL; | 1167 | tx_info->skb[0] = NULL; |
1149 | 1168 | ||
1150 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) | 1169 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) |
1151 | priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); | 1170 | priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); |
1152 | 1171 | ||
1153 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); | 1172 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); |
1154 | nfreed++; | ||
1155 | } | 1173 | } |
1156 | return nfreed; | 1174 | return nfreed; |
1157 | } | 1175 | } |
@@ -1559,7 +1577,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
1559 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { | 1577 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { |
1560 | /* calculate mac80211 ampdu sw queue to wake */ | 1578 | /* calculate mac80211 ampdu sw queue to wake */ |
1561 | int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); | 1579 | int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); |
1562 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 1580 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1563 | 1581 | ||
1564 | if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && | 1582 | if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && |
1565 | priv->mac80211_registered && | 1583 | priv->mac80211_registered && |