mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 08:44:03 -05:00
ACS: Clear all modes in acs_cleanup()
This is preparation for being able to support hw_mode=any to select the best channel from any supported mode. Signed-off-by: Neo Jou <neojou@gmail.com>
This commit is contained in:
parent
499c37b729
commit
3d09be41a8
15
src/ap/acs.c
15
src/ap/acs.c
@ -261,13 +261,13 @@ static void acs_clean_chan_surveys(struct hostapd_channel_data *chan)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void acs_cleanup(struct hostapd_iface *iface)
|
static void acs_cleanup_mode(struct hostapd_hw_modes *mode)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct hostapd_channel_data *chan;
|
struct hostapd_channel_data *chan;
|
||||||
|
|
||||||
for (i = 0; i < iface->current_mode->num_channels; i++) {
|
for (i = 0; i < mode->num_channels; i++) {
|
||||||
chan = &iface->current_mode->channels[i];
|
chan = &mode->channels[i];
|
||||||
|
|
||||||
if (chan->flag & HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED)
|
if (chan->flag & HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED)
|
||||||
acs_clean_chan_surveys(chan);
|
acs_clean_chan_surveys(chan);
|
||||||
@ -276,6 +276,15 @@ void acs_cleanup(struct hostapd_iface *iface)
|
|||||||
chan->flag |= HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED;
|
chan->flag |= HOSTAPD_CHAN_SURVEY_LIST_INITIALIZED;
|
||||||
chan->min_nf = 0;
|
chan->min_nf = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void acs_cleanup(struct hostapd_iface *iface)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < iface->num_hw_features; i++)
|
||||||
|
acs_cleanup_mode(&iface->hw_features[i]);
|
||||||
|
|
||||||
iface->chans_surveyed = 0;
|
iface->chans_surveyed = 0;
|
||||||
iface->acs_num_completed_scans = 0;
|
iface->acs_num_completed_scans = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user