Explorar o código

qcacld-3.0: Add an API to configure EHT OM control

Add support to configure EHT OM control. Also, configure
HE OM control within band specific HE cap structures.

Change-Id: I658281902699be27db536e2134dbd76c99aec41b
CRs-Fixed: 3377862
Gururaj Pandurangi %!s(int64=2) %!d(string=hai) anos
pai
achega
13c8307266
Modificáronse 2 ficheiros con 41 adicións e 0 borrados
  1. 18 0
      core/sme/inc/sme_api.h
  2. 23 0
      core/sme/src/common/sme_api.c

+ 18 - 0
core/sme/inc/sme_api.h

@@ -3111,6 +3111,17 @@ void sme_set_eht_bw_cap(mac_handle_t mac_handle, uint8_t vdev_id,
  */
 void sme_update_eht_cap_mcs(mac_handle_t mac_handle, uint8_t session_id,
 			    uint8_t mcs);
+
+/**
+ * sme_update_eht_om_ctrl_supp() - sets the EHT OM control capability
+ * @mac_handle: Opaque handle to the global MAC context
+ * @session_id: SME session id
+ * @cfg_val: EHT OM control config
+ *
+ * Return: 0 on success else err code
+ */
+int sme_update_eht_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id,
+				uint8_t cfg_val);
 #else
 static inline void sme_update_tgt_eht_cap(mac_handle_t mac_handle,
 					  struct wma_tgt_cfg *cfg,
@@ -3129,6 +3140,13 @@ static inline void sme_update_eht_cap_mcs(mac_handle_t mac_handle,
 					  uint8_t session_id,
 					  uint8_t mcs)
 {}
+
+static inline
+int sme_update_eht_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id,
+				uint8_t cfg_val)
+{
+	return 0;
+}
 #endif
 
 #ifdef WLAN_FEATURE_11AX

+ 23 - 0
core/sme/src/common/sme_api.c

@@ -10495,6 +10495,27 @@ void sme_set_eht_bw_cap(mac_handle_t mac_handle, uint8_t vdev_id,
 
 	csr_update_session_eht_cap(mac_ctx, session);
 }
+
+int sme_update_eht_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id,
+				uint8_t cfg_val)
+{
+	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
+	struct csr_roam_session *session;
+
+	session = CSR_GET_SESSION(mac_ctx, session_id);
+
+	if (!session) {
+		sme_err("No session for id %d", session_id);
+		return -EINVAL;
+	}
+	mac_ctx->mlme_cfg->eht_caps.dot11_eht_cap.eht_om_ctl = cfg_val;
+	mac_ctx->eht_cap_2g.eht_om_ctl = cfg_val;
+	mac_ctx->eht_cap_5g.eht_om_ctl = cfg_val;
+
+	csr_update_session_eht_cap(mac_ctx, session);
+
+	return 0;
+}
 #endif
 
 #ifdef WLAN_FEATURE_11AX
@@ -10891,6 +10912,8 @@ int sme_update_he_om_ctrl_supp(mac_handle_t mac_handle, uint8_t session_id,
 		return -EINVAL;
 	}
 	mac_ctx->mlme_cfg->he_caps.dot11_he_cap.omi_a_ctrl = cfg_val;
+	mac_ctx->he_cap_2g.omi_a_ctrl = cfg_val;
+	mac_ctx->he_cap_5g.omi_a_ctrl = cfg_val;
 
 	csr_update_session_he_cap(mac_ctx, session);
 	return 0;