ACS: Extend hostapd_get_mode_channel() to find from any mode
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
a62d761856
commit
499c37b729
3 changed files with 46 additions and 3 deletions
|
@ -1085,3 +1085,20 @@ int hostapd_hw_get_channel(struct hostapd_data *hapd, int freq)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int hostapd_hw_skip_mode(struct hostapd_iface *iface,
|
||||
struct hostapd_hw_modes *mode)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (iface->current_mode)
|
||||
return mode != iface->current_mode;
|
||||
if (mode->mode != HOSTAPD_MODE_IEEE80211B)
|
||||
return 0;
|
||||
for (i = 0; i < iface->num_hw_features; i++) {
|
||||
if (iface->hw_features[i].mode == HOSTAPD_MODE_IEEE80211G)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue