ath6kl: reconfigure RSN capabilities when restarting AP
authorThomas Pedersen <c_tpeder@qca.qualcomm.com>
Sat, 28 Jul 2012 01:13:27 +0000 (18:13 -0700)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 24 Oct 2012 08:49:42 +0000 (11:49 +0300)
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 <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/main.c

index e8b9c1e2a04c817e60b5c65c6ab2bb3c89cd255e..75ddfafb11b77d0912564a50711e0460a30a219f 100644 (file)
@@ -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;
        }
index baf149ef346522fc648f99eeae0e9f21a60ea25e..a95bf6ab7ec16bf184e8883584ad09d527c4869a 100644 (file)
@@ -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;
 };
index eca4d4704edc2501660df17c889339b7d7590e87..9533558a6235ef0cff234a9c31a9b021b5afd034 100644 (file)
@@ -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: