Sfoglia il codice sorgente

qcacld-3.0: Save EPCS Capability in psoc

Save EPCS Capability in psoc instead of vdev to avoid the value
lost when random MAC setting happends.

Change-Id: I35299da59156dc1197adaa3350b0d11255b76c2e
CRs-Fixed: 3551773
Paul Zhang 1 anno fa
parent
commit
11a1a57d1d

+ 1 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -2587,6 +2587,7 @@ static void mlme_init_sta_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_MAX_LI_MODULATED_DTIM_MS);
 
 	mlme_init_sta_mlo_cfg(psoc, sta);
+	wlan_mlme_set_epcs_capability(psoc, false);
 	wlan_mlme_set_usr_disable_sta_eht(psoc, false);
 }
 

+ 28 - 0
components/mlme/dispatcher/inc/wlan_mlme_api.h

@@ -1160,6 +1160,23 @@ QDF_STATUS mlme_update_tgt_mlo_caps_in_cfg(struct wlan_objmgr_psoc *psoc);
 enum phy_ch_width wlan_mlme_convert_eht_op_bw_to_phy_ch_width(
 						uint8_t channel_width);
 
+/**
+ * wlan_mlme_get_epcs_capability() - Get mlme epcs capability flag
+ * @psoc: psoc object
+ *
+ * Return: true if epcs capability enabled
+ */
+bool wlan_mlme_get_epcs_capability(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * wlan_mlme_set_epcs_capability() - Set mlme epcs capability flag
+ * @psoc: psoc object
+ * @flag: epcs capability flag
+ *
+ * Return: void
+ */
+void wlan_mlme_set_epcs_capability(struct wlan_objmgr_psoc *psoc, bool flag);
+
 /**
  * wlan_mlme_get_usr_disable_sta_eht() - Get user disable sta eht flag
  * @psoc: psoc object
@@ -1178,6 +1195,17 @@ bool wlan_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc);
 void wlan_mlme_set_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc,
 				       bool disable);
 #else
+static inline
+bool wlan_mlme_get_epcs_capability(struct wlan_objmgr_psoc *psoc)
+{
+	return false;
+}
+
+static inline
+void wlan_mlme_set_epcs_capability(struct wlan_objmgr_psoc *psoc, bool flag)
+{
+}
+
 static inline
 bool wlan_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc)
 {

+ 2 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1727,6 +1727,7 @@ enum station_prefer_bw {
  * @mlo_support_link_band:          band bitmap that sta mlo supports
  * @mlo_max_simultaneous_links:     number of simultaneous links
  * @mlo_prefer_percentage:          percentage to boost/reduce mlo scoring
+ * @epcs_capability:                epcs capability enable or disable flag
  * @usr_disable_eht:                user disable the eht for STA
  */
 struct wlan_mlme_sta_cfg {
@@ -1762,6 +1763,7 @@ struct wlan_mlme_sta_cfg {
 	int8_t mlo_prefer_percentage;
 #endif
 #ifdef WLAN_FEATURE_11BE
+	bool epcs_capability;
 	bool usr_disable_eht;
 #endif
 };

+ 22 - 0
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -1211,6 +1211,28 @@ enum phy_ch_width wlan_mlme_convert_eht_op_bw_to_phy_ch_width(
 	return phy_bw;
 }
 
+bool wlan_mlme_get_epcs_capability(struct wlan_objmgr_psoc *psoc)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
+
+	if (!mlme_obj)
+		return true;
+
+	return mlme_obj->cfg.sta.epcs_capability;
+}
+
+void wlan_mlme_set_epcs_capability(struct wlan_objmgr_psoc *psoc, bool flag)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
+
+	if (!mlme_obj)
+		return;
+
+	mlme_debug("set mlme epcs capability from %d to %d",
+		   mlme_obj->cfg.sta.epcs_capability, flag);
+	mlme_obj->cfg.sta.epcs_capability = flag;
+}
+
 bool wlan_mlme_get_usr_disable_sta_eht(struct wlan_objmgr_psoc *psoc)
 {
 	struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);

+ 4 - 4
components/umac/mlme/mlo_mgr/src/wlan_epcs_api.c

@@ -644,7 +644,7 @@ QDF_STATUS wlan_epcs_deliver_cmd(struct wlan_objmgr_vdev *vdev,
 	if (!vdev)
 		return QDF_STATUS_E_FAILURE;
 
-	if (!wlan_vdev_mlme_get_epcs_flag(vdev)) {
+	if (!wlan_mlme_get_epcs_capability(wlan_vdev_get_psoc(vdev))) {
 		mlme_info("EPCS has been disabled");
 		return QDF_STATUS_E_FAILURE;
 	}
@@ -658,9 +658,9 @@ QDF_STATUS wlan_epcs_set_config(struct wlan_objmgr_vdev *vdev, uint8_t flag)
 		return QDF_STATUS_E_FAILURE;
 
 	if (flag)
-		wlan_vdev_mlme_set_epcs_flag(vdev, true);
+		wlan_mlme_set_epcs_capability(wlan_vdev_get_psoc(vdev), true);
 	else
-		wlan_vdev_mlme_set_epcs_flag(vdev, false);
+		wlan_mlme_set_epcs_capability(wlan_vdev_get_psoc(vdev), false);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -672,7 +672,7 @@ bool wlan_epcs_get_config(struct wlan_objmgr_vdev *vdev)
 	if (!vdev)
 		return false;
 
-	epcs_flag = wlan_vdev_mlme_get_epcs_flag(vdev);
+	epcs_flag = wlan_mlme_get_epcs_capability(wlan_vdev_get_psoc(vdev));
 	mlme_debug("EPCS %s", epcs_flag ? "Enabled" : "Disabled");
 
 	return epcs_flag;