aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath9k')
-rw-r--r--drivers/net/wireless/ath9k/Kconfig1
-rw-r--r--drivers/net/wireless/ath9k/main.c4
-rw-r--r--drivers/net/wireless/ath9k/xmit.c48
3 files changed, 21 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath9k/Kconfig b/drivers/net/wireless/ath9k/Kconfig
index c43bd321f97f..90a8dd873786 100644
--- a/drivers/net/wireless/ath9k/Kconfig
+++ b/drivers/net/wireless/ath9k/Kconfig
@@ -1,6 +1,7 @@
1config ATH9K 1config ATH9K
2 tristate "Atheros 802.11n wireless cards support" 2 tristate "Atheros 802.11n wireless cards support"
3 depends on PCI && MAC80211 && WLAN_80211 3 depends on PCI && MAC80211 && WLAN_80211
4 depends on RFKILL || RFKILL=n
4 select MAC80211_LEDS 5 select MAC80211_LEDS
5 select LEDS_CLASS 6 select LEDS_CLASS
6 select NEW_LEDS 7 select NEW_LEDS
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 191eec50dc75..727f067aca4f 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -2164,13 +2164,13 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
2164 conf->ht.channel_type); 2164 conf->ht.channel_type);
2165 } 2165 }
2166 2166
2167 ath_update_chainmask(sc, conf->ht.enabled);
2168
2167 if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0) { 2169 if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0) {
2168 DPRINTF(sc, ATH_DBG_FATAL, "Unable to set channel\n"); 2170 DPRINTF(sc, ATH_DBG_FATAL, "Unable to set channel\n");
2169 mutex_unlock(&sc->mutex); 2171 mutex_unlock(&sc->mutex);
2170 return -EINVAL; 2172 return -EINVAL;
2171 } 2173 }
2172
2173 ath_update_chainmask(sc, conf->ht.enabled);
2174 } 2174 }
2175 2175
2176 if (changed & IEEE80211_CONF_CHANGE_POWER) 2176 if (changed & IEEE80211_CONF_CHANGE_POWER)
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 3bfc3b90f256..c92f0c6e4adc 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -126,15 +126,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
126 tx_info->flags |= IEEE80211_TX_STAT_ACK; 126 tx_info->flags |= IEEE80211_TX_STAT_ACK;
127 } 127 }
128 128
129 tx_info->status.rates[0].count = tx_status->retries; 129 tx_info->status.rates[0].count = tx_status->retries + 1;
130 if (tx_info->status.rates[0].flags & IEEE80211_TX_RC_MCS) {
131 /* Change idx from internal table index to MCS index */
132 int idx = tx_info->status.rates[0].idx;
133 struct ath_rate_table *rate_table = sc->cur_rate_table;
134 if (idx >= 0 && idx < rate_table->rate_cnt)
135 tx_info->status.rates[0].idx =
136 rate_table->info[idx].ratecode & 0x7f;
137 }
138 130
139 hdrlen = ieee80211_get_hdrlen_from_skb(skb); 131 hdrlen = ieee80211_get_hdrlen_from_skb(skb);
140 padsize = hdrlen & 3; 132 padsize = hdrlen & 3;
@@ -264,25 +256,22 @@ static void assign_aggr_tid_seqno(struct sk_buff *skb,
264 } 256 }
265 257
266 /* Get seqno */ 258 /* Get seqno */
267 259 /* For HT capable stations, we save tidno for later use.
268 if (ieee80211_is_data(fc) && !is_pae(skb)) { 260 * We also override seqno set by upper layer with the one
269 /* For HT capable stations, we save tidno for later use. 261 * in tx aggregation state.
270 * We also override seqno set by upper layer with the one 262 *
271 * in tx aggregation state. 263 * If fragmentation is on, the sequence number is
272 * 264 * not overridden, since it has been
273 * If fragmentation is on, the sequence number is 265 * incremented by the fragmentation routine.
274 * not overridden, since it has been 266 *
275 * incremented by the fragmentation routine. 267 * FIXME: check if the fragmentation threshold exceeds
276 * 268 * IEEE80211 max.
277 * FIXME: check if the fragmentation threshold exceeds 269 */
278 * IEEE80211 max. 270 tid = ATH_AN_2_TID(an, bf->bf_tidno);
279 */ 271 hdr->seq_ctrl = cpu_to_le16(tid->seq_next <<
280 tid = ATH_AN_2_TID(an, bf->bf_tidno); 272 IEEE80211_SEQ_SEQ_SHIFT);
281 hdr->seq_ctrl = cpu_to_le16(tid->seq_next << 273 bf->bf_seqno = tid->seq_next;
282 IEEE80211_SEQ_SEQ_SHIFT); 274 INCR(tid->seq_next, IEEE80211_SEQ_MAX);
283 bf->bf_seqno = tid->seq_next;
284 INCR(tid->seq_next, IEEE80211_SEQ_MAX);
285 }
286} 275}
287 276
288static int setup_tx_flags(struct ath_softc *sc, struct sk_buff *skb, 277static int setup_tx_flags(struct ath_softc *sc, struct sk_buff *skb,
@@ -1718,11 +1707,10 @@ static int ath_tx_setup_buffer(struct ath_softc *sc, struct ath_buf *bf,
1718 1707
1719 /* Assign seqno, tidno */ 1708 /* Assign seqno, tidno */
1720 1709
1721 if (bf_isht(bf) && (sc->sc_flags & SC_OP_TXAGGR)) 1710 if (ieee80211_is_data_qos(fc) && (sc->sc_flags & SC_OP_TXAGGR))
1722 assign_aggr_tid_seqno(skb, bf); 1711 assign_aggr_tid_seqno(skb, bf);
1723 1712
1724 /* DMA setup */ 1713 /* DMA setup */
1725
1726 bf->bf_mpdu = skb; 1714 bf->bf_mpdu = skb;
1727 1715
1728 bf->bf_dmacontext = pci_map_single(sc->pdev, skb->data, 1716 bf->bf_dmacontext = pci_map_single(sc->pdev, skb->data,