public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/3] cfg80211: respect API on orig_flags on channel for beacon hint
@ 2009-04-02  1:35 Luis R. Rodriguez
  2009-04-02  1:35 ` [PATCH v3 2/3] cfg80211: add netlink channel put helper Luis R. Rodriguez
  2009-04-02  1:35 ` [PATCH v3 3/3] cfg80211: send regulatory beacon hint events to userspace Luis R. Rodriguez
  0 siblings, 2 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-04-02  1:35 UTC (permalink / raw)
  To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez

As part of our documented API we always respect the orig_flag
settings on a channel. We forgot to follow this for the beacon
hints.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 net/wireless/reg.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 6327e16..c3e39e1 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1070,12 +1070,14 @@ static void handle_reg_beacon(struct wiphy *wiphy,
 	if (likely(chan->center_freq != reg_beacon->chan.center_freq))
 		return;
 
-	if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) {
+	if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) &&
+	    !(chan->orig_flags & IEEE80211_CHAN_PASSIVE_SCAN)) {
 		chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
 		REG_DEBUG_BEACON_FLAG("active scanning");
 	}
 
-	if (chan->flags & IEEE80211_CHAN_NO_IBSS) {
+	if ((chan->flags & IEEE80211_CHAN_NO_IBSS) &&
+	    !(chan->orig_flags & IEEE80211_CHAN_NO_IBSS)) {
 		chan->flags &= ~IEEE80211_CHAN_NO_IBSS;
 		REG_DEBUG_BEACON_FLAG("beaconing");
 	}
-- 
1.6.0.6


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

end of thread, other threads:[~2009-04-02  1:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02  1:35 [PATCH v3 1/3] cfg80211: respect API on orig_flags on channel for beacon hint Luis R. Rodriguez
2009-04-02  1:35 ` [PATCH v3 2/3] cfg80211: add netlink channel put helper Luis R. Rodriguez
2009-04-02  1:35 ` [PATCH v3 3/3] cfg80211: send regulatory beacon hint events to userspace Luis R. Rodriguez
2009-04-02  1:46   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox