Skip to content

Commit

Permalink
cfg80211: respect API on orig_flags on channel for beacon hint
Browse files Browse the repository at this point in the history
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.

Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 22, 2009
1 parent 3eb9296 commit a4ed90d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit a4ed90d

Please sign in to comment.