Add driver capa flag for EAPOL TX status and store capa in hostapd
This commit is contained in:
parent
b67d0d9e4b
commit
2fee890af7
4 changed files with 12 additions and 5 deletions
|
@ -234,6 +234,7 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
|
||||||
struct hostapd_data *hapd = iface->bss[0];
|
struct hostapd_data *hapd = iface->bss[0];
|
||||||
struct hostapd_bss_config *conf = hapd->conf;
|
struct hostapd_bss_config *conf = hapd->conf;
|
||||||
u8 *b = conf->bssid;
|
u8 *b = conf->bssid;
|
||||||
|
struct wpa_driver_capa capa;
|
||||||
|
|
||||||
if (hapd->driver == NULL || hapd->driver->hapd_init == NULL) {
|
if (hapd->driver == NULL || hapd->driver->hapd_init == NULL) {
|
||||||
wpa_printf(MSG_ERROR, "No hostapd driver wrapper available");
|
wpa_printf(MSG_ERROR, "No hostapd driver wrapper available");
|
||||||
|
@ -273,6 +274,10 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hapd->driver->get_capa &&
|
||||||
|
hapd->driver->get_capa(hapd->drv_priv, &capa) == 0)
|
||||||
|
iface->drv_flags = capa.flags;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,6 +184,7 @@ struct hostapd_iface {
|
||||||
struct ap_info *ap_hash[STA_HASH_SIZE];
|
struct ap_info *ap_hash[STA_HASH_SIZE];
|
||||||
struct ap_info *ap_iter_list;
|
struct ap_info *ap_iter_list;
|
||||||
|
|
||||||
|
unsigned int drv_flags;
|
||||||
struct hostapd_hw_modes *hw_features;
|
struct hostapd_hw_modes *hw_features;
|
||||||
int num_hw_features;
|
int num_hw_features;
|
||||||
struct hostapd_hw_modes *current_mode;
|
struct hostapd_hw_modes *current_mode;
|
||||||
|
|
|
@ -561,6 +561,8 @@ struct wpa_driver_capa {
|
||||||
#define WPA_DRIVER_FLAGS_SANE_ERROR_CODES 0x00004000
|
#define WPA_DRIVER_FLAGS_SANE_ERROR_CODES 0x00004000
|
||||||
/* Driver supports off-channel TX */
|
/* Driver supports off-channel TX */
|
||||||
#define WPA_DRIVER_FLAGS_OFFCHANNEL_TX 0x00008000
|
#define WPA_DRIVER_FLAGS_OFFCHANNEL_TX 0x00008000
|
||||||
|
/* Driver indicates TX status events for EAPOL Data frames */
|
||||||
|
#define WPA_DRIVER_FLAGS_EAPOL_TX_STATUS 0x00010000
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
|
||||||
int max_scan_ssids;
|
int max_scan_ssids;
|
||||||
|
|
|
@ -1493,7 +1493,6 @@ nla_put_failure:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef HOSTAPD
|
|
||||||
struct wiphy_info_data {
|
struct wiphy_info_data {
|
||||||
int max_scan_ssids;
|
int max_scan_ssids;
|
||||||
int ap_supported;
|
int ap_supported;
|
||||||
|
@ -1634,11 +1633,11 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
|
||||||
drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
|
drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
|
||||||
if (info.p2p_supported)
|
if (info.p2p_supported)
|
||||||
drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CAPABLE;
|
drv->capa.flags |= WPA_DRIVER_FLAGS_P2P_CAPABLE;
|
||||||
|
drv->capa.flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
|
||||||
drv->capa.max_remain_on_chan = info.max_remain_on_chan;
|
drv->capa.max_remain_on_chan = info.max_remain_on_chan;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* HOSTAPD */
|
|
||||||
|
|
||||||
|
|
||||||
static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv)
|
static int wpa_driver_nl80211_init_nl(struct wpa_driver_nl80211_data *drv)
|
||||||
|
@ -2034,13 +2033,13 @@ wpa_driver_nl80211_finish_drv_init(struct wpa_driver_nl80211_data *drv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wpa_driver_nl80211_capa(drv))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
netlink_send_oper_ifla(drv->netlink, drv->ifindex,
|
netlink_send_oper_ifla(drv->netlink, drv->ifindex,
|
||||||
1, IF_OPER_DORMANT);
|
1, IF_OPER_DORMANT);
|
||||||
#endif /* HOSTAPD */
|
#endif /* HOSTAPD */
|
||||||
|
|
||||||
|
if (wpa_driver_nl80211_capa(drv))
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr))
|
if (linux_get_ifhwaddr(drv->ioctl_sock, bss->ifname, drv->addr))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue