* [PATCH v2] mac80211: Don't go off-channel in work_work unless needed.
@ 2010-09-29 19:05 greearb
2010-09-29 20:05 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: greearb @ 2010-09-29 19:05 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
If the work to be done is on the current active channel, then
do not call the offchannel and return-to-channel logic.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
v1 -> v2: Remove went_off_channel logic, and don't set
tmp_channel if we're not going offchannel.
:100644 100644 ae344d1... 8a2ff479.. M net/mac80211/work.c
net/mac80211/work.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index ae344d1..8a2ff479 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -910,12 +910,17 @@ static void ieee80211_work_work(struct work_struct *work)
* happen to be on the same channel as
* the requested channel
*/
- ieee80211_offchannel_stop_beaconing(local);
- ieee80211_offchannel_stop_station(local);
-
- local->tmp_channel = wk->chan;
- local->tmp_channel_type = wk->chan_type;
- ieee80211_hw_config(local, 0);
+ WARN_ON(local->scan_channel != NULL);
+ if (wk->chan != local->oper_channel ||
+ wk->chan_type != local->_oper_channel_type) {
+ /* Only change channels if we need to */
+ ieee80211_offchannel_stop_beaconing(local);
+ ieee80211_offchannel_stop_station(local);
+
+ local->tmp_channel = wk->chan;
+ local->tmp_channel_type = wk->chan_type;
+ ieee80211_hw_config(local, 0);
+ }
started = true;
wk->timeout = jiffies;
}
--
1.7.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] mac80211: Don't go off-channel in work_work unless needed.
2010-09-29 19:05 [PATCH v2] mac80211: Don't go off-channel in work_work unless needed greearb
@ 2010-09-29 20:05 ` Johannes Berg
2010-09-29 20:14 ` Ben Greear
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2010-09-29 20:05 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless
On Wed, 2010-09-29 at 12:05 -0700, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> If the work to be done is on the current active channel, then
> do not call the offchannel and return-to-channel logic.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> v1 -> v2: Remove went_off_channel logic, and don't set
> tmp_channel if we're not going offchannel.
I briefly grepped through the source and am pretty sure this'll break a
few things in mlme.c and even the work-on-same-channel logic in
work.c...
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mac80211: Don't go off-channel in work_work unless needed.
2010-09-29 20:05 ` Johannes Berg
@ 2010-09-29 20:14 ` Ben Greear
0 siblings, 0 replies; 3+ messages in thread
From: Ben Greear @ 2010-09-29 20:14 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 09/29/2010 01:05 PM, Johannes Berg wrote:
> On Wed, 2010-09-29 at 12:05 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> If the work to be done is on the current active channel, then
>> do not call the offchannel and return-to-channel logic.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>> ---
>> v1 -> v2: Remove went_off_channel logic, and don't set
>> tmp_channel if we're not going offchannel.
>
> I briefly grepped through the source and am pretty sure this'll break a
> few things in mlme.c and even the work-on-same-channel logic in
> work.c...
Ok. I don't understand this code enough to make more progress
here I think.
Thanks,
Ben
>
> johannes
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-29 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 19:05 [PATCH v2] mac80211: Don't go off-channel in work_work unless needed greearb
2010-09-29 20:05 ` Johannes Berg
2010-09-29 20:14 ` Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).