aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_nl80211.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2011-07-21 22:19:46 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-24 20:46:38 (GMT)
commit615831e8ae5ae2fc77bf94b83392795a3a61f1ed (patch)
tree80eb15d420b271fca9a627f3196b6af2295ca337 /src/drivers/driver_nl80211.c
parent7e6f5d1e0c881e0e1a1b608f6d211bc1bb496bbf (diff)
downloadhostap-615831e8ae5ae2fc77bf94b83392795a3a61f1ed.zip
hostap-615831e8ae5ae2fc77bf94b83392795a3a61f1ed.tar.gz
hostap-615831e8ae5ae2fc77bf94b83392795a3a61f1ed.tar.bz2
nl80211: Add P2P support for BRCM cfg80211 driver
This is a merge of following commits that first added vendor specific extensions in ICS and moved closer to upstream implementation in JB: Add P2P support for BRCM CFG80211 driver (nl80211) Change-Id: Iafec4bedbd33836d0a64e7ea054d8a46ef8ec204 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> nl80211: Add MLME events (BRCM) Fix WFD and WPS certification problem for GO (BRCM) Change-Id: I5bbac818aad7c0a14fddb3beb88a6a2d87c07ea0 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> nl80211: Use native cfg80211 sta events Change-Id: Id59cc4af50dbccd283db2ec3e7b0b6f8c2146e68 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/drivers/driver_nl80211.c')
-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 +