Преглед на файлове

qcacld-3.0: Enable peer map v2 feature only for wds mode

Set peer map v2 in the target resource config only when
the wds mode is enabled in the ini "wds_mode".

CRs-Fixed: 2958287

Change-Id: Ifbedc8c29e8c6278875ad13c6fe6b0fb557feece
Subrat Dash преди 4 години
родител
ревизия
242f56b2a4
променени са 1 файла, в които са добавени 7 реда и са изтрити 4 реда
  1. 7 4
      core/wma/src/wma_main.c

+ 7 - 4
core/wma/src/wma_main.c

@@ -278,18 +278,21 @@ static void wma_update_num_peers_tids(t_wma_handle *wma_handle,
 #ifdef FEATURE_WDS
 /**
  * wma_set_peer_map_unmap_v2_config() - Update peer_map_unmap_v2
+ * @psoc: Object manager psoc
  * @tgt_cfg: Resource config given to target
  *
  * This function enables Peer map/unmap v2 feature.
  *
  * Return: none
  */
-static void wma_set_peer_map_unmap_v2_config(target_resource_config *tgt_cfg)
+static void wma_set_peer_map_unmap_v2_config(struct wlan_objmgr_psoc *psoc,
+					     target_resource_config *tgt_cfg)
 {
-	tgt_cfg->peer_map_unmap_v2 = true;
+	tgt_cfg->peer_map_unmap_v2 = cfg_get(psoc, CFG_WDS_MODE) ? true : false;
 }
 #else
-static void wma_set_peer_map_unmap_v2_config(target_resource_config *tgt_cfg)
+static void wma_set_peer_map_unmap_v2_config(struct wlan_objmgr_psoc *psoc,
+					     target_resource_config *tgt_cfg)
 {
 	tgt_cfg->peer_map_unmap_v2 = false;
 }
@@ -385,7 +388,7 @@ static void wma_set_default_tgt_config(tp_wma_handle wma_handle,
 				     &tgt_cfg->max_ndp_sessions);
 
 	wma_set_ipa_disable_config(tgt_cfg);
-	wma_set_peer_map_unmap_v2_config(tgt_cfg);
+	wma_set_peer_map_unmap_v2_config(wma_handle->psoc, tgt_cfg);
 }
 
 /**