Skip to content

Commit 8fe02e1

Browse files
mcgrofjmberg-intel
authored andcommitted
cfg80211: consolidate passive-scan and no-ibss flags
These two flags are used for the same purpose, just combine them into a no-ir flag to annotate no initiating radiation is allowed. Old userspace sending either flag will have it treated as the no-ir flag. To be considerate to older userspace we also send both the no-ir flag and the old no-ibss flags. Newer userspace will have to be aware of older kernels. Update all places in the tree using these flags with the following semantic patch: @@ @@ -NL80211_RRF_PASSIVE_SCAN +NL80211_RRF_NO_IR @@ @@ -NL80211_RRF_NO_IBSS +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_PASSIVE_SCAN +IEEE80211_CHAN_NO_IR @@ @@ -IEEE80211_CHAN_NO_IBSS +IEEE80211_CHAN_NO_IR @@ @@ -NL80211_RRF_NO_IR | NL80211_RRF_NO_IR +NL80211_RRF_NO_IR @@ @@ -IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR +IEEE80211_CHAN_NO_IR @@ @@ -(NL80211_RRF_NO_IR) +NL80211_RRF_NO_IR @@ @@ -(IEEE80211_CHAN_NO_IR) +IEEE80211_CHAN_NO_IR Along with some hand-optimisations in documentation, to remove duplicates and to fix some indentation. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> [do all the driver updates in one go] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent c17bff8 commit 8fe02e1

37 files changed

Lines changed: 197 additions & 230 deletions

File tree

‎Documentation/networking/regulatory.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ struct ieee80211_regdomain mydriver_jp_regdom = {
159159
REG_RULE(2412-20, 2484+20, 40, 6, 20, 0),
160160
/* IEEE 802.11a, channels 34..48 */
161161
REG_RULE(5170-20, 5240+20, 40, 6, 20,
162-
NL80211_RRF_PASSIVE_SCAN),
162+
NL80211_RRF_NO_IR),
163163
/* IEEE 802.11a, channels 52..64 */
164164
REG_RULE(5260-20, 5320+20, 40, 6, 20,
165-
NL80211_RRF_NO_IBSS |
165+
NL80211_RRF_NO_IR|
166166
NL80211_RRF_DFS),
167167
}
168168
};

‎drivers/net/wireless/ath/ath10k/mac.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,12 +1351,12 @@ static int ath10k_update_channel_list(struct ath10k *ar)
13511351
ch->allow_vht = true;
13521352

13531353
ch->allow_ibss =
1354-
!(channel->flags & IEEE80211_CHAN_NO_IBSS);
1354+
!(channel->flags & IEEE80211_CHAN_NO_IR);
13551355

13561356
ch->ht40plus =
13571357
!(channel->flags & IEEE80211_CHAN_NO_HT40PLUS);
13581358

1359-
passive = channel->flags & IEEE80211_CHAN_PASSIVE_SCAN;
1359+
passive = channel->flags & IEEE80211_CHAN_NO_IR;
13601360
ch->passive = passive;
13611361

13621362
ch->freq = channel->center_freq;

‎drivers/net/wireless/ath/regd.c‎

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,18 @@ static int __ath_regd_init(struct ath_regulatory *reg);
3737

3838
/* We enable active scan on these a case by case basis by regulatory domain */
3939
#define ATH9K_2GHZ_CH12_13 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
40-
NL80211_RRF_PASSIVE_SCAN)
40+
NL80211_RRF_NO_IR)
4141
#define ATH9K_2GHZ_CH14 REG_RULE(2484-10, 2484+10, 40, 0, 20,\
42-
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_OFDM)
42+
NL80211_RRF_NO_IR | \
43+
NL80211_RRF_NO_OFDM)
4344

4445
/* We allow IBSS on these on a case by case basis by regulatory domain */
4546
#define ATH9K_5GHZ_5150_5350 REG_RULE(5150-10, 5350+10, 80, 0, 30,\
46-
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
47+
NL80211_RRF_NO_IR)
4748
#define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 80, 0, 30,\
48-
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
49+
NL80211_RRF_NO_IR)
4950
#define ATH9K_5GHZ_5725_5850 REG_RULE(5725-10, 5850+10, 80, 0, 30,\
50-
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
51+
NL80211_RRF_NO_IR)
5152

5253
#define ATH9K_2GHZ_ALL ATH9K_2GHZ_CH01_11, \
5354
ATH9K_2GHZ_CH12_13, \
@@ -223,18 +224,11 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy,
223224
* default during init, prior to calling our
224225
* regulatory_hint().
225226
*/
226-
if (!(reg_rule->flags &
227-
NL80211_RRF_NO_IBSS))
228-
ch->flags &=
229-
~IEEE80211_CHAN_NO_IBSS;
230-
if (!(reg_rule->flags &
231-
NL80211_RRF_PASSIVE_SCAN))
232-
ch->flags &=
233-
~IEEE80211_CHAN_PASSIVE_SCAN;
227+
if (!(reg_rule->flags & NL80211_RRF_NO_IR))
228+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
234229
} else {
235230
if (ch->beacon_found)
236-
ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
237-
IEEE80211_CHAN_PASSIVE_SCAN);
231+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
238232
}
239233
}
240234
}
@@ -260,11 +254,11 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
260254
*/
261255
if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
262256
ch = &sband->channels[11]; /* CH 12 */
263-
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
264-
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
257+
if (ch->flags & IEEE80211_CHAN_NO_IR)
258+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
265259
ch = &sband->channels[12]; /* CH 13 */
266-
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
267-
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
260+
if (ch->flags & IEEE80211_CHAN_NO_IR)
261+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
268262
return;
269263
}
270264

@@ -278,17 +272,17 @@ ath_reg_apply_active_scan_flags(struct wiphy *wiphy,
278272
ch = &sband->channels[11]; /* CH 12 */
279273
reg_rule = freq_reg_info(wiphy, ch->center_freq);
280274
if (!IS_ERR(reg_rule)) {
281-
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
282-
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
283-
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
275+
if (!(reg_rule->flags & NL80211_RRF_NO_IR))
276+
if (ch->flags & IEEE80211_CHAN_NO_IR)
277+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
284278
}
285279

286280
ch = &sband->channels[12]; /* CH 13 */
287281
reg_rule = freq_reg_info(wiphy, ch->center_freq);
288282
if (!IS_ERR(reg_rule)) {
289-
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
290-
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
291-
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
283+
if (!(reg_rule->flags & NL80211_RRF_NO_IR))
284+
if (ch->flags & IEEE80211_CHAN_NO_IR)
285+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
292286
}
293287
}
294288

@@ -320,8 +314,7 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy)
320314
*/
321315
if (!(ch->flags & IEEE80211_CHAN_DISABLED))
322316
ch->flags |= IEEE80211_CHAN_RADAR |
323-
IEEE80211_CHAN_NO_IBSS |
324-
IEEE80211_CHAN_PASSIVE_SCAN;
317+
IEEE80211_CHAN_NO_IR;
325318
}
326319
}
327320

‎drivers/net/wireless/brcm80211/brcmfmac/p2p.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ static s32 brcmf_p2p_run_escan(struct brcmf_cfg80211_info *cfg,
812812
struct ieee80211_channel *chan = request->channels[i];
813813

814814
if (chan->flags & (IEEE80211_CHAN_RADAR |
815-
IEEE80211_CHAN_PASSIVE_SCAN))
815+
IEEE80211_CHAN_NO_IR))
816816
continue;
817817

818818
chanspecs[i] = channel_to_chanspec(&p2p->cfg->d11inf,

‎drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ static struct ieee80211_supported_band __wl_band_5ghz_a = {
202202

203203
/* This is to override regulatory domains defined in cfg80211 module (reg.c)
204204
* By default world regulatory domain defined in reg.c puts the flags
205-
* NL80211_RRF_PASSIVE_SCAN and NL80211_RRF_NO_IBSS for 5GHz channels (for
206-
* 36..48 and 149..165). With respect to these flags, wpa_supplicant doesn't
207-
* start p2p operations on 5GHz channels. All the changes in world regulatory
205+
* NL80211_RRF_NO_IR for 5GHz channels (for * 36..48 and 149..165).
206+
* With respect to these flags, wpa_supplicant doesn't * start p2p
207+
* operations on 5GHz channels. All the changes in world regulatory
208208
* domain are to be done here.
209209
*/
210210
static const struct ieee80211_regdomain brcmf_regdom = {
@@ -5197,10 +5197,10 @@ static s32 brcmf_construct_reginfo(struct brcmf_cfg80211_info *cfg, u32 bw_cap)
51975197
if (channel & WL_CHAN_RADAR)
51985198
band_chan_arr[index].flags |=
51995199
(IEEE80211_CHAN_RADAR |
5200-
IEEE80211_CHAN_NO_IBSS);
5200+
IEEE80211_CHAN_NO_IR);
52015201
if (channel & WL_CHAN_PASSIVE)
52025202
band_chan_arr[index].flags |=
5203-
IEEE80211_CHAN_PASSIVE_SCAN;
5203+
IEEE80211_CHAN_NO_IR;
52045204
}
52055205
}
52065206
if (!update)

‎drivers/net/wireless/brcm80211/brcmsmac/channel.c‎

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,18 @@
5959

6060
#define BRCM_2GHZ_2412_2462 REG_RULE(2412-10, 2462+10, 40, 0, 19, 0)
6161
#define BRCM_2GHZ_2467_2472 REG_RULE(2467-10, 2472+10, 20, 0, 19, \
62-
NL80211_RRF_PASSIVE_SCAN | \
63-
NL80211_RRF_NO_IBSS)
62+
NL80211_RRF_NO_IR)
6463

6564
#define BRCM_5GHZ_5180_5240 REG_RULE(5180-10, 5240+10, 40, 0, 21, \
66-
NL80211_RRF_PASSIVE_SCAN | \
67-
NL80211_RRF_NO_IBSS)
65+
NL80211_RRF_NO_IR)
6866
#define BRCM_5GHZ_5260_5320 REG_RULE(5260-10, 5320+10, 40, 0, 21, \
69-
NL80211_RRF_PASSIVE_SCAN | \
7067
NL80211_RRF_DFS | \
71-
NL80211_RRF_NO_IBSS)
68+
NL80211_RRF_NO_IR)
7269
#define BRCM_5GHZ_5500_5700 REG_RULE(5500-10, 5700+10, 40, 0, 21, \
73-
NL80211_RRF_PASSIVE_SCAN | \
7470
NL80211_RRF_DFS | \
75-
NL80211_RRF_NO_IBSS)
71+
NL80211_RRF_NO_IR)
7672
#define BRCM_5GHZ_5745_5825 REG_RULE(5745-10, 5825+10, 40, 0, 21, \
77-
NL80211_RRF_PASSIVE_SCAN | \
78-
NL80211_RRF_NO_IBSS)
73+
NL80211_RRF_NO_IR)
7974

8075
static const struct ieee80211_regdomain brcms_regdom_x2 = {
8176
.n_reg_rules = 6,
@@ -395,7 +390,7 @@ brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm, u16 chanspec,
395390
brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false);
396391

397392
brcms_b_set_chanspec(wlc->hw, chanspec,
398-
!!(ch->flags & IEEE80211_CHAN_PASSIVE_SCAN),
393+
!!(ch->flags & IEEE80211_CHAN_NO_IR),
399394
&txpwr);
400395
}
401396

@@ -657,8 +652,8 @@ static void brcms_reg_apply_radar_flags(struct wiphy *wiphy)
657652
*/
658653
if (!(ch->flags & IEEE80211_CHAN_DISABLED))
659654
ch->flags |= IEEE80211_CHAN_RADAR |
660-
IEEE80211_CHAN_NO_IBSS |
661-
IEEE80211_CHAN_PASSIVE_SCAN;
655+
IEEE80211_CHAN_NO_IR |
656+
IEEE80211_CHAN_NO_IR;
662657
}
663658
}
664659

@@ -688,14 +683,10 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy,
688683
if (IS_ERR(rule))
689684
continue;
690685

691-
if (!(rule->flags & NL80211_RRF_NO_IBSS))
692-
ch->flags &= ~IEEE80211_CHAN_NO_IBSS;
693-
if (!(rule->flags & NL80211_RRF_PASSIVE_SCAN))
694-
ch->flags &=
695-
~IEEE80211_CHAN_PASSIVE_SCAN;
686+
if (!(rule->flags & NL80211_RRF_NO_IR))
687+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
696688
} else if (ch->beacon_found) {
697-
ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
698-
IEEE80211_CHAN_PASSIVE_SCAN);
689+
ch->flags &= ~IEEE80211_CHAN_NO_IR;
699690
}
700691
}
701692
}

‎drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c‎

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ static struct ieee80211_channel brcms_2ghz_chantable[] = {
125125
CHAN2GHZ(10, 2457, IEEE80211_CHAN_NO_HT40PLUS),
126126
CHAN2GHZ(11, 2462, IEEE80211_CHAN_NO_HT40PLUS),
127127
CHAN2GHZ(12, 2467,
128-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_IBSS |
128+
IEEE80211_CHAN_NO_IR |
129129
IEEE80211_CHAN_NO_HT40PLUS),
130130
CHAN2GHZ(13, 2472,
131-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_IBSS |
131+
IEEE80211_CHAN_NO_IR |
132132
IEEE80211_CHAN_NO_HT40PLUS),
133133
CHAN2GHZ(14, 2484,
134-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_IBSS |
134+
IEEE80211_CHAN_NO_IR |
135135
IEEE80211_CHAN_NO_HT40PLUS | IEEE80211_CHAN_NO_HT40MINUS |
136136
IEEE80211_CHAN_NO_OFDM)
137137
};
@@ -144,51 +144,51 @@ static struct ieee80211_channel brcms_5ghz_nphy_chantable[] = {
144144
CHAN5GHZ(48, IEEE80211_CHAN_NO_HT40PLUS),
145145
/* UNII-2 */
146146
CHAN5GHZ(52,
147-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
148-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40MINUS),
147+
IEEE80211_CHAN_RADAR |
148+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40MINUS),
149149
CHAN5GHZ(56,
150-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
151-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS),
150+
IEEE80211_CHAN_RADAR |
151+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS),
152152
CHAN5GHZ(60,
153-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
154-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40MINUS),
153+
IEEE80211_CHAN_RADAR |
154+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40MINUS),
155155
CHAN5GHZ(64,
156-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
157-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS),
156+
IEEE80211_CHAN_RADAR |
157+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS),
158158
/* MID */
159159
CHAN5GHZ(100,
160-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
161-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40MINUS),
160+
IEEE80211_CHAN_RADAR |
161+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40MINUS),
162162
CHAN5GHZ(104,
163-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
164-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS),
163+
IEEE80211_CHAN_RADAR |
164+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS),
165165
CHAN5GHZ(108,
166-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
167-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40MINUS),
166+
IEEE80211_CHAN_RADAR |
167+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40MINUS),
168168
CHAN5GHZ(112,
169-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
170-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS),
169+
IEEE80211_CHAN_RADAR |
170+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS),
171171
CHAN5GHZ(116,
172-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
173-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40MINUS),
172+
IEEE80211_CHAN_RADAR |
173+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40MINUS),
174174
CHAN5GHZ(120,
175-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
176-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS),
175+
IEEE80211_CHAN_RADAR |
176+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS),
177177
CHAN5GHZ(124,
178-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
179-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40MINUS),
178+
IEEE80211_CHAN_RADAR |
179+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40MINUS),
180180
CHAN5GHZ(128,
181-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
182-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS),
181+
IEEE80211_CHAN_RADAR |
182+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS),
183183
CHAN5GHZ(132,
184-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
185-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40MINUS),
184+
IEEE80211_CHAN_RADAR |
185+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40MINUS),
186186
CHAN5GHZ(136,
187-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
188-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS),
187+
IEEE80211_CHAN_RADAR |
188+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS),
189189
CHAN5GHZ(140,
190-
IEEE80211_CHAN_RADAR | IEEE80211_CHAN_NO_IBSS |
191-
IEEE80211_CHAN_PASSIVE_SCAN | IEEE80211_CHAN_NO_HT40PLUS |
190+
IEEE80211_CHAN_RADAR |
191+
IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_HT40PLUS |
192192
IEEE80211_CHAN_NO_HT40MINUS),
193193
/* UNII-3 */
194194
CHAN5GHZ(149, IEEE80211_CHAN_NO_HT40MINUS),

‎drivers/net/wireless/cw1200/scan.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ void cw1200_scan_work(struct work_struct *work)
197197
if ((*it)->band != first->band)
198198
break;
199199
if (((*it)->flags ^ first->flags) &
200-
IEEE80211_CHAN_PASSIVE_SCAN)
200+
IEEE80211_CHAN_NO_IR)
201201
break;
202-
if (!(first->flags & IEEE80211_CHAN_PASSIVE_SCAN) &&
202+
if (!(first->flags & IEEE80211_CHAN_NO_IR) &&
203203
(*it)->max_power != first->max_power)
204204
break;
205205
}
@@ -210,7 +210,7 @@ void cw1200_scan_work(struct work_struct *work)
210210
else
211211
scan.max_tx_rate = WSM_TRANSMIT_RATE_1;
212212
scan.num_probes =
213-
(first->flags & IEEE80211_CHAN_PASSIVE_SCAN) ? 0 : 2;
213+
(first->flags & IEEE80211_CHAN_NO_IR) ? 0 : 2;
214214
scan.num_ssids = priv->scan.n_ssids;
215215
scan.ssids = &priv->scan.ssids[0];
216216
scan.num_channels = it - priv->scan.curr;
@@ -233,15 +233,15 @@ void cw1200_scan_work(struct work_struct *work)
233233
}
234234
for (i = 0; i < scan.num_channels; ++i) {
235235
scan.ch[i].number = priv->scan.curr[i]->hw_value;
236-
if (priv->scan.curr[i]->flags & IEEE80211_CHAN_PASSIVE_SCAN) {
236+
if (priv->scan.curr[i]->flags & IEEE80211_CHAN_NO_IR) {
237237
scan.ch[i].min_chan_time = 50;
238238
scan.ch[i].max_chan_time = 100;
239239
} else {
240240
scan.ch[i].min_chan_time = 10;
241241
scan.ch[i].max_chan_time = 25;
242242
}
243243
}
244-
if (!(first->flags & IEEE80211_CHAN_PASSIVE_SCAN) &&
244+
if (!(first->flags & IEEE80211_CHAN_NO_IR) &&
245245
priv->scan.output_power != first->max_power) {
246246
priv->scan.output_power = first->max_power;
247247
wsm_set_output_power(priv,

‎drivers/net/wireless/ipw2x00/ipw2100.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,10 +1930,10 @@ static int ipw2100_wdev_init(struct net_device *dev)
19301930
bg_band->channels[i].max_power = geo->bg[i].max_power;
19311931
if (geo->bg[i].flags & LIBIPW_CH_PASSIVE_ONLY)
19321932
bg_band->channels[i].flags |=
1933-
IEEE80211_CHAN_PASSIVE_SCAN;
1933+
IEEE80211_CHAN_NO_IR;
19341934
if (geo->bg[i].flags & LIBIPW_CH_NO_IBSS)
19351935
bg_band->channels[i].flags |=
1936-
IEEE80211_CHAN_NO_IBSS;
1936+
IEEE80211_CHAN_NO_IR;
19371937
if (geo->bg[i].flags & LIBIPW_CH_RADAR_DETECT)
19381938
bg_band->channels[i].flags |=
19391939
IEEE80211_CHAN_RADAR;

0 commit comments

Comments
 (0)