blob: a62bf0a65c321bb73553c403c5233ccd30d1f8c7 [file] [log] [blame]
Larry Finger0c817332010-12-08 11:12:31 -06001/******************************************************************************
2 *
Larry Fingera8d76062012-01-07 20:46:42 -06003 * Copyright(c) 2009-2012 Realtek Corporation.
Larry Finger0c817332010-12-08 11:12:31 -06004 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
Larry Finger0c817332010-12-08 11:12:31 -060014 * The full GNU General Public License is included in this distribution in the
15 * file called LICENSE.
16 *
17 * Contact Information:
18 * wlanfae <wlanfae@realtek.com>
19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20 * Hsinchu 300, Taiwan.
21 *
22 * Larry Finger <Larry.Finger@lwfinger.net>
23 *
24 *****************************************************************************/
25
26#include "wifi.h"
27#include "regd.h"
28
29static struct country_code_to_enum_rd allCountries[] = {
30 {COUNTRY_CODE_FCC, "US"},
31 {COUNTRY_CODE_IC, "US"},
32 {COUNTRY_CODE_ETSI, "EC"},
33 {COUNTRY_CODE_SPAIN, "EC"},
34 {COUNTRY_CODE_FRANCE, "EC"},
35 {COUNTRY_CODE_MKK, "JP"},
36 {COUNTRY_CODE_MKK1, "JP"},
37 {COUNTRY_CODE_ISRAEL, "EC"},
38 {COUNTRY_CODE_TELEC, "JP"},
39 {COUNTRY_CODE_MIC, "JP"},
40 {COUNTRY_CODE_GLOBAL_DOMAIN, "JP"},
41 {COUNTRY_CODE_WORLD_WIDE_13, "EC"},
42 {COUNTRY_CODE_TELEC_NETGEAR, "EC"},
Shao Fu02b5fff2015-05-15 16:32:59 -050043 {COUNTRY_CODE_WORLD_WIDE_13_5G_ALL, "US"},
Larry Finger0c817332010-12-08 11:12:31 -060044};
45
46/*
47 *Only these channels all allow active
48 *scan on all world regulatory domains
49 */
50#define RTL819x_2GHZ_CH01_11 \
51 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
52
53/*
54 *We enable active scan on these a case
55 *by case basis by regulatory domain
56 */
57#define RTL819x_2GHZ_CH12_13 \
58 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
Larry Fingerf3a97e92014-09-22 09:39:24 -050059 NL80211_RRF_PASSIVE_SCAN)
Larry Finger0c817332010-12-08 11:12:31 -060060
61#define RTL819x_2GHZ_CH14 \
62 REG_RULE(2484-10, 2484+10, 40, 0, 20, \
Larry Fingerf3a97e92014-09-22 09:39:24 -050063 NL80211_RRF_PASSIVE_SCAN | \
64 NL80211_RRF_NO_OFDM)
65
Larry Finger0c817332010-12-08 11:12:31 -060066
Chaoming_Li81b29042011-04-25 12:53:24 -050067/* 5G chan 36 - chan 64*/
68#define RTL819x_5GHZ_5150_5350 \
Larry Fingerf3a97e92014-09-22 09:39:24 -050069 REG_RULE(5150-10, 5350+10, 80, 0, 30, 0)
Chaoming_Li81b29042011-04-25 12:53:24 -050070/* 5G chan 100 - chan 165*/
71#define RTL819x_5GHZ_5470_5850 \
Larry Fingerf3a97e92014-09-22 09:39:24 -050072 REG_RULE(5470-10, 5850+10, 80, 0, 30, 0)
Chaoming_Li81b29042011-04-25 12:53:24 -050073/* 5G chan 149 - chan 165*/
74#define RTL819x_5GHZ_5725_5850 \
Larry Fingerf3a97e92014-09-22 09:39:24 -050075 REG_RULE(5725-10, 5850+10, 80, 0, 30, 0)
Chaoming_Li81b29042011-04-25 12:53:24 -050076
77#define RTL819x_5GHZ_ALL \
78 (RTL819x_5GHZ_5150_5350, RTL819x_5GHZ_5470_5850)
79
Larry Finger0c817332010-12-08 11:12:31 -060080static const struct ieee80211_regdomain rtl_regdom_11 = {
81 .n_reg_rules = 1,
82 .alpha2 = "99",
83 .reg_rules = {
84 RTL819x_2GHZ_CH01_11,
Chaoming_Li81b29042011-04-25 12:53:24 -050085 }
Larry Finger0c817332010-12-08 11:12:31 -060086};
87
Chaoming_Li81b29042011-04-25 12:53:24 -050088static const struct ieee80211_regdomain rtl_regdom_12_13 = {
Larry Finger0c817332010-12-08 11:12:31 -060089 .n_reg_rules = 2,
90 .alpha2 = "99",
91 .reg_rules = {
92 RTL819x_2GHZ_CH01_11,
Chaoming_Li81b29042011-04-25 12:53:24 -050093 RTL819x_2GHZ_CH12_13,
94 }
95};
96
97static const struct ieee80211_regdomain rtl_regdom_no_midband = {
98 .n_reg_rules = 3,
99 .alpha2 = "99",
100 .reg_rules = {
101 RTL819x_2GHZ_CH01_11,
102 RTL819x_5GHZ_5150_5350,
103 RTL819x_5GHZ_5725_5850,
104 }
105};
106
107static const struct ieee80211_regdomain rtl_regdom_60_64 = {
108 .n_reg_rules = 3,
109 .alpha2 = "99",
110 .reg_rules = {
111 RTL819x_2GHZ_CH01_11,
112 RTL819x_2GHZ_CH12_13,
113 RTL819x_5GHZ_5725_5850,
114 }
115};
116
117static const struct ieee80211_regdomain rtl_regdom_14_60_64 = {
118 .n_reg_rules = 4,
119 .alpha2 = "99",
120 .reg_rules = {
121 RTL819x_2GHZ_CH01_11,
122 RTL819x_2GHZ_CH12_13,
123 RTL819x_2GHZ_CH14,
124 RTL819x_5GHZ_5725_5850,
125 }
126};
127
Shao Fu02b5fff2015-05-15 16:32:59 -0500128static const struct ieee80211_regdomain rtl_regdom_12_13_5g_all = {
129 .n_reg_rules = 4,
130 .alpha2 = "99",
131 .reg_rules = {
132 RTL819x_2GHZ_CH01_11,
133 RTL819x_2GHZ_CH12_13,
134 RTL819x_5GHZ_5150_5350,
135 RTL819x_5GHZ_5470_5850,
136 }
137};
138
Chaoming_Li81b29042011-04-25 12:53:24 -0500139static const struct ieee80211_regdomain rtl_regdom_14 = {
140 .n_reg_rules = 3,
141 .alpha2 = "99",
142 .reg_rules = {
143 RTL819x_2GHZ_CH01_11,
144 RTL819x_2GHZ_CH12_13,
145 RTL819x_2GHZ_CH14,
146 }
Larry Finger0c817332010-12-08 11:12:31 -0600147};
148
149static bool _rtl_is_radar_freq(u16 center_freq)
150{
Larry Fingerf3a97e92014-09-22 09:39:24 -0500151 return center_freq >= 5260 && center_freq <= 5700;
Larry Finger0c817332010-12-08 11:12:31 -0600152}
153
154static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy,
155 enum nl80211_reg_initiator initiator)
156{
157 enum ieee80211_band band;
158 struct ieee80211_supported_band *sband;
159 const struct ieee80211_reg_rule *reg_rule;
160 struct ieee80211_channel *ch;
161 unsigned int i;
Larry Finger0c817332010-12-08 11:12:31 -0600162
163 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
164
165 if (!wiphy->bands[band])
166 continue;
167
168 sband = wiphy->bands[band];
169
170 for (i = 0; i < sband->n_channels; i++) {
171 ch = &sband->channels[i];
172 if (_rtl_is_radar_freq(ch->center_freq) ||
173 (ch->flags & IEEE80211_CHAN_RADAR))
174 continue;
175 if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
Luis R. Rodriguez856a4ef2013-10-29 19:34:26 +0100176 reg_rule = freq_reg_info(wiphy,
Larry Fingerf3a97e92014-09-22 09:39:24 -0500177 ch->center_freq);
Johannes Berg361c9c82012-12-06 15:57:14 +0100178 if (IS_ERR(reg_rule))
Larry Finger0c817332010-12-08 11:12:31 -0600179 continue;
Larry Finger0c817332010-12-08 11:12:31 -0600180 /*
181 *If 11d had a rule for this channel ensure
182 *we enable adhoc/beaconing if it allows us to
183 *use it. Note that we would have disabled it
184 *by applying our static world regdomain by
185 *default during init, prior to calling our
186 *regulatory_hint().
187 */
188
Larry Fingerf3a97e92014-09-22 09:39:24 -0500189 if (!(reg_rule->flags & NL80211_RRF_NO_IBSS))
190 ch->flags &= ~IEEE80211_CHAN_NO_IBSS;
191 if (!(reg_rule->flags &
192 NL80211_RRF_PASSIVE_SCAN))
193 ch->flags &=
194 ~IEEE80211_CHAN_PASSIVE_SCAN;
Larry Finger0c817332010-12-08 11:12:31 -0600195 } else {
196 if (ch->beacon_found)
Larry Fingerf3a97e92014-09-22 09:39:24 -0500197 ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
198 IEEE80211_CHAN_PASSIVE_SCAN);
Larry Finger0c817332010-12-08 11:12:31 -0600199 }
200 }
201 }
202}
203
204/* Allows active scan scan on Ch 12 and 13 */
205static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy,
206 enum nl80211_reg_initiator
207 initiator)
208{
209 struct ieee80211_supported_band *sband;
210 struct ieee80211_channel *ch;
211 const struct ieee80211_reg_rule *reg_rule;
Larry Finger0c817332010-12-08 11:12:31 -0600212
Chaoming_Li81b29042011-04-25 12:53:24 -0500213 if (!wiphy->bands[IEEE80211_BAND_2GHZ])
214 return;
Larry Finger0c817332010-12-08 11:12:31 -0600215 sband = wiphy->bands[IEEE80211_BAND_2GHZ];
216
217 /*
218 *If no country IE has been received always enable active scan
219 *on these channels. This is only done for specific regulatory SKUs
220 */
221 if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
222 ch = &sband->channels[11]; /* CH 12 */
Larry Fingerf3a97e92014-09-22 09:39:24 -0500223 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
224 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
Larry Finger0c817332010-12-08 11:12:31 -0600225 ch = &sband->channels[12]; /* CH 13 */
Larry Fingerf3a97e92014-09-22 09:39:24 -0500226 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
227 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
Larry Finger0c817332010-12-08 11:12:31 -0600228 return;
229 }
230
231 /*
Larry Fingerf3a97e92014-09-22 09:39:24 -0500232 *If a country IE has been recieved check its rule for this
Larry Finger0c817332010-12-08 11:12:31 -0600233 *channel first before enabling active scan. The passive scan
234 *would have been enforced by the initial processing of our
235 *custom regulatory domain.
236 */
237
238 ch = &sband->channels[11]; /* CH 12 */
Larry Fingerf3a97e92014-09-22 09:39:24 -0500239 reg_rule = freq_reg_info(wiphy, ch->center_freq);
Johannes Berg361c9c82012-12-06 15:57:14 +0100240 if (!IS_ERR(reg_rule)) {
Larry Fingerf3a97e92014-09-22 09:39:24 -0500241 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
242 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
243 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
Larry Finger0c817332010-12-08 11:12:31 -0600244 }
245
246 ch = &sband->channels[12]; /* CH 13 */
Larry Fingerf3a97e92014-09-22 09:39:24 -0500247 reg_rule = freq_reg_info(wiphy, ch->center_freq);
Johannes Berg361c9c82012-12-06 15:57:14 +0100248 if (!IS_ERR(reg_rule)) {
Larry Fingerf3a97e92014-09-22 09:39:24 -0500249 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
250 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
251 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
Larry Finger0c817332010-12-08 11:12:31 -0600252 }
253}
254
255/*
256 *Always apply Radar/DFS rules on
257 *freq range 5260 MHz - 5700 MHz
258 */
259static void _rtl_reg_apply_radar_flags(struct wiphy *wiphy)
260{
261 struct ieee80211_supported_band *sband;
262 struct ieee80211_channel *ch;
263 unsigned int i;
264
265 if (!wiphy->bands[IEEE80211_BAND_5GHZ])
266 return;
267
268 sband = wiphy->bands[IEEE80211_BAND_5GHZ];
269
270 for (i = 0; i < sband->n_channels; i++) {
271 ch = &sband->channels[i];
272 if (!_rtl_is_radar_freq(ch->center_freq))
273 continue;
274
275 /*
276 *We always enable radar detection/DFS on this
277 *frequency range. Additionally we also apply on
278 *this frequency range:
279 *- If STA mode does not yet have DFS supports disable
280 * active scanning
281 *- If adhoc mode does not support DFS yet then disable
282 * adhoc in the frequency.
283 *- If AP mode does not yet support radar detection/DFS
284 *do not allow AP mode
285 */
286 if (!(ch->flags & IEEE80211_CHAN_DISABLED))
287 ch->flags |= IEEE80211_CHAN_RADAR |
Larry Fingerf3a97e92014-09-22 09:39:24 -0500288 IEEE80211_CHAN_NO_IBSS |
289 IEEE80211_CHAN_PASSIVE_SCAN;
Larry Finger0c817332010-12-08 11:12:31 -0600290 }
291}
292
293static void _rtl_reg_apply_world_flags(struct wiphy *wiphy,
294 enum nl80211_reg_initiator initiator,
295 struct rtl_regulatory *reg)
296{
297 _rtl_reg_apply_beaconing_flags(wiphy, initiator);
298 _rtl_reg_apply_active_scan_flags(wiphy, initiator);
299 return;
300}
301
Larry Fingerf3a97e92014-09-22 09:39:24 -0500302static void _rtl_dump_channel_map(struct wiphy *wiphy)
303{
304 enum ieee80211_band band;
305 struct ieee80211_supported_band *sband;
306 struct ieee80211_channel *ch;
307 unsigned int i;
308
309 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
310 if (!wiphy->bands[band])
311 continue;
312 sband = wiphy->bands[band];
313 for (i = 0; i < sband->n_channels; i++)
314 ch = &sband->channels[i];
315 }
316}
317
318static int _rtl_reg_notifier_apply(struct wiphy *wiphy,
319 struct regulatory_request *request,
320 struct rtl_regulatory *reg)
Larry Finger0c817332010-12-08 11:12:31 -0600321{
322 /* We always apply this */
323 _rtl_reg_apply_radar_flags(wiphy);
324
325 switch (request->initiator) {
326 case NL80211_REGDOM_SET_BY_DRIVER:
327 case NL80211_REGDOM_SET_BY_CORE:
328 case NL80211_REGDOM_SET_BY_USER:
329 break;
330 case NL80211_REGDOM_SET_BY_COUNTRY_IE:
331 _rtl_reg_apply_world_flags(wiphy, request->initiator, reg);
332 break;
333 }
Larry Fingerf3a97e92014-09-22 09:39:24 -0500334
335 _rtl_dump_channel_map(wiphy);
336
337 return 0;
Larry Finger0c817332010-12-08 11:12:31 -0600338}
339
340static const struct ieee80211_regdomain *_rtl_regdomain_select(
Larry Fingerf3a97e92014-09-22 09:39:24 -0500341 struct rtl_regulatory *reg)
Larry Finger0c817332010-12-08 11:12:31 -0600342{
343 switch (reg->country_code) {
344 case COUNTRY_CODE_FCC:
Chaoming_Li81b29042011-04-25 12:53:24 -0500345 return &rtl_regdom_no_midband;
Larry Finger0c817332010-12-08 11:12:31 -0600346 case COUNTRY_CODE_IC:
347 return &rtl_regdom_11;
348 case COUNTRY_CODE_ETSI:
Chaoming_Li81b29042011-04-25 12:53:24 -0500349 case COUNTRY_CODE_TELEC_NETGEAR:
350 return &rtl_regdom_60_64;
Larry Finger0c817332010-12-08 11:12:31 -0600351 case COUNTRY_CODE_SPAIN:
352 case COUNTRY_CODE_FRANCE:
353 case COUNTRY_CODE_ISRAEL:
Chaoming_Li81b29042011-04-25 12:53:24 -0500354 case COUNTRY_CODE_WORLD_WIDE_13:
355 return &rtl_regdom_12_13;
Larry Finger0c817332010-12-08 11:12:31 -0600356 case COUNTRY_CODE_MKK:
357 case COUNTRY_CODE_MKK1:
358 case COUNTRY_CODE_TELEC:
359 case COUNTRY_CODE_MIC:
Chaoming_Li81b29042011-04-25 12:53:24 -0500360 return &rtl_regdom_14_60_64;
Larry Finger0c817332010-12-08 11:12:31 -0600361 case COUNTRY_CODE_GLOBAL_DOMAIN:
Chaoming_Li81b29042011-04-25 12:53:24 -0500362 return &rtl_regdom_14;
Shao Fu02b5fff2015-05-15 16:32:59 -0500363 case COUNTRY_CODE_WORLD_WIDE_13_5G_ALL:
364 return &rtl_regdom_12_13_5g_all;
Larry Finger0c817332010-12-08 11:12:31 -0600365 default:
Chaoming_Li81b29042011-04-25 12:53:24 -0500366 return &rtl_regdom_no_midband;
Larry Finger0c817332010-12-08 11:12:31 -0600367 }
368}
369
370static int _rtl_regd_init_wiphy(struct rtl_regulatory *reg,
371 struct wiphy *wiphy,
Larry Fingerf3a97e92014-09-22 09:39:24 -0500372 void (*reg_notifier)(struct wiphy *wiphy,
373 struct regulatory_request *
374 request))
Larry Finger0c817332010-12-08 11:12:31 -0600375{
376 const struct ieee80211_regdomain *regd;
377
378 wiphy->reg_notifier = reg_notifier;
Chaoming_Li81b29042011-04-25 12:53:24 -0500379
Luis R. Rodrigueza2f73b62013-11-11 22:15:29 +0100380 wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
381 wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG;
382 wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS;
Larry Finger0c817332010-12-08 11:12:31 -0600383 regd = _rtl_regdomain_select(reg);
384 wiphy_apply_custom_regulatory(wiphy, regd);
385 _rtl_reg_apply_radar_flags(wiphy);
386 _rtl_reg_apply_world_flags(wiphy, NL80211_REGDOM_SET_BY_DRIVER, reg);
387 return 0;
388}
389
390static struct country_code_to_enum_rd *_rtl_regd_find_country(u16 countrycode)
391{
392 int i;
393
394 for (i = 0; i < ARRAY_SIZE(allCountries); i++) {
395 if (allCountries[i].countrycode == countrycode)
396 return &allCountries[i];
397 }
398 return NULL;
399}
400
Shao Fu02b5fff2015-05-15 16:32:59 -0500401static u8 channel_plan_to_country_code(u8 channelplan)
402{
403 switch (channelplan) {
404 case 0x20:
405 case 0x21:
406 return COUNTRY_CODE_WORLD_WIDE_13;
407 case 0x22:
408 return COUNTRY_CODE_IC;
409 case 0x32:
410 return COUNTRY_CODE_TELEC_NETGEAR;
411 case 0x41:
412 return COUNTRY_CODE_GLOBAL_DOMAIN;
413 case 0x7f:
414 return COUNTRY_CODE_WORLD_WIDE_13_5G_ALL;
415 default:
416 return COUNTRY_CODE_MAX; /*Error*/
417 }
418}
419
Larry Finger0c817332010-12-08 11:12:31 -0600420int rtl_regd_init(struct ieee80211_hw *hw,
Larry Fingerf3a97e92014-09-22 09:39:24 -0500421 void (*reg_notifier)(struct wiphy *wiphy,
Larry Finger0c817332010-12-08 11:12:31 -0600422 struct regulatory_request *request))
423{
424 struct rtl_priv *rtlpriv = rtl_priv(hw);
425 struct wiphy *wiphy = hw->wiphy;
426 struct country_code_to_enum_rd *country = NULL;
427
428 if (wiphy == NULL || &rtlpriv->regd == NULL)
429 return -EINVAL;
430
Chaoming_Li81b29042011-04-25 12:53:24 -0500431 /* init country_code from efuse channel plan */
Shao Fu02b5fff2015-05-15 16:32:59 -0500432 rtlpriv->regd.country_code =
433 channel_plan_to_country_code(rtlpriv->efuse.channel_plan);
Larry Finger0c817332010-12-08 11:12:31 -0600434
Shao Fu02b5fff2015-05-15 16:32:59 -0500435 RT_TRACE(rtlpriv, COMP_REGD, DBG_DMESG,
436 "rtl: EEPROM regdomain: 0x%0x conuntry code: %d\n",
437 rtlpriv->efuse.channel_plan, rtlpriv->regd.country_code);
Larry Finger0c817332010-12-08 11:12:31 -0600438
439 if (rtlpriv->regd.country_code >= COUNTRY_CODE_MAX) {
440 RT_TRACE(rtlpriv, COMP_REGD, DBG_DMESG,
Joe Perchesf30d7502012-01-04 19:40:41 -0800441 "rtl: EEPROM indicates invalid contry code, world wide 13 should be used\n");
Larry Finger0c817332010-12-08 11:12:31 -0600442
443 rtlpriv->regd.country_code = COUNTRY_CODE_WORLD_WIDE_13;
444 }
445
446 country = _rtl_regd_find_country(rtlpriv->regd.country_code);
447
448 if (country) {
Chaoming_Li81b29042011-04-25 12:53:24 -0500449 rtlpriv->regd.alpha2[0] = country->iso_name[0];
450 rtlpriv->regd.alpha2[1] = country->iso_name[1];
Larry Finger0c817332010-12-08 11:12:31 -0600451 } else {
452 rtlpriv->regd.alpha2[0] = '0';
453 rtlpriv->regd.alpha2[1] = '0';
454 }
455
456 RT_TRACE(rtlpriv, COMP_REGD, DBG_TRACE,
Joe Perchesf30d7502012-01-04 19:40:41 -0800457 "rtl: Country alpha2 being used: %c%c\n",
Larry Fingerf3a97e92014-09-22 09:39:24 -0500458 rtlpriv->regd.alpha2[0], rtlpriv->regd.alpha2[1]);
Larry Finger0c817332010-12-08 11:12:31 -0600459
460 _rtl_regd_init_wiphy(&rtlpriv->regd, wiphy, reg_notifier);
461
462 return 0;
463}
464
Luis R. Rodriguez0c0280b2013-01-11 18:39:36 +0000465void rtl_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request)
Larry Finger0c817332010-12-08 11:12:31 -0600466{
467 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
468 struct rtl_priv *rtlpriv = rtl_priv(hw);
469
Joe Perchesf30d7502012-01-04 19:40:41 -0800470 RT_TRACE(rtlpriv, COMP_REGD, DBG_LOUD, "\n");
Larry Finger0c817332010-12-08 11:12:31 -0600471
Luis R. Rodriguez0c0280b2013-01-11 18:39:36 +0000472 _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd);
Larry Finger0c817332010-12-08 11:12:31 -0600473}