Browse Source

qcacmn: Set rTWT in TWT enable operation

TWT requestor must set enable/disable for rTWT when device connects
to AP. Set r_twt_enable param in TWT enable operation.

Change-Id: I24c60802b49cef6486bd7df97c1833fd6d89aac1
CRs-Fixed: 3463468
David Oladunjoye 2 years ago
parent
commit
84eb559a6f
1 changed files with 9 additions and 2 deletions
  1. 9 2
      umac/twt/core/src/wlan_twt_common.c

+ 9 - 2
umac/twt/core/src/wlan_twt_common.c

@@ -212,6 +212,7 @@ wlan_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
 {
 	struct twt_psoc_priv_obj *twt_psoc;
 	bool requestor_en = false, twt_bcast_requestor = false;
+	bool rtwt_requestor = false, restricted_support = false;
 
 	twt_psoc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
 							 WLAN_UMAC_COMP_TWT);
@@ -238,8 +239,14 @@ wlan_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
 	else
 		req->twt_oper = TWT_OPERATION_INDIVIDUAL;
 
-	twt_debug("TWT req enable: pdev_id:%d cong:%d bcast:%d",
-		  req->pdev_id, req->sta_cong_timer_ms, req->b_twt_enable);
+	wlan_twt_cfg_get_rtwt_requestor(psoc, &rtwt_requestor);
+	wlan_twt_tgt_caps_get_restricted_support(psoc, &restricted_support);
+
+	req->r_twt_enable = QDF_MIN(restricted_support, rtwt_requestor);
+
+	twt_debug("TWT req enable: pdev_id:%d cong:%d bcast:%d rtwt:%d",
+		  req->pdev_id, req->sta_cong_timer_ms, req->b_twt_enable,
+		  req->r_twt_enable);
 	twt_debug("TWT req enable: role:%d ext:%d oper:%d",
 		  req->twt_role, req->ext_conf_present, req->twt_oper);