2012-05-02 09:25:32

by Vivek Natarajan

[permalink] [raw]
Subject: [PATCH] ath6kl_sdio: Fix the EAPOL out of order issue

Send the EAPOL and management frames in the same AC_VO queue. The issue
happens when the AP supports QOS, the management frames are sent to AC_VO
queue and EAP frame goes to AC_BE queue. Even though the EAP frame is
queued before the DEAUTH management frame, as they are queued on different
h/w queues, order of delivery between these frames cannot be controlled.

This fixes the connection failure seen in P2P case.

Signed-off-by: Vivek Natarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/wmi.c | 7 +++++++
drivers/net/wireless/ath/ath6kl/wmi.h | 2 ++
2 files changed, 9 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 102477d..ee8ec23 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -290,6 +290,13 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx,
layer2_priority);
} else
usr_pri = layer2_priority & 0x7;
+
+ /*
+ * Queue the EAPOL frames in the same WMM_AC_VO queue
+ * as that of management frames.
+ */
+ if (skb->protocol == cpu_to_be16(ETH_P_PAE))
+ usr_pri = WMI_VOICE_USER_PRIORITY;
}

/*
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 9966140..9076bec 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -106,6 +106,8 @@ struct wmi_data_sync_bufs {
#define WMM_AC_VI 2 /* video */
#define WMM_AC_VO 3 /* voice */

+#define WMI_VOICE_USER_PRIORITY 0x7
+
struct wmi {
u16 stream_exist_for_ac[WMM_NUM_AC];
u8 fat_pipe_exist;
--
1.7.10



2012-05-03 13:09:24

by Lee, Youngsin

[permalink] [raw]
Subject: RE: [PATCH] ath6kl_sdio: Fix the EAPOL out of order issue

+ More folks.

Steven, Please also check this patch for CR346620.

Thanks a lot,
Youngsin.

-----Original Message-----
From: Natarajan, Vivekanandan
Sent: Wednesday, May 02, 2012 6:25 PM
To: Valo, Kalle
Cc: [email protected]; ath6kl-devel
Subject: [PATCH] ath6kl_sdio: Fix the EAPOL out of order issue

Send the EAPOL and management frames in the same AC_VO queue. The issue happens when the AP supports QOS, the management frames are sent to AC_VO queue and EAP frame goes to AC_BE queue. Even though the EAP frame is queued before the DEAUTH management frame, as they are queued on different h/w queues, order of delivery between these frames cannot be controlled.

This fixes the connection failure seen in P2P case.

Signed-off-by: Vivek Natarajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/wmi.c | 7 +++++++
drivers/net/wireless/ath/ath6kl/wmi.h | 2 ++
2 files changed, 9 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 102477d..ee8ec23 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -290,6 +290,13 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx,
layer2_priority);
} else
usr_pri = layer2_priority & 0x7;
+
+ /*
+ * Queue the EAPOL frames in the same WMM_AC_VO queue
+ * as that of management frames.
+ */
+ if (skb->protocol == cpu_to_be16(ETH_P_PAE))
+ usr_pri = WMI_VOICE_USER_PRIORITY;
}

/*
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 9966140..9076bec 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -106,6 +106,8 @@ struct wmi_data_sync_bufs {
#define WMM_AC_VI 2 /* video */
#define WMM_AC_VO 3 /* voice */

+#define WMI_VOICE_USER_PRIORITY 0x7
+
struct wmi {
u16 stream_exist_for_ac[WMM_NUM_AC];
u8 fat_pipe_exist;
--
1.7.10


2012-05-04 18:51:31

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath6kl_sdio: Fix the EAPOL out of order issue

On 05/02/2012 12:25 PM, Vivek Natarajan wrote:
> Send the EAPOL and management frames in the same AC_VO queue. The issue
> happens when the AP supports QOS, the management frames are sent to AC_VO
> queue and EAP frame goes to AC_BE queue. Even though the EAP frame is
> queued before the DEAUTH management frame, as they are queued on different
> h/w queues, order of delivery between these frames cannot be controlled.
>
> This fixes the connection failure seen in P2P case.
>
> Signed-off-by: Vivek Natarajan <[email protected]>

Thanks, applied.

Kalle