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 <[email protected]>
---
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
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
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
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
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