1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 21:34:37 +00:00

Unmask all available channels

This commit is contained in:
kimocoder 2018-07-02 21:39:36 +02:00
parent 5b8f812224
commit 96505723e3

View File

@ -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;