summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSohani Rao <sohanirao@google.com>2017-01-26 14:14:32 -0800
committerBaligh Uddin <baligh@google.com>2017-01-27 18:17:34 +0000
commit05a50ffb74a05df2bc4cb4d6b944114a769989ef (patch)
treee0825cac8f60e8a158d6622af82aa8dae119f480
parent7f5713cff725fd844df955ba74b9bf270aba1c71 (diff)
downloadwlan-05a50ffb74a05df2bc4cb4d6b944114a769989ef.tar.gz
DO NOT MERGE ANYWHERE: Fix P2P failure when setting WPS P2P IE
BRCM kernel has incorrect handling of the command to set WPS IE in probe response. Regardless of the size of the vendor specific IE, the kernel hangs. P2P functionality doesn't need WPS IE to be sent in probe response This CL removes sending of this command the driver to the kernel. Change-Id: I8bbd12c40503205049129336a8d271b3d52d73da Bug: 34619601 Test: Manual P2p tests between two devices with BRCM drivers (cherry picked from commit bc88924cb534f2f80abee28942a0382658a371c9)
-rw-r--r--bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c
index f9dbb95..5d24799 100644
--- a/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c
+++ b/bcmdhd/wpa_supplicant_8_lib/driver_cmd_nl80211.c
@@ -168,48 +168,5 @@ int wpa_driver_set_ap_wps_p2p_ie(void *priv, const struct wpabuf *beacon,
const struct wpabuf *proberesp,
const struct wpabuf *assocresp)
{
- char *buf;
- const struct wpabuf *ap_wps_p2p_ie = NULL;
-
- char *_cmd = "SET_AP_WPS_P2P_IE";
- char *pbuf;
- int ret = 0;
- int i, buf_len;
- struct cmd_desc {
- int cmd;
- const struct wpabuf *src;
- } cmd_arr[] = {
- {0x1, beacon},
- {0x2, proberesp},
- {0x4, assocresp},
- {-1, NULL}
- };
-
- wpa_printf(MSG_DEBUG, "%s: Entry", __func__);
- for (i = 0; cmd_arr[i].cmd != -1; i++) {
- ap_wps_p2p_ie = cmd_arr[i].src;
- if (ap_wps_p2p_ie) {
- buf_len = strlen(_cmd) + 3 + wpabuf_len(ap_wps_p2p_ie);
- buf = os_zalloc(buf_len);
- if (NULL == buf) {
- wpa_printf(MSG_ERROR, "%s: Out of memory",
- __func__);
- ret = -1;
- break;
- }
- } else {
- continue;
- }
- pbuf = buf;
- pbuf += snprintf(pbuf, buf_len - wpabuf_len(ap_wps_p2p_ie),
- "%s %d",_cmd, cmd_arr[i].cmd);
- *pbuf++ = '\0';
- os_memcpy(pbuf, wpabuf_head(ap_wps_p2p_ie), wpabuf_len(ap_wps_p2p_ie));
- ret = wpa_driver_nl80211_driver_cmd(priv, buf, buf, buf_len);
- os_free(buf);
- if (ret < 0)
- break;
- }
-
- return ret;
+ return 0;
}