diff mbox

[OpenWrt-Devel,v2,package] mwlwifi: generate TX_STATUS event on transmitting auth, associate, and reallocate responses

Message ID ED364045-D7CD-4116-B005-E9B5F58AAB42@patfruth.com
State Superseded
Headers show

Commit Message

Pat Fruth March 20, 2015, 1:32 a.m. UTC
> On Mar 18, 2015, at 10:05 PM, Ian Kent <raven@themaw.net> wrote:
> 
> On Wed, 2015-03-18 at 21:40 -0600, Pat Fruth wrote:
>> This patch addresses an issue specific to Apple devices experiencing a wireless disconnect when trying to associate with either 2.4Ghz or 5Ghz wifi of a Linksys WRT1900AC router.
>> Apple devices (MacBooks running Mac OS X 10.10.x Yosemite in particular, but there may be others), appear to re-auth/re-associate within approximately 25 seconds of initially associating.
>> Evidence of this can be seen by the presence of an entry similar to the following in the Apple system logs;
>> 	MM/DD/YY HH:MM:SS.sss AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid xx:xx:xx:xx:xx:xx
>> The Marvell wifi driver doesn’t generate a NL80211_CMD_FRAME_TX_STATUS event on transmitting a response to auth and/or reassociate requests.  Thus, the respective callback handler functions (in hostapd’s ieee802_11.c) never get driven, ultimately leading to the problem.
>> The patch causes a TX_STATUS event to be generated for auth and reassociate request’s responses, in addition to associate request’s responses.
>> 
>> Signed-off-by: Pat Fruth <pat@patfruth.comt>
>> ---
>> .../mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch   | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>> create mode 100644 package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
>> 
>> diff --git a/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
>> new file mode 100644
>> index 0000000..5f0d7fb
>> --- /dev/null
>> +++ b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
>> @@ -0,0 +1,14 @@
>> +--- a/mwl_tx.c
>> ++++ b/mwl_tx.c
>> +@@ -395,7 +395,10 @@ void mwl_tx_done(unsigned long data)
>> + 
>> + 				tr = (struct mwl_dma_data *)done_skb->data;
>> + 
>> +-				if (ieee80211_is_assoc_resp(tr->wh.frame_control)) {
>> ++				// if (ieee80211_is_assoc_resp(tr->wh.frame_control)) {
>> ++				if (ieee80211_is_assoc_resp(tr->wh.frame_control) ||
>> ++				    ieee80211_is_reassoc_resp(tr->wh.frame_control) ||
>> ++				    ieee80211_is_auth(tr->wh.frame_control)) {
>> + 
>> + 					/* Remove H/W dma header
>> + 					*/
> 
> I don't think there's anything to be gained by commenting out the
> original line. It only adds extra noise and the change that's been made
> is evident from the log.
> 
> Ian
> 

Thanks Ian.
Fair enough.
Here’s the patch, this time without the commented line of code.

Signed-off-by: Pat Fruth <pat@patfruth.com>
---
 .../mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch    | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch

--
1.9.1

Comments

Ian Kent March 20, 2015, 2:28 a.m. UTC | #1
On Thu, 2015-03-19 at 19:32 -0600, Pat Fruth wrote:
> > On Mar 18, 2015, at 10:05 PM, Ian Kent <raven@themaw.net> wrote:
> > 
> > On Wed, 2015-03-18 at 21:40 -0600, Pat Fruth wrote:
> >> This patch addresses an issue specific to Apple devices experiencing a wireless disconnect when trying to associate with either 2.4Ghz or 5Ghz wifi of a Linksys WRT1900AC router.
> >> Apple devices (MacBooks running Mac OS X 10.10.x Yosemite in particular, but there may be others), appear to re-auth/re-associate within approximately 25 seconds of initially associating.
> >> Evidence of this can be seen by the presence of an entry similar to the following in the Apple system logs;
> >> 	MM/DD/YY HH:MM:SS.sss AM kernel[0]: wl0: Roamed or switched channel, reason #8, bssid xx:xx:xx:xx:xx:xx
> >> The Marvell wifi driver doesn’t generate a NL80211_CMD_FRAME_TX_STATUS event on transmitting a response to auth and/or reassociate requests.  Thus, the respective callback handler functions (in hostapd’s ieee802_11.c) never get driven, ultimately leading to the problem.
> >> The patch causes a TX_STATUS event to be generated for auth and reassociate request’s responses, in addition to associate request’s responses.
> >> 
> >> Signed-off-by: Pat Fruth <pat@patfruth.comt>
> >> ---
> >> .../mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch   | 14 ++++++++++++++
> >> 1 file changed, 14 insertions(+)
> >> create mode 100644 package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
> >> 
> >> diff --git a/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
> >> new file mode 100644
> >> index 0000000..5f0d7fb
> >> --- /dev/null
> >> +++ b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
> >> @@ -0,0 +1,14 @@
> >> +--- a/mwl_tx.c
> >> ++++ b/mwl_tx.c
> >> +@@ -395,7 +395,10 @@ void mwl_tx_done(unsigned long data)
> >> + 
> >> + 				tr = (struct mwl_dma_data *)done_skb->data;
> >> + 
> >> +-				if (ieee80211_is_assoc_resp(tr->wh.frame_control)) {
> >> ++				// if (ieee80211_is_assoc_resp(tr->wh.frame_control)) {
> >> ++				if (ieee80211_is_assoc_resp(tr->wh.frame_control) ||
> >> ++				    ieee80211_is_reassoc_resp(tr->wh.frame_control) ||
> >> ++				    ieee80211_is_auth(tr->wh.frame_control)) {
> >> + 
> >> + 					/* Remove H/W dma header
> >> + 					*/
> > 
> > I don't think there's anything to be gained by commenting out the
> > original line. It only adds extra noise and the change that's been made
> > is evident from the log.
> > 
> > Ian
> > 
> 
> Thanks Ian.
> Fair enough.
> Here’s the patch, this time without the commented line of code.

I think the process is that we should send changes to the component
maintainer, cc OpenWrt-devel, since maintainers might miss the post.

Imre, is this change acceptable, what other changes are needed, should
Pat re-submit this afresh or is what's here OK?

> 
> Signed-off-by: Pat Fruth <pat@patfruth.com>
> ---
>  .../mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch    | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>  create mode 100644 package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
> 
> diff --git a/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
> new file mode 100644
> index 0000000..f454cc5
> --- /dev/null
> +++ b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
> @@ -0,0 +1,13 @@
> +--- a/mwl_tx.c
> ++++ b/mwl_tx.c
> +@@ -395,7 +395,9 @@ void mwl_tx_done(unsigned long data)
> +
> +                               tr = (struct mwl_dma_data *)done_skb->data;
> +
> +-                              if (ieee80211_is_assoc_resp(tr->wh.frame_control)) {
> ++                              if (ieee80211_is_assoc_resp(tr->wh.frame_control) ||
> ++                                  ieee80211_is_reassoc_resp(tr->wh.frame_control) ||
> ++                                  ieee80211_is_auth(tr->wh.frame_control)) {
> +
> +                                       /* Remove H/W dma header
> +                                       */
> --
> 1.9.1
> 
>
Imre Kaloz March 20, 2015, 3 p.m. UTC | #2
On Fri, 20 Mar 2015 03:28:23 +0100, Ian Kent <raven@themaw.net> wrote:

<snip>

> I think the process is that we should send changes to the component
> maintainer, cc OpenWrt-devel, since maintainers might miss the post.
>
> Imre, is this change acceptable, what other changes are needed, should
> Pat re-submit this afresh or is what's here OK?

Patches against mwlwifi should be sent there, but a new version has been  
released already which has this fix among a lot of others. I'm waiting for  
a few people who had issues to confirm the test image I've uploaded works  
for them before pushing the changes to trunk.


Imre
diff mbox

Patch

diff --git a/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
new file mode 100644
index 0000000..f454cc5
--- /dev/null
+++ b/package/kernel/mwlwifi/patches/002_TX-STATUS-for-reassoc-auth.patch
@@ -0,0 +1,13 @@ 
+--- a/mwl_tx.c
++++ b/mwl_tx.c
+@@ -395,7 +395,9 @@ void mwl_tx_done(unsigned long data)
+
+                               tr = (struct mwl_dma_data *)done_skb->data;
+
+-                              if (ieee80211_is_assoc_resp(tr->wh.frame_control)) {
++                              if (ieee80211_is_assoc_resp(tr->wh.frame_control) ||
++                                  ieee80211_is_reassoc_resp(tr->wh.frame_control) ||
++                                  ieee80211_is_auth(tr->wh.frame_control)) {
+
+                                       /* Remove H/W dma header
+                                       */