Check for driver's DFS offload capability before handling DFS

This fixes couple of code paths where the WPA_DRIVER_FLAGS_DFS_OFFLOAD
flag was not checked properly and unexpected DFS operations were
initiated (and failed) in case the driver handles all these steps.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Sunil Dutt 2014-09-22 14:36:01 +05:30 committed by Jouni Malinen
parent 068e38771e
commit c53a9bf818
2 changed files with 13 additions and 6 deletions

View file

@ -113,6 +113,10 @@ static u8 * hostapd_eid_pwr_constraint(struct hostapd_data *hapd, u8 *eid)
hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211A) hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211A)
return eid; return eid;
/* Let host drivers add this IE if DFS support is offloaded */
if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)
return eid;
/* /*
* There is no DFS support and power constraint was not directly * There is no DFS support and power constraint was not directly
* requested by config option. * requested by config option.

View file

@ -1182,12 +1182,15 @@ int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err)
iface->conf->channel, iface->freq); iface->conf->channel, iface->freq);
#ifdef NEED_AP_MLME #ifdef NEED_AP_MLME
/* Check DFS */ /* Handle DFS only if it is not offloaded to the driver */
res = hostapd_handle_dfs(iface); if (!(iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)) {
if (res <= 0) { /* Check DFS */
if (res < 0) res = hostapd_handle_dfs(iface);
goto fail; if (res <= 0) {
return res; if (res < 0)
goto fail;
return res;
}
} }
#endif /* NEED_AP_MLME */ #endif /* NEED_AP_MLME */