aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver_nl80211.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index a8ff3a3..5fe1628 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3343,6 +3343,14 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
if (tb[NL80211_ATTR_DEVICE_AP_SME])
info->device_ap_sme = 1;
+#ifdef ANDROID_P2P
+ /*
+ * TODO: Make Android drivers advertise NL80211_ATTR_DEVICE_AP_SME
+ * properly to avoid need for this..
+ */
+ info->device_ap_sme = 1;
+#endif /* ANDROID_P2P */
+
wiphy_info_feature_flags(info, tb[NL80211_ATTR_FEATURE_FLAGS]);
wiphy_info_probe_resp_offload(capa,
tb[NL80211_ATTR_PROBE_RESP_OFFLOAD]);
@@ -7624,6 +7632,7 @@ static int nl80211_setup_ap(struct i802_bss *bss)
if (nl80211_mgmt_subscribe_ap(bss))
return -1;
+#ifndef ANDROID_P2P
if (drv->device_ap_sme && !drv->use_monitor)
if (nl80211_mgmt_subscribe_ap_dev_sme(bss))
return -1;
@@ -7632,6 +7641,15 @@ static int nl80211_setup_ap(struct i802_bss *bss)
nl80211_create_monitor_interface(drv) &&
!drv->device_ap_sme)
return -1;
+#else /* ANDROID_P2P */
+ if (drv->device_ap_sme)
+ if (nl80211_mgmt_subscribe_ap_dev_sme(bss))
+ return -1;
+
+ if (drv->use_monitor &&
+ nl80211_create_monitor_interface(drv))
+ return -1;
+#endif /* ANDROID_P2P */
if (drv->device_ap_sme &&
wpa_driver_nl80211_probe_req_report(bss, 1) < 0) {
@@ -7705,7 +7723,11 @@ static int wpa_driver_nl80211_hapd_send_eapol(
int res;
int qos = flags & WPA_STA_WMM;
+#ifndef ANDROID_P2P
if (drv->device_ap_sme || !drv->use_monitor)
+#else /* ANDROID_P2P */
+ if (drv->device_ap_sme && !drv->use_monitor)
+#endif /* ANDROID_P2P */
return nl80211_send_eapol_data(bss, addr, data, data_len);
len = sizeof(*hdr) + (qos ? 2 : 0) + sizeof(rfc1042_header) + 2 +