summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSohani Rao <sohanirao@google.com>2017-01-26 14:14:32 -0800
committerSohani Rao <sohanirao@google.com>2017-01-26 14:34:51 -0800
commitbc88924cb534f2f80abee28942a0382658a371c9 (patch)
treeb4a55448604e89653c917fd4a041ada562eea9f1
parentf30dcb0120098ee3a53d78e74077a460682a7c8c (diff)
downloadhardware_replicant_wlan-bc88924cb534f2f80abee28942a0382658a371c9.tar.gz
hardware_replicant_wlan-bc88924cb534f2f80abee28942a0382658a371c9.tar.bz2
hardware_replicant_wlan-bc88924cb534f2f80abee28942a0382658a371c9.zip
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
-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;
}