Browse Source

qcacld-3.0: Add support for TWT disable

Add support for TWT disable operation.

Change-Id: Idd556863e3192bf1bddd5b174567d34137aa7ed4
CRs-Fixed: 3085519
Srinivas Girigowda 3 years ago
parent
commit
cc019663ab
2 changed files with 38 additions and 0 deletions
  1. 16 0
      core/hdd/src/wlan_hdd_twt.c
  2. 22 0
      os_if/twt/src/osif_twt_ext_req.c

+ 16 - 0
core/hdd/src/wlan_hdd_twt.c

@@ -78,6 +78,22 @@ QDF_STATUS hdd_send_twt_requestor_enable_cmd(struct hdd_context *hdd_ctx)
 	return QDF_STATUS_SUCCESS;
 }
 
+void hdd_send_twt_role_disable_cmd(struct hdd_context *hdd_ctx,
+				   enum twt_role role)
+{
+	uint8_t pdev_id = hdd_ctx->pdev->pdev_objmgr.wlan_pdev_id;
+
+	osif_twt_send_responder_disable_cmd(hdd_ctx->psoc, pdev_id);
+}
+
+QDF_STATUS hdd_send_twt_responder_disable_cmd(struct hdd_context *hdd_ctx)
+{
+	uint8_t pdev_id = hdd_ctx->pdev->pdev_objmgr.wlan_pdev_id;
+
+	osif_twt_send_responder_disable_cmd(hdd_ctx->psoc, pdev_id);
+	return QDF_STATUS_SUCCESS;
+}
+
 #elif defined(WLAN_SUPPORT_TWT)
 
 #define TWT_DISABLE_COMPLETE_TIMEOUT 1000

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

@@ -63,6 +63,28 @@ int osif_twt_send_responder_enable_cmd(struct wlan_objmgr_psoc *psoc,
 	return osif_twt_responder_enable(psoc, &req);
 }
 
+int osif_twt_send_requestor_disable_cmd(struct wlan_objmgr_psoc *psoc,
+					uint8_t pdev_id)
+{
+	struct twt_disable_param req = {0};
+
+	req.pdev_id = pdev_id;
+	req.ext_conf_present = true;
+
+	return osif_twt_requestor_disable(psoc, &req);
+}
+
+int osif_twt_send_responder_disable_cmd(struct wlan_objmgr_psoc *psoc,
+					uint8_t pdev_id)
+{
+	struct twt_disable_param req = {0};
+
+	req.pdev_id = pdev_id;
+	req.ext_conf_present = true;
+
+	return osif_twt_responder_disable(psoc, &req);
+}
+
 int osif_twt_setup_req(struct wlan_objmgr_vdev *vdev,
 		       struct nlattr *twt_param_attr)
 {