nl80211: Move CS supported flag to wpa_driver_capa
Replace channel_switch_supported flag of the wpa_driver_nl80211_data by WPA_DRIVER_FLAGS_AP_CSA inside wpa_driver_capa.flags. It makes more sense and also can be accessed by wpa_supplicant. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
a36158befe
commit
991aa9c73f
2 changed files with 6 additions and 3 deletions
|
@ -932,6 +932,8 @@ struct wpa_driver_capa {
|
|||
#define WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE 0x20000000
|
||||
/* Driver supports QoS Mapping */
|
||||
#define WPA_DRIVER_FLAGS_QOS_MAPPING 0x40000000
|
||||
/* Driver supports CSA in AP mode */
|
||||
#define WPA_DRIVER_FLAGS_AP_CSA 0x80000000
|
||||
unsigned int flags;
|
||||
|
||||
int max_scan_ssids;
|
||||
|
|
|
@ -300,7 +300,6 @@ struct wpa_driver_nl80211_data {
|
|||
unsigned int hostapd:1;
|
||||
unsigned int start_mode_ap:1;
|
||||
unsigned int start_iface_up:1;
|
||||
unsigned int channel_switch_supported:1;
|
||||
|
||||
u64 remain_on_chan_cookie;
|
||||
u64 send_action_cookie;
|
||||
|
@ -3628,6 +3627,9 @@ static int wpa_driver_nl80211_get_info(struct wpa_driver_nl80211_data *drv,
|
|||
if (!drv->capa.max_remain_on_chan)
|
||||
drv->capa.max_remain_on_chan = 5000;
|
||||
|
||||
if (info->channel_switch_supported)
|
||||
drv->capa.flags |= WPA_DRIVER_FLAGS_AP_CSA;
|
||||
|
||||
return 0;
|
||||
nla_put_failure:
|
||||
nlmsg_free(msg);
|
||||
|
@ -3670,7 +3672,6 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
|
|||
drv->device_ap_sme = info.device_ap_sme;
|
||||
drv->poll_command_supported = info.poll_command_supported;
|
||||
drv->data_tx_status = info.data_tx_status;
|
||||
drv->channel_switch_supported = info.channel_switch_supported;
|
||||
if (info.set_qos_map_supported)
|
||||
drv->capa.flags |= WPA_DRIVER_FLAGS_QOS_MAPPING;
|
||||
|
||||
|
@ -11361,7 +11362,7 @@ static int nl80211_switch_channel(void *priv, struct csa_settings *settings)
|
|||
settings->freq_params.center_freq1,
|
||||
settings->freq_params.center_freq2);
|
||||
|
||||
if (!drv->channel_switch_supported) {
|
||||
if (!(drv->capa.flags & WPA_DRIVER_FLAGS_AP_CSA)) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Driver does not support channel switch command");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue