Skip to content

Commit

Permalink
ath: fix logic on ath_reg_apply_active_scan_flags()
Browse files Browse the repository at this point in the history
The existing logic removes the passive scan flag from
channels 12 and 13 when a regulatory hint coming from
something other than a country IE has been passed. This
is incorrect, the original intention was to ensure we
always have passive scan enabled for these two channels
for a specific set of custom world regulatory domains.

Cc: smihir@qti.qualcomm.com
Cc: tushnimb@qca.qualcomm.com
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Dec 5, 2013
1 parent cddc604 commit d44040d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/net/wireless/ath/regd.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,16 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
return;

/*
* If no country IE has been received always enable active scan
* on these channels. This is only done for specific regulatory SKUs
* If no country IE has been received always enable passive scan
* and no-ibss on these channels. This is only done for specific
* regulatory SKUs.
*/
if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
ch = &sband->channels[11]; /* CH 12 */
if (ch->flags & IEEE80211_CHAN_NO_IR)
ch->flags &= ~IEEE80211_CHAN_NO_IR;
ch->flags |= IEEE80211_CHAN_NO_IR;

ch = &sband->channels[12]; /* CH 13 */
if (ch->flags & IEEE80211_CHAN_NO_IR)
ch->flags &= ~IEEE80211_CHAN_NO_IR;
ch->flags |= IEEE80211_CHAN_NO_IR;
return;
}

Expand Down

0 comments on commit d44040d

Please sign in to comment.