From: Thomas Pedersen Date: Sat, 28 Jul 2012 01:13:27 +0000 (-0700) Subject: ath6kl: reconfigure RSN capabilities when restarting AP X-Git-Tag: upstream/snapshot3+hdmi~6096^2~17^2~198^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f21243a82253e34f64187aeb3d7f93fb7cb92536;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ath6kl: reconfigure RSN capabilities when restarting AP If the firmware decides to initiate a channel switch on an AP vif running an RSN BSS, reconfigure the saved RSN IE capabilities as well. Fixes a bug where the beacon and 4-way handshake would have a capability mismatch after a channel switch, since the firmware apparently clears these on an AP disconnect. Signed-off-by: Thomas Pedersen Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index e8b9c1e..75ddfaf 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -2924,6 +2924,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev, WLAN_EID_RSN, WMI_RSN_IE_CAPB, (const u8 *) &rsn_capab, sizeof(rsn_capab)); + vif->rsn_capab = rsn_capab; if (res < 0) return res; } diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index baf149e..a95bf6a 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -605,6 +605,7 @@ struct ath6kl_vif { struct net_device_stats net_stats; struct target_stats target_stats; struct wmi_connect_cmd profile; + u16 rsn_capab; struct list_head mc_filter; }; diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index eca4d47..9533558 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c @@ -608,6 +608,18 @@ static int ath6kl_commit_ch_switch(struct ath6kl_vif *vif, u16 channel) switch (vif->nw_type) { case AP_NETWORK: + /* + * reconfigure any saved RSN IE capabilites in the beacon / + * probe response to stay in sync with the supplicant. + */ + if (vif->rsn_capab && + test_bit(ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE, + ar->fw_capabilities)) + ath6kl_wmi_set_ie_cmd(ar->wmi, vif->fw_vif_idx, + WLAN_EID_RSN, WMI_RSN_IE_CAPB, + (const u8 *) &vif->rsn_capab, + sizeof(vif->rsn_capab)); + return ath6kl_wmi_ap_profile_commit(ar->wmi, vif->fw_vif_idx, &vif->profile); default: