Lines Matching +full:hw +full:- +full:channels
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2009-2012 Realtek Corporation.*/
25 *Only these channels all allow active
29 REG_RULE(2412-10, 2462+10, 40, 0, 20, 0)
36 REG_RULE(2467-10, 2472+10, 40, 0, 20,\
40 REG_RULE(2484-10, 2484+10, 40, 0, 20, \
44 /* 5G chan 36 - chan 64*/
46 REG_RULE(5150-10, 5350+10, 80, 0, 30, 0)
47 /* 5G chan 100 - chan 165*/
49 REG_RULE(5470-10, 5850+10, 80, 0, 30, 0)
50 /* 5G chan 149 - chan 165*/
52 REG_RULE(5725-10, 5850+10, 80, 0, 30, 0)
142 if (!wiphy->bands[band]) in _rtl_reg_apply_beaconing_flags()
145 sband = wiphy->bands[band]; in _rtl_reg_apply_beaconing_flags()
147 for (i = 0; i < sband->n_channels; i++) { in _rtl_reg_apply_beaconing_flags()
148 ch = &sband->channels[i]; in _rtl_reg_apply_beaconing_flags()
149 if (_rtl_is_radar_freq(ch->center_freq) || in _rtl_reg_apply_beaconing_flags()
150 (ch->flags & IEEE80211_CHAN_RADAR)) in _rtl_reg_apply_beaconing_flags()
154 ch->center_freq); in _rtl_reg_apply_beaconing_flags()
166 if (!(reg_rule->flags & NL80211_RRF_NO_IBSS)) in _rtl_reg_apply_beaconing_flags()
167 ch->flags &= ~IEEE80211_CHAN_NO_IBSS; in _rtl_reg_apply_beaconing_flags()
168 if (!(reg_rule->flags & in _rtl_reg_apply_beaconing_flags()
170 ch->flags &= in _rtl_reg_apply_beaconing_flags()
173 if (ch->beacon_found) in _rtl_reg_apply_beaconing_flags()
174 ch->flags &= ~(IEEE80211_CHAN_NO_IBSS | in _rtl_reg_apply_beaconing_flags()
190 if (!wiphy->bands[NL80211_BAND_2GHZ]) in _rtl_reg_apply_active_scan_flags()
192 sband = wiphy->bands[NL80211_BAND_2GHZ]; in _rtl_reg_apply_active_scan_flags()
196 *on these channels. This is only done for specific regulatory SKUs in _rtl_reg_apply_active_scan_flags()
199 ch = &sband->channels[11]; /* CH 12 */ in _rtl_reg_apply_active_scan_flags()
200 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) in _rtl_reg_apply_active_scan_flags()
201 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; in _rtl_reg_apply_active_scan_flags()
202 ch = &sband->channels[12]; /* CH 13 */ in _rtl_reg_apply_active_scan_flags()
203 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) in _rtl_reg_apply_active_scan_flags()
204 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; in _rtl_reg_apply_active_scan_flags()
215 ch = &sband->channels[11]; /* CH 12 */ in _rtl_reg_apply_active_scan_flags()
216 reg_rule = freq_reg_info(wiphy, ch->center_freq); in _rtl_reg_apply_active_scan_flags()
218 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) in _rtl_reg_apply_active_scan_flags()
219 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) in _rtl_reg_apply_active_scan_flags()
220 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; in _rtl_reg_apply_active_scan_flags()
223 ch = &sband->channels[12]; /* CH 13 */ in _rtl_reg_apply_active_scan_flags()
224 reg_rule = freq_reg_info(wiphy, ch->center_freq); in _rtl_reg_apply_active_scan_flags()
226 if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) in _rtl_reg_apply_active_scan_flags()
227 if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN) in _rtl_reg_apply_active_scan_flags()
228 ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; in _rtl_reg_apply_active_scan_flags()
234 *freq range 5260 MHz - 5700 MHz
242 if (!wiphy->bands[NL80211_BAND_5GHZ]) in _rtl_reg_apply_radar_flags()
245 sband = wiphy->bands[NL80211_BAND_5GHZ]; in _rtl_reg_apply_radar_flags()
247 for (i = 0; i < sband->n_channels; i++) { in _rtl_reg_apply_radar_flags()
248 ch = &sband->channels[i]; in _rtl_reg_apply_radar_flags()
249 if (!_rtl_is_radar_freq(ch->center_freq)) in _rtl_reg_apply_radar_flags()
256 *- If STA mode does not yet have DFS supports disable in _rtl_reg_apply_radar_flags()
258 *- If adhoc mode does not support DFS yet then disable in _rtl_reg_apply_radar_flags()
260 *- If AP mode does not yet support radar detection/DFS in _rtl_reg_apply_radar_flags()
263 if (!(ch->flags & IEEE80211_CHAN_DISABLED)) in _rtl_reg_apply_radar_flags()
264 ch->flags |= IEEE80211_CHAN_RADAR | in _rtl_reg_apply_radar_flags()
286 switch (request->initiator) { in _rtl_reg_notifier_apply()
292 _rtl_reg_apply_world_flags(wiphy, request->initiator, reg); in _rtl_reg_notifier_apply()
302 switch (reg->country_code) { in _rtl_regdomain_select()
337 wiphy->reg_notifier = reg_notifier; in _rtl_regd_init_wiphy()
339 wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG; in _rtl_regd_init_wiphy()
340 wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG; in _rtl_regd_init_wiphy()
341 wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS; in _rtl_regd_init_wiphy()
381 int rtl_regd_init(struct ieee80211_hw *hw, in rtl_regd_init() argument
385 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl_regd_init()
386 struct wiphy *wiphy = hw->wiphy; in rtl_regd_init()
390 return -EINVAL; in rtl_regd_init()
393 rtlpriv->regd.country_code = in rtl_regd_init()
394 channel_plan_to_country_code(rtlpriv->efuse.channel_plan); in rtl_regd_init()
398 rtlpriv->efuse.channel_plan, rtlpriv->regd.country_code); in rtl_regd_init()
400 if (rtlpriv->regd.country_code >= COUNTRY_CODE_MAX) { in rtl_regd_init()
404 rtlpriv->regd.country_code = COUNTRY_CODE_WORLD_WIDE_13; in rtl_regd_init()
407 country = _rtl_regd_find_country(rtlpriv->regd.country_code); in rtl_regd_init()
410 rtlpriv->regd.alpha2[0] = country->iso_name[0]; in rtl_regd_init()
411 rtlpriv->regd.alpha2[1] = country->iso_name[1]; in rtl_regd_init()
413 rtlpriv->regd.alpha2[0] = '0'; in rtl_regd_init()
414 rtlpriv->regd.alpha2[1] = '0'; in rtl_regd_init()
419 rtlpriv->regd.alpha2[0], rtlpriv->regd.alpha2[1]); in rtl_regd_init()
421 _rtl_regd_init_wiphy(&rtlpriv->regd, wiphy, reg_notifier); in rtl_regd_init()
428 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); in rtl_reg_notifier() local
429 struct rtl_priv *rtlpriv = rtl_priv(hw); in rtl_reg_notifier()
433 _rtl_reg_notifier_apply(wiphy, request, &rtlpriv->regd); in rtl_reg_notifier()