summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/txrx.c
diff options
context:
space:
mode:
authorPierre Le Magourou <plemagourou@aldebaran.com>2016-07-18 23:22:19 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2016-07-19 16:22:32 +0300
commit270df8f80d67f257d5b3a94d10b899870f39606a (patch)
tree84c811e07b45070df4c65bf38c11adad95968b4d /drivers/net/wireless/ath/ath6kl/txrx.c
parent4ca1807815aa6801aaced7fdefa9edacc2521767 (diff)
ath6kl: Fix WLAN tethering authentication problem.
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> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/txrx.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/txrx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 40432fe7a5d2..9df41d5e3249 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));