Bladeren bron

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)
Deepthi Gowri 8 jaren geleden
bovenliggende
commit
1f8352170f
2 gewijzigde bestanden met toevoegingen van 32 en 0 verwijderingen
  1. 3 0
      core/hdd/inc/wlan_hdd_p2p.h
  2. 29 0
      core/hdd/src/wlan_hdd_p2p.c

+ 3 - 0
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,

+ 29 - 0
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);