On Mon, 2012-04-09 at 20:51 +0530, 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> > --- > > V2 - Fix sparse warning due to the way rsn_cap is used > to store le16 (Reported by Kalle). > > drivers/net/wireless/ath/ath6kl/cfg80211.c | 64 ++++++++++++++++++++++++++++ > drivers/net/wireless/ath/ath6kl/core.h | 3 + > drivers/net/wireless/ath/ath6kl/wmi.c | 23 ++++++++++ > drivers/net/wireless/ath/ath6kl/wmi.h | 17 +++++++ > 4 files changed, 107 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c > index 06f12da..98a0046 100644 > --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c > +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c > @@ -2524,6 +2524,52 @@ static int ath6kl_set_ies(struct ath6kl_vif *vif, > return 0; > } > > +static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon, > + u8 *rsn_capab) > +{ > + const u8 *rsn_ie; > + size_t rsn_ie_len; > + u16 cnt; > + > + if (!beacon->tail) > + return -EINVAL; > + > + rsn_ie = cfg80211_find_ie(WLAN_EID_RSN, beacon->tail, beacon->tail_len); > + if (!rsn_ie) > + return -EINVAL; > + > + rsn_ie_len = *(rsn_ie + 1); > + /* skip element id and length */ > + rsn_ie += 2; > + > + /* skip version, group cipher */ > + if (rsn_ie_len < 6) > + return -EINVAL; > + rsn_ie += 6; > + rsn_ie_len -= 6; > + > + /* skip pairwise cipher suite */ > + if (rsn_ie_len < 2) > + return -EINVAL; > + cnt = *((u16 *) rsn_ie); Any endian or alignment issues? > + rsn_ie += (2 + cnt * 4); > + rsn_ie_len -= (2 + cnt * 4); > + > + /* skip akm suite */ > + if (rsn_ie_len < 2) > + return -EINVAL; > + cnt = *((u16 *) rsn_ie); > + rsn_ie += (2 + cnt * 4); > + rsn_ie_len -= (2 + cnt * 4); > + > + if (rsn_ie_len < 2) > + return -EINVAL; > + > + memcpy(rsn_capab, rsn_ie, 2); > + > + return 0; > +} Maybe -- 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