diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-02-26 16:54:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-02-26 16:54:45 -0500 |
commit | 64463da913bc8f791980ba28d93ac5e716ab9cc5 (patch) | |
tree | cf958678f7cf0b615a52356beb2d18240424ab4a /drivers/net/wireless/iwlwifi | |
parent | 4a6967b88af02eebeedfbb91bc09160750225bb5 (diff) | |
parent | a120e912eb51e347f36c71b60a1d13af74d30e83 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.h
net/mac80211/rate.c
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-rx.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 22 |
6 files changed, 31 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 17e91ad3496c..1bd2cd836026 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2015,7 +2015,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2015 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " | 2015 | IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " |
2016 | "%d index %d\n", scd_ssn , index); | 2016 | "%d index %d\n", scd_ssn , index); |
2017 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 2017 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
2018 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 2018 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
2019 | 2019 | ||
2020 | if (priv->mac80211_registered && | 2020 | if (priv->mac80211_registered && |
2021 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && | 2021 | (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 94fc83671f20..e476acb53aa7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1123,7 +1123,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1123 | scd_ssn , index, txq_id, txq->swq_id); | 1123 | scd_ssn , index, txq_id, txq->swq_id); |
1124 | 1124 | ||
1125 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 1125 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
1126 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 1126 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1127 | 1127 | ||
1128 | if (priv->mac80211_registered && | 1128 | if (priv->mac80211_registered && |
1129 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && | 1129 | (iwl_queue_space(&txq->q) > txq->q.low_mark) && |
@@ -1151,16 +1151,14 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1151 | tx_resp->failure_frame); | 1151 | tx_resp->failure_frame); |
1152 | 1152 | ||
1153 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); | 1153 | freed = iwl_tx_queue_reclaim(priv, txq_id, index); |
1154 | if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) | 1154 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1155 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | ||
1156 | 1155 | ||
1157 | if (priv->mac80211_registered && | 1156 | if (priv->mac80211_registered && |
1158 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) | 1157 | (iwl_queue_space(&txq->q) > txq->q.low_mark)) |
1159 | iwl_wake_queue(priv, txq_id); | 1158 | iwl_wake_queue(priv, txq_id); |
1160 | } | 1159 | } |
1161 | 1160 | ||
1162 | if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) | 1161 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); |
1163 | iwl_txq_check_empty(priv, sta_id, tid, txq_id); | ||
1164 | 1162 | ||
1165 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) | 1163 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) |
1166 | IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); | 1164 | 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 55252a692de7..112149e9b31e 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 3df79331039c..4ef7739f9e8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -451,6 +451,8 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb); | |||
451 | void iwl_hw_txq_ctx_free(struct iwl_priv *priv); | 451 | void iwl_hw_txq_ctx_free(struct iwl_priv *priv); |
452 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, | 452 | int iwl_hw_tx_queue_init(struct iwl_priv *priv, |
453 | struct iwl_tx_queue *txq); | 453 | 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 | void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); | 456 | void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); |
455 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, | 457 | int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, |
456 | int slots_num, u32 txq_id); | 458 | int slots_num, u32 txq_id); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index fed554accedc..0d09f571e185 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -1054,7 +1054,10 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
1054 | if (ieee80211_is_mgmt(fc) || | 1054 | if (ieee80211_is_mgmt(fc) || |
1055 | ieee80211_has_protected(fc) || | 1055 | ieee80211_has_protected(fc) || |
1056 | ieee80211_has_morefrags(fc) || | 1056 | ieee80211_has_morefrags(fc) || |
1057 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) | 1057 | le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG || |
1058 | (ieee80211_is_data_qos(fc) && | ||
1059 | *ieee80211_get_qos_ctl(hdr) & | ||
1060 | IEEE80211_QOS_CONTROL_A_MSDU_PRESENT)) | ||
1058 | ret = skb_linearize(skb); | 1061 | ret = skb_linearize(skb); |
1059 | else | 1062 | else |
1060 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? | 1063 | ret = __pskb_pull_tail(skb, min_t(u16, IWL_LINK_HDR_MAX, len)) ? |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 38655ad8f43c..10701b8eef23 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -118,6 +118,20 @@ void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq) | |||
118 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); | 118 | EXPORT_SYMBOL(iwl_txq_update_write_ptr); |
119 | 119 | ||
120 | 120 | ||
121 | void iwl_free_tfds_in_queue(struct iwl_priv *priv, | ||
122 | int sta_id, int tid, int freed) | ||
123 | { | ||
124 | if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed) | ||
125 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | ||
126 | else { | ||
127 | IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n", | ||
128 | priv->stations[sta_id].tid[tid].tfds_in_queue, | ||
129 | freed); | ||
130 | priv->stations[sta_id].tid[tid].tfds_in_queue = 0; | ||
131 | } | ||
132 | } | ||
133 | EXPORT_SYMBOL(iwl_free_tfds_in_queue); | ||
134 | |||
121 | /** | 135 | /** |
122 | * iwl_tx_queue_free - Deallocate DMA queue. | 136 | * iwl_tx_queue_free - Deallocate DMA queue. |
123 | * @txq: Transmit queue to deallocate. | 137 | * @txq: Transmit queue to deallocate. |
@@ -1127,6 +1141,7 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
1127 | struct iwl_queue *q = &txq->q; | 1141 | struct iwl_queue *q = &txq->q; |
1128 | struct iwl_tx_info *tx_info; | 1142 | struct iwl_tx_info *tx_info; |
1129 | int nfreed = 0; | 1143 | int nfreed = 0; |
1144 | struct ieee80211_hdr *hdr; | ||
1130 | 1145 | ||
1131 | if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { | 1146 | if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { |
1132 | IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " | 1147 | IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " |
@@ -1141,13 +1156,16 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index) | |||
1141 | 1156 | ||
1142 | tx_info = &txq->txb[txq->q.read_ptr]; | 1157 | tx_info = &txq->txb[txq->q.read_ptr]; |
1143 | iwl_tx_status(priv, tx_info->skb[0]); | 1158 | iwl_tx_status(priv, tx_info->skb[0]); |
1159 | |||
1160 | hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data; | ||
1161 | if (hdr && ieee80211_is_data_qos(hdr->frame_control)) | ||
1162 | nfreed++; | ||
1144 | tx_info->skb[0] = NULL; | 1163 | tx_info->skb[0] = NULL; |
1145 | 1164 | ||
1146 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) | 1165 | if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) |
1147 | priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); | 1166 | priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); |
1148 | 1167 | ||
1149 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); | 1168 | priv->cfg->ops->lib->txq_free_tfd(priv, txq); |
1150 | nfreed++; | ||
1151 | } | 1169 | } |
1152 | return nfreed; | 1170 | return nfreed; |
1153 | } | 1171 | } |
@@ -1561,7 +1579,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
1561 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { | 1579 | if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { |
1562 | /* calculate mac80211 ampdu sw queue to wake */ | 1580 | /* calculate mac80211 ampdu sw queue to wake */ |
1563 | int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); | 1581 | int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); |
1564 | priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; | 1582 | iwl_free_tfds_in_queue(priv, sta_id, tid, freed); |
1565 | 1583 | ||
1566 | if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && | 1584 | if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && |
1567 | priv->mac80211_registered && | 1585 | priv->mac80211_registered && |