From 7e48715dee994024dc744b1282d7a962034e67a9 Mon Sep 17 00:00:00 2001 From: Sergei Makarenkov Date: Sat, 17 Dec 2016 16:44:09 +0300 Subject: [PATCH] Unmask all available channels --- os_dep/linux/wifi_regd.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index 5669401..d163c80 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -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;