Search Linux Wireless

Re: [PATCH] ath6kl: Fix 4-way handshake failure in AP and P2P GO mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Monday 09 April 2012 08:17 PM, Kalle Valo wrote:
On 04/05/2012 07:56 PM, Vasanthakumar Thiagarajan wrote:
RSN capability field of RSN IE which is generated (which is what really
advertised in beacon/probe response) differs from the one generated in
wpa_supplicant. This inconsistency in rsn IE results in 4-way handshake
failure. To fix this, configure rsn capability used in wpa_supplicant
in firmware using a new wmi command, WMI_SET_IE_CMDID. There is a bit
(ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE) in fw_capabilities to advertise
this support to driver.

Signed-off-by: Subramania Sharma<sharmat@xxxxxxxxxxxxxxxx>
Signed-off-by: Vasanthakumar Thiagarajan<vthiagar@xxxxxxxxxxxxxxxx>

Otherwise looks good but there's a sparse warning:

drivers/net/wireless/ath/ath6kl/cfg80211.c:2539:20: warning: incorrect
type in assignment (different base types)
drivers/net/wireless/ath/ath6kl/cfg80211.c:2539:20:    expected unsigned
short [unsigned] [short] [usertype]<noident>
drivers/net/wireless/ath/ath6kl/cfg80211.c:2539:20:    got restricted
__le16 [usertype]<noident>

grr, for some reason my sparse does not report this. How about the change like the following over this patch so that we need not worry about endianness in accessing rsn-cap?. Thanks!.


--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2520,7 +2520,7 @@ static int ath6kl_set_ies(struct ath6kl_vif *vif,
 }

 static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
-                               u16 *rsn_capab)
+                               u8 *rsn_capab)
 {
        const u8 *rsn_ie;
        size_t rsn_ie_len;
@@ -2560,7 +2560,7 @@ static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
        if (rsn_ie_len < 2)
                return -EINVAL;

-       *rsn_capab = cpu_to_le16(*((u16 *) rsn_ie));
+       memcpy(rsn_capab, rsn_ie, 2);

        return 0;
 }
@@ -2749,7 +2749,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
         * advertise the same in beacon/probe response. Send
         * the complete RSN IE capability field to firmware
         */
-       if (!ath6kl_get_rsn_capab(&info->beacon, &rsn_capab) &&
+       if (!ath6kl_get_rsn_capab(&info->beacon, (u8 *) &rsn_capab) &&
            test_bit(ATH6KL_FW_CAPABILITY_RSN_CAP_OVERRIDE,
                     ar->fw_capabilities)) {
                res = ath6kl_wmi_set_ie_cmd(ar->wmi, vif->fw_vif_idx,

Vasanth
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux