With firmwares which do not support rsn capability override
(ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE) from host would
cause 4-way handshake failure when HT cap is advertised.
To fix this, do not advertise HT cap with cfg80211 for
those fw.
Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index a8a7570..e3f30c8 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -122,8 +122,6 @@ static struct ieee80211_supported_band ath6kl_band_2ghz = {
.channels = ath6kl_2ghz_channels,
.n_bitrates = ath6kl_g_rates_size,
.bitrates = ath6kl_g_rates,
- .ht_cap.cap = ath6kl_g_htcap,
- .ht_cap.ht_supported = true,
};
static struct ieee80211_supported_band ath6kl_band_5ghz = {
@@ -131,8 +129,6 @@ static struct ieee80211_supported_band ath6kl_band_5ghz = {
.channels = ath6kl_5ghz_a_channels,
.n_bitrates = ath6kl_a_rates_size,
.bitrates = ath6kl_a_rates,
- .ht_cap.cap = ath6kl_a_htcap,
- .ht_cap.ht_supported = true,
};
#define CCKM_KRK_CIPHER_SUITE 0x004096ff /* use for KRK */
@@ -3441,6 +3437,19 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
wiphy->max_scan_ie_len = 1000; /* FIX: what is correct limit? */
wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz;
wiphy->bands[IEEE80211_BAND_5GHZ] = &ath6kl_band_5ghz;
+
+ /*
+ * Advertise HT cap only when the firmware has support to override
+ * RSN capability, otherwise 4-way handshake would fail.
+ */
+ if (test_bit(ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE,
+ ar->fw_capabilities)) {
+ wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap.ht_supported = true;
+ wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap.cap = ath6kl_g_htcap;
+ wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap.ht_supported = true;
+ wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap.cap = ath6kl_a_htcap;
+ }
+
wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
wiphy->cipher_suites = cipher_suites;
--
1.7.0.4
On 04/23/2012 11:53 AM, Vasanthakumar Thiagarajan wrote:
> With firmwares which do not support rsn capability override
> (ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE) from host would
> cause 4-way handshake failure when HT cap is advertised.
> To fix this, do not advertise HT cap with cfg80211 for
> those fw.
>
> Signed-off-by: Vasanthakumar Thiagarajan <[email protected]>
This conflicts which Thomas' changes in the same area. Care to rebase
your patches? I think the patch will become pretty simple after the
rebase but I didn't dare to do it myself :)
Kalle
On Wednesday 25 April 2012 11:57 AM, Kalle Valo wrote:
> On 04/23/2012 11:53 AM, Vasanthakumar Thiagarajan wrote:
>> With firmwares which do not support rsn capability override
>> (ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE) from host would
>> cause 4-way handshake failure when HT cap is advertised.
>> To fix this, do not advertise HT cap with cfg80211 for
>> those fw.
>>
>> Signed-off-by: Vasanthakumar Thiagarajan<[email protected]>
>
> This conflicts which Thomas' changes in the same area. Care to rebase
> your patches? I think the patch will become pretty simple after the
> rebase but I didn't dare to do it myself :)
Not an issue, i'll do that, thanks!.
Vasanth