int monitor_sock;
int monitor_ifidx;
- int no_monitor_iface_capab;
unsigned int disabled_11b_rates:1;
unsigned int pending_remain_on_chan:1;
unsigned int in_interface_list:1;
+ unsigned int device_ap_sme:1;
u64 remain_on_chan_cookie;
u64 send_action_cookie;
addr = nla_data(tb[NL80211_ATTR_MAC]);
wpa_printf(MSG_DEBUG, "nl80211: New station " MACSTR, MAC2STR(addr));
- if (is_ap_interface(drv->nlmode) && drv->no_monitor_iface_capab) {
+ if (is_ap_interface(drv->nlmode) && drv->device_ap_sme) {
u8 *ies = NULL;
size_t ies_len = 0;
if (tb[NL80211_ATTR_IE]) {
wpa_printf(MSG_DEBUG, "nl80211: Delete station " MACSTR,
MAC2STR(addr));
- if (is_ap_interface(drv->nlmode) && drv->no_monitor_iface_capab) {
+ if (is_ap_interface(drv->nlmode) && drv->device_ap_sme) {
drv_event_disassoc(drv->ctx, addr);
return;
}
struct wpa_driver_capa *capa;
unsigned int error:1;
+ unsigned int device_ap_sme:1;
};
}
}
+ if (tb[NL80211_ATTR_DEVICE_AP_SME])
+ info->device_ap_sme = 1;
+
return NL_SKIP;
}
drv->capa.flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
drv->capa.flags |= WPA_DRIVER_FLAGS_DEAUTH_TX_STATUS;
+ drv->device_ap_sme = info.device_ap_sme;
+
return 0;
}
data, data_len, NULL, 1);
}
- if (drv->no_monitor_iface_capab && is_ap_interface(drv->nlmode)) {
+ if (drv->device_ap_sme && is_ap_interface(drv->nlmode)) {
return nl80211_send_frame_cmd(drv, drv->ap_oper_freq, 0,
data, data_len, NULL, 0);
}
0);
if (drv->monitor_ifidx == -EOPNOTSUPP) {
+ /*
+ * This is backward compatibility for a few versions of
+ * the kernel only that didn't advertise the right
+ * attributes for the only driver that then supported
+ * AP mode w/o monitor -- ath6kl.
+ */
wpa_printf(MSG_DEBUG, "nl80211: Driver does not support "
"monitor interface type - try to run without it");
- drv->no_monitor_iface_capab = 1;
+ drv->device_ap_sme = 1;
}
if (drv->monitor_ifidx < 0)
int qos = flags & WPA_STA_WMM;
#ifdef CONFIG_AP
- if (drv->no_monitor_iface_capab)
+ if (drv->device_ap_sme)
return nl80211_send_eapol_data(bss, addr, data, data_len,
own_addr);
#endif /* CONFIG_AP */
return -1;
}
- if (drv->no_monitor_iface_capab) {
+ if (drv->device_ap_sme) {
if (wpa_driver_nl80211_probe_req_report(&drv->first_bss, 1) < 0)
{
wpa_printf(MSG_DEBUG, "nl80211: Failed to enable "
done:
if (!ret && is_ap_interface(nlmode)) {
/* Setup additional AP mode functionality if needed */
- if (!drv->no_monitor_iface_capab && drv->monitor_ifidx < 0 &&
+ if (!drv->device_ap_sme && drv->monitor_ifidx < 0 &&
nl80211_create_monitor_interface(drv) &&
- !drv->no_monitor_iface_capab)
+ !drv->device_ap_sme)
return -1;
} else if (!ret && !is_ap_interface(nlmode)) {
/* Remove additional AP mode functionality */
- if (was_ap && drv->no_monitor_iface_capab)
+ if (was_ap && drv->device_ap_sme)
wpa_driver_nl80211_probe_req_report(bss, 0);
nl80211_remove_monitor_interface(drv);
bss->beacon_set = 0;