Browse Source

qcacld-3.0: Add retry with delay in TWT DEL dialog cmd

Currently, when disabling the power save mode, driver sends
the TWT teardown command 10 times to the firmware. These 10
commands being received by the firmware within 200 ms.
However, this time doesn't enough time for the scanning
process to complete.

To address this issue, added a delay of 500ms between each
TWT teardown command sent by the driver to allow for the
successful completion of scanning before further commands
are issued.

CRs-Fixed: 3626036
Change-Id: I214e5dc94e94eb48f41436f9e5f1a6b9714f4bc1
Deeksha Gupta 1 year ago
parent
commit
e22f9adc77
1 changed files with 2 additions and 0 deletions
  1. 2 0
      os_if/twt/src/osif_twt_ext_req.c

+ 2 - 0
os_if/twt/src/osif_twt_ext_req.c

@@ -46,6 +46,7 @@
 #define TWT_SETUP_WAKE_INTVL_EXP_MAX            31
 #define TWT_MAX_NEXT_TWT_SIZE                   3
 #define TWT_DEL_DIALOG_REQ_MAX_RETRY            10
+#define TWT_TEARDOWN_IN_PS_DISABLE_WAIT_TIME    500
 
 static const struct nla_policy
 qca_wlan_vendor_twt_add_dialog_policy[QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX + 1] = {
@@ -2420,6 +2421,7 @@ static void osif_twt_teardown_req_retry(struct wlan_objmgr_vdev *vdev,
 	int ret;
 
 	while (retries < TWT_DEL_DIALOG_REQ_MAX_RETRY) {
+		qdf_sleep(TWT_TEARDOWN_IN_PS_DISABLE_WAIT_TIME);
 		osif_debug("Implicitly TWT teardown req retry count:%d", retries);
 		ret = osif_send_sta_twt_teardown_req(vdev, psoc, &params);
 		if (ret != -EBUSY)