linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Reconfigure beacons after a merge run in IBSS mode
@ 2009-01-19  7:35 Sujith
  2009-01-19  8:29 ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Sujith @ 2009-01-19  7:35 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes, Jouni.Malinen

On completion of a merge scan run in IBSS mode, beacons have
to be reconfigured in the driver, so that the HW timers are updated
properly when coming back to the home channel. This patch fixes this issue.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
 net/mac80211/mlme.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 81c5cff..2b4ed5f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2295,8 +2295,9 @@ dont_join:
 	/* Selected IBSS not found in current scan results - try to scan */
 	if (ifsta->state == IEEE80211_STA_MLME_IBSS_JOINED &&
 	    !ieee80211_sta_active_ibss(sdata)) {
+		ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON);
 		mod_timer(&ifsta->timer, jiffies +
-				      IEEE80211_IBSS_MERGE_INTERVAL);
+			  IEEE80211_IBSS_MERGE_INTERVAL);
 	} else if (time_after(jiffies, local->last_scan_completed +
 			      IEEE80211_SCAN_INTERVAL)) {
 		printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to "
-- 
1.6.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Reconfigure beacons after a merge run in IBSS mode
  2009-01-19  7:35 [PATCH] mac80211: Reconfigure beacons after a merge run in IBSS mode Sujith
@ 2009-01-19  8:29 ` Johannes Berg
  2009-01-19  8:49   ` Sujith
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2009-01-19  8:29 UTC (permalink / raw)
  To: Sujith; +Cc: linville, linux-wireless, Jouni.Malinen

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

On Mon, 2009-01-19 at 13:05 +0530, Sujith wrote:
> On completion of a merge scan run in IBSS mode, beacons have
> to be reconfigured in the driver, so that the HW timers are updated
> properly when coming back to the home channel. This patch fixes this issue.

I think instead we should have an enable-beacon flag that we disable
before scanning, and then re-enable after scanning like here. That way,
we also don't need any extra code in the driver to stop beaconing before
scanning, and it generally helps too when userspace deletes the beacon
we stop beaconing in a controlled fashion.

The best way is probably to add a conf flag like CONF_PS and a change
flag for this, what do you think?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Reconfigure beacons after a merge run in IBSS mode
  2009-01-19  8:29 ` Johannes Berg
@ 2009-01-19  8:49   ` Sujith
  2009-01-19  8:56     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Sujith @ 2009-01-19  8:49 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Jouni Malinen

Johannes Berg wrote:
> I think instead we should have an enable-beacon flag that we disable
> before scanning, and then re-enable after scanning like here. That way,
> we also don't need any extra code in the driver to stop beaconing before
> scanning, and it generally helps too when userspace deletes the beacon
> we stop beaconing in a controlled fashion.

Yep, I did remember the earlier discussion, this seemed like a quick fix
for my IBSS troubles :)

> The best way is probably to add a conf flag like CONF_PS and a change
> flag for this, what do you think?

This has to be a per-interface flag, so it would be part of ieee80211_if_conf ?

Sujith

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Reconfigure beacons after a merge run in IBSS mode
  2009-01-19  8:49   ` Sujith
@ 2009-01-19  8:56     ` Johannes Berg
  2009-01-19  9:23       ` Sujith
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2009-01-19  8:56 UTC (permalink / raw)
  To: Sujith
  Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Jouni Malinen

[-- Attachment #1: Type: text/plain, Size: 911 bytes --]

On Mon, 2009-01-19 at 14:19 +0530, Sujith wrote:
> Johannes Berg wrote:
> > I think instead we should have an enable-beacon flag that we disable
> > before scanning, and then re-enable after scanning like here. That way,
> > we also don't need any extra code in the driver to stop beaconing before
> > scanning, and it generally helps too when userspace deletes the beacon
> > we stop beaconing in a controlled fashion.
> 
> Yep, I did remember the earlier discussion, this seemed like a quick fix
> for my IBSS troubles :)

:)
How do you disable beaconing to start with though?

> > The best way is probably to add a conf flag like CONF_PS and a change
> > flag for this, what do you think?
> 
> This has to be a per-interface flag, so it would be part of ieee80211_if_conf ?

Right, of course, sorry. And I don't care whether you add a flags field
or a bool beacon_enabled ;)

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mac80211: Reconfigure beacons after a merge run in IBSS mode
  2009-01-19  8:56     ` Johannes Berg
@ 2009-01-19  9:23       ` Sujith
  0 siblings, 0 replies; 5+ messages in thread
From: Sujith @ 2009-01-19  9:23 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	Jouni Malinen

Johannes Berg wrote:
> > Yep, I did remember the earlier discussion, this seemed like a quick fix
> > for my IBSS troubles :)
> 
> :)
> How do you disable beaconing to start with though?

We don't, and it seems to work, except that the beacons have to be reconfigured
on returning to the home channel.

Sujith

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-19  9:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19  7:35 [PATCH] mac80211: Reconfigure beacons after a merge run in IBSS mode Sujith
2009-01-19  8:29 ` Johannes Berg
2009-01-19  8:49   ` Sujith
2009-01-19  8:56     ` Johannes Berg
2009-01-19  9:23       ` Sujith

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).