ACS: Select current hw_mode based on the selected frequency
After receiving ACS offload results, select the current hw_mode based on the frequency selected by the ACS algorithm. The current hw_mode will be further used during other validation steps such as HT capability validations, DFS validation, etc. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
bb781c763f
commit
59e33b4a98
1 changed files with 8 additions and 2 deletions
|
@ -944,12 +944,20 @@ void hostapd_acs_channel_selected(struct hostapd_data *hapd,
|
|||
return;
|
||||
}
|
||||
|
||||
hapd->iface->freq = acs_res->pri_freq;
|
||||
|
||||
if (!hapd->iface->current_mode) {
|
||||
for (i = 0; i < hapd->iface->num_hw_features; i++) {
|
||||
struct hostapd_hw_modes *mode =
|
||||
&hapd->iface->hw_features[i];
|
||||
|
||||
if (mode->mode == acs_res->hw_mode) {
|
||||
if (hapd->iface->freq > 0 &&
|
||||
!hw_get_chan(mode->mode,
|
||||
hapd->iface->freq,
|
||||
hapd->iface->hw_features,
|
||||
hapd->iface->num_hw_features))
|
||||
continue;
|
||||
hapd->iface->current_mode = mode;
|
||||
break;
|
||||
}
|
||||
|
@ -963,8 +971,6 @@ void hostapd_acs_channel_selected(struct hostapd_data *hapd,
|
|||
}
|
||||
}
|
||||
|
||||
hapd->iface->freq = acs_res->pri_freq;
|
||||
|
||||
if (!acs_res->pri_freq) {
|
||||
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
|
||||
HOSTAPD_LEVEL_WARNING,
|
||||
|
|
Loading…
Reference in a new issue