From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: linville@tuxdriver.com, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, janusz.dziedzic@tieto.com,
smihir@qti.qualcomm.com, tushnimb@qca.qualcomm.com,
"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: [PATCH 09/14] rtlwifi: consolidate no-ibss and passive scan to no-ir
Date: Mon, 21 Oct 2013 19:22:33 +0200 [thread overview]
Message-ID: <1382376158-25586-10-git-send-email-mcgrof@do-not-panic.com> (raw)
In-Reply-To: <1382376158-25586-1-git-send-email-mcgrof@do-not-panic.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
drivers/net/wireless/rtlwifi/regd.c | 48 ++++++++++++++++---------------------
1 file changed, 20 insertions(+), 28 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/regd.c b/drivers/net/wireless/rtlwifi/regd.c
index d7d0d49..2e1642c 100644
--- a/drivers/net/wireless/rtlwifi/regd.c
+++ b/drivers/net/wireless/rtlwifi/regd.c
@@ -59,30 +59,27 @@ static struct country_code_to_enum_rd allCountries[] = {
*/
#define RTL819x_2GHZ_CH12_13 \
REG_RULE(2467-10, 2472+10, 40, 0, 20,\
- NL80211_RRF_PASSIVE_SCAN)
+ NL80211_RRF_NO_IR)
#define RTL819x_2GHZ_CH14 \
REG_RULE(2484-10, 2484+10, 40, 0, 20, \
- NL80211_RRF_PASSIVE_SCAN | \
+ NL80211_RRF_NO_IR | \
NL80211_RRF_NO_OFDM)
/* 5G chan 36 - chan 64*/
#define RTL819x_5GHZ_5150_5350 \
REG_RULE(5150-10, 5350+10, 40, 0, 30, \
- NL80211_RRF_PASSIVE_SCAN | \
- NL80211_RRF_NO_IBSS)
+ NL80211_RRF_NO_IR)
/* 5G chan 100 - chan 165*/
#define RTL819x_5GHZ_5470_5850 \
REG_RULE(5470-10, 5850+10, 40, 0, 30, \
- NL80211_RRF_PASSIVE_SCAN | \
- NL80211_RRF_NO_IBSS)
+ NL80211_RRF_NO_IR)
/* 5G chan 149 - chan 165*/
#define RTL819x_5GHZ_5725_5850 \
REG_RULE(5725-10, 5850+10, 40, 0, 30, \
- NL80211_RRF_PASSIVE_SCAN | \
- NL80211_RRF_NO_IBSS)
+ NL80211_RRF_NO_IR)
#define RTL819x_5GHZ_ALL \
(RTL819x_5GHZ_5150_5350, RTL819x_5GHZ_5470_5850)
@@ -185,16 +182,12 @@ static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy,
*regulatory_hint().
*/
- if (!(reg_rule->flags & NL80211_RRF_NO_IBSS))
- ch->flags &= ~IEEE80211_CHAN_NO_IBSS;
- if (!(reg_rule->
- flags & NL80211_RRF_PASSIVE_SCAN))
- ch->flags &=
- ~IEEE80211_CHAN_PASSIVE_SCAN;
+ if (!(reg_rule->flags & NL80211_RRF_NO_IR))
+ ch->flags &= ~IEEE80211_CHAN_NO_IR;
} else {
if (ch->beacon_found)
- ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
- IEEE80211_CHAN_PASSIVE_SCAN);
+ ch->flags &= ~(IEEE80211_CHAN_NO_IR |
+ IEEE80211_CHAN_NO_IR);
}
}
}
@@ -219,11 +212,11 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
*/
if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
ch = &sband->channels[11]; /* CH 12 */
- if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
- ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
+ if (ch->flags & IEEE80211_CHAN_NO_IR)
+ ch->flags &= ~IEEE80211_CHAN_NO_IR;
ch = &sband->channels[12]; /* CH 13 */
- if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
- ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
+ if (ch->flags & IEEE80211_CHAN_NO_IR)
+ ch->flags &= ~IEEE80211_CHAN_NO_IR;
return;
}
@@ -237,17 +230,17 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
ch = &sband->channels[11]; /* CH 12 */
reg_rule = freq_reg_info(wiphy, ch->center_freq);
if (!IS_ERR(reg_rule)) {
- if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
- if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
- ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
+ if (!(reg_rule->flags & NL80211_RRF_NO_IR))
+ if (ch->flags & IEEE80211_CHAN_NO_IR)
+ ch->flags &= ~IEEE80211_CHAN_NO_IR;
}
ch = &sband->channels[12]; /* CH 13 */
reg_rule = freq_reg_info(wiphy, ch->center_freq);
if (!IS_ERR(reg_rule)) {
- if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
- if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
- ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
+ if (!(reg_rule->flags & NL80211_RRF_NO_IR))
+ if (ch->flags & IEEE80211_CHAN_NO_IR)
+ ch->flags &= ~IEEE80211_CHAN_NO_IR;
}
}
@@ -284,8 +277,7 @@ static void _rtl_reg_apply_radar_flags(struct wiphy *wiphy)
*/
if (!(ch->flags & IEEE80211_CHAN_DISABLED))
ch->flags |= IEEE80211_CHAN_RADAR |
- IEEE80211_CHAN_NO_IBSS |
- IEEE80211_CHAN_PASSIVE_SCAN;
+ IEEE80211_CHAN_NO_IR;
}
}
--
1.8.4.rc3
next prev parent reply other threads:[~2013-10-21 17:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 17:22 [PATCH 00/14] wlan: consolidate passive-scan and no-ibss flags Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 01/14] cfg80211: " Luis R. Rodriguez
2013-10-28 14:42 ` Johannes Berg
2013-10-28 14:49 ` Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 02/14] ath: consolidate no-ibss and passive scan to no-ir Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 03/14] ath10k: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 04/14] brcm80211: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 05/14] ipw2x00: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 06/14] mac80211_hwsim: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 07/14] mwifiex: " Luis R. Rodriguez
2013-10-22 22:21 ` Bing Zhao
2013-10-21 17:22 ` [PATCH 08/14] iwlegacy: " Luis R. Rodriguez
2013-10-21 17:22 ` Luis R. Rodriguez [this message]
2013-10-21 17:22 ` [PATCH 10/14] mac80211: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 11/14] ti: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 12/14] cw1200: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 13/14] iwlwifi: " Luis R. Rodriguez
2013-10-21 17:22 ` [PATCH 14/14] cfg80211: remove internal passive-scan and no-ibss guards Luis R. Rodriguez
2013-10-31 16:34 ` [PATCH 00/14] wlan: consolidate passive-scan and no-ibss flags Johannes Berg
2013-10-31 16:42 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382376158-25586-10-git-send-email-mcgrof@do-not-panic.com \
--to=mcgrof@do-not-panic.com \
--cc=Larry.Finger@lwfinger.net \
--cc=janusz.dziedzic@tieto.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=smihir@qti.qualcomm.com \
--cc=tushnimb@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).