summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepthi Gowri <deepthi@codeaurora.org>2016-08-30 19:37:05 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-09-11 17:12:19 -0700
commit1f8352170f97d80f03732a9f23c6f52a58de1704 (patch)
treef94e52037563dcbc5968a383bb8c0409a277b117
parent07ac9938763d62a7412a3742aa25ef29f5fa8a32 (diff)
qcacld-3.0: Fix for P2P GO negotiation failure
qcacld-2.0 to qcacld-3.0 propagation The wait time in go negotiation response is set to 100msec by the wpa_supplicant. Due to which, there could be a possibility for the DUT to miss go negotaition confirmation frame if the ROC times out, resulting in connection failure. Also the wait time for GO negotiation confirmation, invitation response and provisional discovery response frames are set to 50msec. To address this, increase the wait times for these response frames. CRs-Fixed: 1050955 Change-Id: I1fa8a0ae669293ab27c5b4f43f6f33465ff3f2c0 (cherry picked from commit 9481683888c272bacddd2d7983b909157a576a97) (cherry picked from commit a5b48ffdb93f686e2df0291143549e657a3eb285)
-rw-r--r--core/hdd/inc/wlan_hdd_p2p.h3
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c29
2 files changed, 32 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_p2p.h b/core/hdd/inc/wlan_hdd_p2p.h
index 761288c44fd8..dca03994011e 100644
--- a/core/hdd/inc/wlan_hdd_p2p.h
+++ b/core/hdd/inc/wlan_hdd_p2p.h
@@ -70,6 +70,9 @@
#define P2P_POWER_SAVE_TYPE_PERIODIC_NOA (1 << 1)
#define P2P_POWER_SAVE_TYPE_SINGLE_NOA (1 << 2)
+#define ACTION_FRAME_RSP_WAIT 500
+#define ACTION_FRAME_ACK_WAIT 300
+
#ifdef WLAN_FEATURE_P2P_DEBUG
typedef enum { P2P_NOT_ACTIVE,
P2P_GO_NEG_PROCESS,
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 1383a3c2bd33..466a13bda124 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -1440,6 +1440,35 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
qdf_mc_timer_get_current_state(&cfgState->
remain_on_chan_ctx->
hdd_remain_on_chan_timer)) {
+
+ /* In the latest wpa_supplicant, the wait time
+ * for go negotiation response is set to 100ms,
+ * due to which, there could be a possibility
+ * that, if the go negotaition confirmation
+ * frame is not received within 100 msec, ROC
+ * would be timeout and resulting in connection
+ * failures as the device will not be on the
+ * listen channel anymore to receive the conf
+ * frame. Also wpa_supplicant has set the wait
+ * to 50msec for go negotiation confirmation,
+ * invitation response and prov discovery rsp
+ * frames. So increase the wait time for all
+ * these frames.
+ */
+ actionFrmType = buf
+ [WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET];
+ if (actionFrmType == WLAN_HDD_GO_NEG_RESP ||
+ actionFrmType == WLAN_HDD_PROV_DIS_RESP)
+ wait = wait + ACTION_FRAME_RSP_WAIT;
+ else if (actionFrmType ==
+ WLAN_HDD_GO_NEG_CNF ||
+ actionFrmType ==
+ WLAN_HDD_INVITATION_RESP)
+ wait = wait + ACTION_FRAME_ACK_WAIT;
+
+ hddLog(LOG1, FL("Extending the wait time %d for actionFrmType=%d"),
+ wait, actionFrmType);
+
qdf_mc_timer_stop(&cfgState->
remain_on_chan_ctx->
hdd_remain_on_chan_timer);