diff --git a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c index 73025cc..82abc9c 100644 --- a/os_dep/linux/wifi_regd.c +++ b/os_dep/linux/wifi_regd.c @@ -310,16 +310,16 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy) { #if 1 /* by channel plan */ _adapter *padapter = wiphy_to_adapter(wiphy); - struct rf_ctl_t *rfctl = adapter_to_rfctl(padapter); - u8 channel_plan = rfctl->ChannelPlan; - RT_CHANNEL_INFO *channel_set = rfctl->channel_set; - u8 max_chan_nums = rfctl->max_chan_nums; + //struct rf_ctl_t *rfctl = adapter_to_rfctl(padapter); + //u8 channel_plan = rfctl->ChannelPlan; + //RT_CHANNEL_INFO *channel_set = rfctl->channel_set; + //u8 max_chan_nums = rfctl->max_chan_nums; struct ieee80211_supported_band *sband; struct ieee80211_channel *ch; unsigned int i, j; u16 channel; - u32 freq; + //u32 freq; /* all channels disable */ for (i = 0; i < NUM_NL80211_BANDS; i++) { @@ -330,12 +330,15 @@ 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); + //ch->flags = IEEE80211_CHAN_DISABLED; } } } /* channels apply by channel plans. */ + + /* for (i = 0; i < max_chan_nums; i++) { channel = channel_set[i].ChannelNum; freq = rtw_ch2freq(channel); @@ -356,6 +359,7 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy) ch->flags = 0; } } +*/ #else struct ieee80211_supported_band *sband;