]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add P2P support for BRCM cfg80211 driver
authorDmitry Shmidt <dimitrysh@google.com>
Thu, 21 Jul 2011 22:19:46 +0000 (15:19 -0700)
committerJouni Malinen <j@w1.fi>
Sun, 24 Nov 2013 20:46:38 +0000 (22:46 +0200)
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>
src/drivers/driver_nl80211.c

index a8ff3a392cf1e2103f2dcacbdee5a820e03d21d7..5fe1628ad9d843f403dba17a56e11b92311a00f0 100644 (file)
@@ -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 +