aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_drv_ops.c
diff options
context:
space:
mode:
authorSven Eckelmann <seckelmann@datto.com>2019-06-14 14:49:20 (GMT)
committerJouni Malinen <j@w1.fi>2019-06-23 15:03:51 (GMT)
commit29d8bd1dec79d4093eab7f19135167cdf96e6adc (patch)
tree8ad8da6736bf7b1de9447ddee4b4e972192a8f96 /src/ap/ap_drv_ops.c
parentf74618cb928e1ac9f99556fdadf072b729f2c0e3 (diff)
downloadhostap-29d8bd1dec79d4093eab7f19135167cdf96e6adc.zip
hostap-29d8bd1dec79d4093eab7f19135167cdf96e6adc.tar.gz
hostap-29d8bd1dec79d4093eab7f19135167cdf96e6adc.tar.bz2
nl80211: Add driver multi iftype HE capability parsing
The HE capabilities are no longer per PHY but per iftype on this specific PHY. It is therefore no longer enough to just parse the AP capabilities. The he_capabilities are now duplicated to store all information for IEEE80211_MODE_* which hostap cares about. The nl80211 driver fills in this information when the iftype supports HE. The rest of the code still only uses the IEEE80211_HE_AP portion but can be extended later to also use other HE capabilities. Signed-off-by: Sven Eckelmann <seckelmann@datto.com>
Diffstat (limited to 'src/ap/ap_drv_ops.c')
-rw-r--r--src/ap/ap_drv_ops.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index 7c9dcf9..c0ededa 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -546,14 +546,15 @@ int hostapd_set_freq(struct hostapd_data *hapd, enum hostapd_hw_mode mode,
int center_segment0, int center_segment1)
{
struct hostapd_freq_params data;
+ struct hostapd_hw_modes *cmode = hapd->iface->current_mode;
if (hostapd_set_freq_params(&data, mode, freq, channel, ht_enabled,
vht_enabled, he_enabled, sec_channel_offset,
oper_chwidth,
center_segment0, center_segment1,
- hapd->iface->current_mode ?
- hapd->iface->current_mode->vht_capab : 0,
- &hapd->iface->current_mode->he_capab))
+ cmode ? cmode->vht_capab : 0,
+ cmode ?
+ &cmode->he_capab[IEEE80211_MODE_AP] : NULL))
return -1;
if (hapd->driver == NULL)
@@ -798,8 +799,9 @@ int hostapd_start_dfs_cac(struct hostapd_iface *iface,
struct hostapd_data *hapd = iface->bss[0];
struct hostapd_freq_params data;
int res;
+ struct hostapd_hw_modes *cmode = iface->current_mode;
- if (!hapd->driver || !hapd->driver->start_dfs_cac)
+ if (!hapd->driver || !hapd->driver->start_dfs_cac || !cmode)
return 0;
if (!iface->conf->ieee80211h) {
@@ -812,8 +814,8 @@ int hostapd_start_dfs_cac(struct hostapd_iface *iface,
vht_enabled, he_enabled, sec_channel_offset,
oper_chwidth, center_segment0,
center_segment1,
- iface->current_mode->vht_capab,
- &iface->current_mode->he_capab)) {
+ cmode->vht_capab,
+ &cmode->he_capab[IEEE80211_MODE_AP])) {
wpa_printf(MSG_ERROR, "Can't set freq params");
return -1;
}