diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-12-12 06:41:35 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-12-16 02:25:30 -0500 |
commit | 91b12089b18a17cf510f636e29c2cb3a901fe7a5 (patch) | |
tree | c6068e86cd445b5a00af875ede16fb5415858e65 /drivers/net | |
parent | 1010ba4c5d1cb7e884100e54c0909885dc53a755 (diff) |
ath10k: improve 11b coex
Some firmware revisions need peer phymode to be
specified as MODE_11B when associating as station
to a 11b AP. Otherwise they can starve other
stations.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index fe61201d2e72..950322d646a5 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
@@ -1416,6 +1416,12 @@ static void ath10k_peer_assoc_h_qos(struct ath10k *ar, | |||
1416 | } | 1416 | } |
1417 | } | 1417 | } |
1418 | 1418 | ||
1419 | static bool ath10k_mac_sta_has_11g_rates(struct ieee80211_sta *sta) | ||
1420 | { | ||
1421 | /* First 4 rates in ath10k_rates are CCK (11b) rates. */ | ||
1422 | return sta->supp_rates[IEEE80211_BAND_2GHZ] >> 4; | ||
1423 | } | ||
1424 | |||
1419 | static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, | 1425 | static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, |
1420 | struct ieee80211_vif *vif, | 1426 | struct ieee80211_vif *vif, |
1421 | struct ieee80211_sta *sta, | 1427 | struct ieee80211_sta *sta, |
@@ -1430,8 +1436,10 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, | |||
1430 | phymode = MODE_11NG_HT40; | 1436 | phymode = MODE_11NG_HT40; |
1431 | else | 1437 | else |
1432 | phymode = MODE_11NG_HT20; | 1438 | phymode = MODE_11NG_HT20; |
1433 | } else { | 1439 | } else if (ath10k_mac_sta_has_11g_rates(sta)) { |
1434 | phymode = MODE_11G; | 1440 | phymode = MODE_11G; |
1441 | } else { | ||
1442 | phymode = MODE_11B; | ||
1435 | } | 1443 | } |
1436 | 1444 | ||
1437 | break; | 1445 | break; |
@@ -4724,6 +4732,9 @@ static const struct ieee80211_channel ath10k_5ghz_channels[] = { | |||
4724 | CHAN5G(165, 5825, 0), | 4732 | CHAN5G(165, 5825, 0), |
4725 | }; | 4733 | }; |
4726 | 4734 | ||
4735 | /* Note: Be careful if you re-order these. There is code which depends on this | ||
4736 | * ordering. | ||
4737 | */ | ||
4727 | static struct ieee80211_rate ath10k_rates[] = { | 4738 | static struct ieee80211_rate ath10k_rates[] = { |
4728 | /* CCK */ | 4739 | /* CCK */ |
4729 | RATETAB_ENT(10, 0x82, 0), | 4740 | RATETAB_ENT(10, 0x82, 0), |