Return-path: Received: from ug-out-1314.google.com ([66.249.92.168]:12518 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750823AbYKXNLv (ORCPT ); Mon, 24 Nov 2008 08:11:51 -0500 Received: by ug-out-1314.google.com with SMTP id 39so732066ugf.37 for ; Mon, 24 Nov 2008 05:11:49 -0800 (PST) Message-ID: (sfid-20081124_141156_370554_897F769A) Date: Mon, 24 Nov 2008 14:11:49 +0100 From: "Stefan Steuerwald" To: "Johannes Berg" Subject: Re: Fwd: p54: testing AP mode: cannot switch to master mode Cc: "Holger Schurig" , linux-wireless@vger.kernel.org In-Reply-To: <1227450758.3599.48.camel@johannes.berg> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 References: <200811201537.19047.hs4233@mail.mn-solutions.de> <200811210838.25977.hs4233@mail.mn-solutions.de> <1227450758.3599.48.camel@johannes.berg> Sender: linux-wireless-owner@vger.kernel.org List-ID: Hello Johannes, thank you for providing this patch. Tested, but I'm not sure about the result. I THINK the frequency of my app-level timeouts is reduced, but I'm not really sure. In any case it doesn't break anything for me. I'm investigating this reason for my timeouts: http://marc.info/?l=linux-wireless&m=122727674810057&w=2 and have better log info to post, will followup there. Thank you, Stefan. 2008/11/23 Johannes Berg : > Can you trhis this patch? > > Also, next time please don't filter the captures so much, it made it > hard to diagnose the problem. > > johannes > > > Subject: mac80211: only transition STAs ps->wake on data frames > > When a station goes to PS mode to scan, it will then send > probe requests without the PS bit set. mac80211 will take > that as indication that the station woke up, but it didn't. > This patch changes mac80211 to only consider doze->wake > transitions on data frames to to fix that issue. > > Signed-off-by: Johannes Berg > --- > net/mac80211/rx.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > --- everything.orig/net/mac80211/rx.c 2008-11-23 14:58:21.000000000 +0100 > +++ everything/net/mac80211/rx.c 2008-11-23 14:59:58.000000000 +0100 > @@ -750,9 +750,11 @@ ieee80211_rx_h_sta_process(struct ieee80 > /* Change STA power saving mode only in the end of a frame > * exchange sequence */ > if (test_sta_flags(sta, WLAN_STA_PS) && > - !ieee80211_has_pm(hdr->frame_control)) > - rx->sent_ps_buffered += ap_sta_ps_end(sta); > - else if (!test_sta_flags(sta, WLAN_STA_PS) && > + !ieee80211_has_pm(hdr->frame_control)) { > + /* ignore PS bit on non-data frames */ > + if (ieee80211_is_data(hdr->frame_control)) > + rx->sent_ps_buffered += ap_sta_ps_end(sta); > + } else if (!test_sta_flags(sta, WLAN_STA_PS) && > ieee80211_has_pm(hdr->frame_control)) > ap_sta_ps_start(sta); > } > > >