diff options
author | Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> | 2013-08-14 02:01:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-16 14:17:48 -0400 |
commit | 67a5533015be005caff61ee9cae42920a54e3a9b (patch) | |
tree | 5db135685f45ce5b9b40742d0fffbad02db759fd | |
parent | f819c0e72951f9238c53d6b7675bbd7a82c78b83 (diff) |
ath9k: set 5/10 MHz supported channels and fix bitrate
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 5 |
2 files changed, 21 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 85015bf537c2..6347378fc389 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -146,14 +146,22 @@ static struct ieee80211_rate ath9k_legacy_rates[] = { | |||
146 | RATE(20, 0x1a, IEEE80211_RATE_SHORT_PREAMBLE), | 146 | RATE(20, 0x1a, IEEE80211_RATE_SHORT_PREAMBLE), |
147 | RATE(55, 0x19, IEEE80211_RATE_SHORT_PREAMBLE), | 147 | RATE(55, 0x19, IEEE80211_RATE_SHORT_PREAMBLE), |
148 | RATE(110, 0x18, IEEE80211_RATE_SHORT_PREAMBLE), | 148 | RATE(110, 0x18, IEEE80211_RATE_SHORT_PREAMBLE), |
149 | RATE(60, 0x0b, 0), | 149 | RATE(60, 0x0b, (IEEE80211_RATE_SUPPORTS_5MHZ | |
150 | RATE(90, 0x0f, 0), | 150 | IEEE80211_RATE_SUPPORTS_10MHZ)), |
151 | RATE(120, 0x0a, 0), | 151 | RATE(90, 0x0f, (IEEE80211_RATE_SUPPORTS_5MHZ | |
152 | RATE(180, 0x0e, 0), | 152 | IEEE80211_RATE_SUPPORTS_10MHZ)), |
153 | RATE(240, 0x09, 0), | 153 | RATE(120, 0x0a, (IEEE80211_RATE_SUPPORTS_5MHZ | |
154 | RATE(360, 0x0d, 0), | 154 | IEEE80211_RATE_SUPPORTS_10MHZ)), |
155 | RATE(480, 0x08, 0), | 155 | RATE(180, 0x0e, (IEEE80211_RATE_SUPPORTS_5MHZ | |
156 | RATE(540, 0x0c, 0), | 156 | IEEE80211_RATE_SUPPORTS_10MHZ)), |
157 | RATE(240, 0x09, (IEEE80211_RATE_SUPPORTS_5MHZ | | ||
158 | IEEE80211_RATE_SUPPORTS_10MHZ)), | ||
159 | RATE(360, 0x0d, (IEEE80211_RATE_SUPPORTS_5MHZ | | ||
160 | IEEE80211_RATE_SUPPORTS_10MHZ)), | ||
161 | RATE(480, 0x08, (IEEE80211_RATE_SUPPORTS_5MHZ | | ||
162 | IEEE80211_RATE_SUPPORTS_10MHZ)), | ||
163 | RATE(540, 0x0c, (IEEE80211_RATE_SUPPORTS_5MHZ | | ||
164 | IEEE80211_RATE_SUPPORTS_10MHZ)), | ||
157 | }; | 165 | }; |
158 | 166 | ||
159 | #ifdef CONFIG_MAC80211_LEDS | 167 | #ifdef CONFIG_MAC80211_LEDS |
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 7e86abb98808..d3d7c51fa6c8 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -1282,9 +1282,14 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, | |||
1282 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 1282 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
1283 | struct ath_rate_priv *ath_rc_priv = priv_sta; | 1283 | struct ath_rate_priv *ath_rc_priv = priv_sta; |
1284 | int i, j = 0; | 1284 | int i, j = 0; |
1285 | u32 rate_flags = ieee80211_chandef_rate_flags(&sc->hw->conf.chandef); | ||
1285 | 1286 | ||
1286 | for (i = 0; i < sband->n_bitrates; i++) { | 1287 | for (i = 0; i < sband->n_bitrates; i++) { |
1287 | if (sta->supp_rates[sband->band] & BIT(i)) { | 1288 | if (sta->supp_rates[sband->band] & BIT(i)) { |
1289 | if ((rate_flags & sband->bitrates[i].flags) | ||
1290 | != rate_flags) | ||
1291 | continue; | ||
1292 | |||
1288 | ath_rc_priv->neg_rates.rs_rates[j] | 1293 | ath_rc_priv->neg_rates.rs_rates[j] |
1289 | = (sband->bitrates[i].bitrate * 2) / 10; | 1294 | = (sband->bitrates[i].bitrate * 2) / 10; |
1290 | j++; | 1295 | j++; |