mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-22 13:24:36 +00:00
Unmask all available channels
This commit is contained in:
parent
6813182019
commit
7e48715dee
@ -305,16 +305,11 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
|
||||
{
|
||||
#if 1 /* by channel plan */
|
||||
_adapter *padapter = wiphy_to_adapter(wiphy);
|
||||
u8 channel_plan = padapter->mlmepriv.ChannelPlan;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
RT_CHANNEL_INFO *channel_set = pmlmeext->channel_set;
|
||||
u8 max_chan_nums = pmlmeext->max_chan_nums;
|
||||
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i, j;
|
||||
u16 channel;
|
||||
u32 freq;
|
||||
|
||||
/* all channels disable */
|
||||
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
|
||||
@ -325,31 +320,11 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
|
||||
ch = &sband->channels[j];
|
||||
|
||||
if (ch)
|
||||
ch->flags = IEEE80211_CHAN_DISABLED;
|
||||
ch->flags &= ~(IEEE80211_CHAN_DISABLED|IEEE80211_CHAN_NO_HT40PLUS|IEEE80211_CHAN_NO_HT40MINUS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* channels apply by channel plans. */
|
||||
for (i = 0; i < max_chan_nums; i++) {
|
||||
channel = channel_set[i].ChannelNum;
|
||||
freq = rtw_ch2freq(channel);
|
||||
|
||||
ch = ieee80211_get_channel(wiphy, freq);
|
||||
if (ch) {
|
||||
if (channel_set[i].ScanType == SCAN_PASSIVE) {
|
||||
#if defined(CONFIG_DFS_MASTER)
|
||||
ch->flags = 0;
|
||||
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0))
|
||||
ch->flags = (IEEE80211_CHAN_NO_IBSS | IEEE80211_CHAN_PASSIVE_SCAN);
|
||||
#else
|
||||
ch->flags = IEEE80211_CHAN_NO_IR;
|
||||
#endif
|
||||
} else
|
||||
ch->flags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_channel *ch;
|
||||
|
Loading…
Reference in New Issue
Block a user