2012-08-02 00:27:25

by Paul Stewart

[permalink] [raw]
Subject: [PATCH] cfg80211: Clear "beacon_found" on regulatory restore

Restore the default state to the "beacon_found" flag when
the channel flags are restored. Otherwise, we can end up
with a channel that we can no longer transmit on even when
we can see beacons on that channel.

Signed-off-by: Paul Stewart <[email protected]>
---
net/wireless/reg.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 2303ee7..cc6b4c4 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1885,6 +1885,7 @@ static void restore_custom_reg_settings(struct wiphy *wiphy)
chan->flags = chan->orig_flags;
chan->max_antenna_gain = chan->orig_mag;
chan->max_power = chan->orig_mpwr;
+ chan->beacon_found = false;
}
}
}
--
1.7.7.3



2012-08-02 13:34:08

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] cfg80211: Clear "beacon_found" on regulatory restore

On Wed, 2012-08-01 at 16:54 -0700, Paul Stewart wrote:
> Restore the default state to the "beacon_found" flag when
> the channel flags are restored. Otherwise, we can end up
> with a channel that we can no longer transmit on even when
> we can see beacons on that channel.

Makes sense, applied.

johannes