From: Joe Perches <joe@perches.com>
To: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org,
ath6kl-devel@qualcomm.com,
Subramania Sharma <sharmat@qca.qualcomm.com>
Subject: Re: [PATCH V2] ath6kl: Fix 4-way handshake failure in AP and P2P GO mode
Date: Mon, 09 Apr 2012 09:00:38 -0700 [thread overview]
Message-ID: <1333987238.2152.5.camel@joe2Laptop> (raw)
In-Reply-To: <1333984880-4328-1-git-send-email-vthiagar@qca.qualcomm.com>
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@qca.qualcomm.com>
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
> ---
>
> 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
next prev parent reply other threads:[~2012-04-09 16:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <\>
2011-05-19 1:24 ` [PATCH] Remove unused PROC_CHANGE_PENALTY constant Stephen Boyd
2011-07-15 5:26 ` [PATCH 0/1] linux-yocto/meta: update SRCREVs Bruce Ashfield
2011-07-15 5:26 ` [PATCH 1/1] linux-yocto/meta-yocto: update SRCREVS Bruce Ashfield
2011-07-20 14:51 ` Richard Purdie
2012-04-09 15:21 ` [PATCH V2] ath6kl: Fix 4-way handshake failure in AP and P2P GO mode Vasanthakumar Thiagarajan
2012-04-09 15:34 ` Kalle Valo
2012-04-09 16:00 ` Joe Perches [this message]
2012-04-10 7:50 ` Vasanthakumar Thiagarajan
2014-02-12 7:10 ` [PATCH v2] can: xilinx CAN controller support Kedareswara rao Appana
2014-02-12 7:10 ` Kedareswara rao Appana
2014-02-12 7:10 ` Kedareswara rao Appana
2014-02-13 19:20 ` Marc Kleine-Budde
2014-02-13 19:20 ` Marc Kleine-Budde
2014-02-14 8:55 ` Michal Simek
2014-02-14 8:55 ` Michal Simek
2014-02-14 9:04 ` Marc Kleine-Budde
2014-02-14 9:04 ` Marc Kleine-Budde
2014-02-14 9:13 ` Michal Simek
2014-02-14 9:13 ` Michal Simek
2014-02-14 9:16 ` Marc Kleine-Budde
2014-02-14 9:16 ` Marc Kleine-Budde
[not found] ` <52FD1B16.6020600-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-14 9:36 ` Appana Durga Kedareswara Rao
2014-02-14 9:36 ` Appana Durga Kedareswara Rao
2014-02-14 9:36 ` Appana Durga Kedareswara Rao
2014-02-14 9:59 ` Marc Kleine-Budde
2014-02-14 9:59 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333987238.2152.5.camel@joe2Laptop \
--to=joe@perches.com \
--cc=ath6kl-devel@qualcomm.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=sharmat@qca.qualcomm.com \
--cc=vthiagar@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.