From: lemagoup@gmail.com
To: kvalo@qca.qualcomm.com
Cc: ath6kl@lists.infradead.org, linux-wireless@vger.kernel.org,
jmassot@aldebaran.com,
Pierre Le Magourou <plemagourou@aldebaran.com>
Subject: [PATCH v2 1/3] ath6kl: Fix WLAN tethering authentication problem.
Date: Mon, 4 Jul 2016 13:07:17 +0200 [thread overview]
Message-ID: <20160704110719.7694-2-plemagourou@aldebaran.com> (raw)
In-Reply-To: <20160704110719.7694-1-plemagourou@aldebaran.com>
From: Pierre Le Magourou <plemagourou@aldebaran.com>
When enabling WLAN tethering, a new AP is visible and a STA could
connect to it. When the STA tries to authenticate to the newly created
AP, the WPA authentication mechanism is stuck in the 1/4 msg of 4-Way
Handshake.
In ath6kl_rx(), the ath6kl_find_sta() function is looking for the
h_source field of the Ethernet frame header received by the STA. The
datap pointer that points to the Ethernet frame header is incorrect,
and was pointing at the wrong offset in the buffer.
This commit adds a pad_before_data_start offset to set the datap pointer
to the Ethernet frame header. datap->h_source parameter is now really
pointing to the source ethernet address and the authentication process
can continue.
Signed-off-by: Pierre Le Magourou <plemagourou@aldebaran.com>
---
drivers/net/wireless/ath/ath6kl/txrx.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 40432fe..9df41d5 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1401,6 +1401,10 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
return;
}
+ pad_before_data_start =
+ (le16_to_cpu(dhdr->info3) >> WMI_DATA_HDR_PAD_BEFORE_DATA_SHIFT)
+ & WMI_DATA_HDR_PAD_BEFORE_DATA_MASK;
+
/* Get the Power save state of the STA */
if (vif->nw_type == AP_NETWORK) {
meta_type = wmi_data_hdr_get_meta(dhdr);
@@ -1408,7 +1412,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
ps_state = !!((dhdr->info >> WMI_DATA_HDR_PS_SHIFT) &
WMI_DATA_HDR_PS_MASK);
- offset = sizeof(struct wmi_data_hdr);
+ offset = sizeof(struct wmi_data_hdr) + pad_before_data_start;
trig_state = !!(le16_to_cpu(dhdr->info3) & WMI_DATA_HDR_TRIG);
switch (meta_type) {
@@ -1523,9 +1527,6 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
seq_no = wmi_data_hdr_get_seqno(dhdr);
meta_type = wmi_data_hdr_get_meta(dhdr);
dot11_hdr = wmi_data_hdr_get_dot11(dhdr);
- pad_before_data_start =
- (le16_to_cpu(dhdr->info3) >> WMI_DATA_HDR_PAD_BEFORE_DATA_SHIFT)
- & WMI_DATA_HDR_PAD_BEFORE_DATA_MASK;
skb_pull(skb, sizeof(struct wmi_data_hdr));
--
2.9.0
next prev parent reply other threads:[~2016-07-04 11:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 11:07 [PATCH v2 0/3] ath6kl: Fix tethering problems lemagoup
2016-07-04 11:07 ` lemagoup [this message]
2016-07-19 13:25 ` [v2,1/3] ath6kl: Fix WLAN tethering authentication problem Kalle Valo
2016-07-04 11:07 ` [PATCH v2 2/3] ath6kl: Fix wrong regulatory domain disconnection lemagoup
2016-07-04 11:07 ` [PATCH v2 3/3] ath6kl: Unset IFF_LOWER_UP flag on AP mode leave lemagoup
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=20160704110719.7694-2-plemagourou@aldebaran.com \
--to=lemagoup@gmail.com \
--cc=ath6kl@lists.infradead.org \
--cc=jmassot@aldebaran.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
--cc=plemagourou@aldebaran.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox