Browse Source

qcacld-3.0: Disallow MCC for STA_POLICY_UNBIASED

Even primary interface is configured, if dual STA policy is
STA_POLICY_UNBIASED, MCC is disallowed for both roaming and connect.

Change-Id: I6e26fdcdc930eb116771abfe310811c6534be09f
CRs-Fixed: 3396425
Jianmin Zhu 2 years ago
parent
commit
1eb2511a22

+ 1 - 5
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -2854,11 +2854,7 @@ QDF_STATUS wlan_mlme_set_primary_interface(struct wlan_objmgr_psoc *psoc,
 
 bool wlan_mlme_is_primary_interface_configured(struct wlan_objmgr_psoc *psoc)
 {
-	uint8_t dual_sta_config = 0xFF;
-
-	wlan_mlme_get_dual_sta_policy(psoc, &dual_sta_config);
-	return (dual_sta_config ==
-		QCA_WLAN_CONCURRENT_STA_POLICY_PREFER_PRIMARY);
+	return wlan_cm_same_band_sta_allowed(psoc);
 }
 
 QDF_STATUS wlan_mlme_peer_get_assoc_rsp_ies(struct wlan_objmgr_peer *peer,

+ 4 - 2
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -278,7 +278,9 @@ bool wlan_cm_same_band_sta_allowed(struct wlan_objmgr_psoc *psoc)
 		return true;
 
 	dual_sta_policy = &mlme_obj->cfg.gen.dual_sta_policy;
-	if (dual_sta_policy->primary_vdev_id != WLAN_UMAC_VDEV_ID_MAX)
+	if (dual_sta_policy->primary_vdev_id != WLAN_UMAC_VDEV_ID_MAX &&
+	    dual_sta_policy->concurrent_sta_policy ==
+	    QCA_WLAN_CONCURRENT_STA_POLICY_PREFER_PRIMARY)
 		return true;
 
 	return false;
@@ -496,7 +498,7 @@ wlan_cm_dual_sta_roam_update_connect_channels(struct wlan_objmgr_psoc *psoc,
 	 * environment, so that user can switch to second
 	 * connection and mark it as primary.
 	 */
-	if (dual_sta_policy->primary_vdev_id != WLAN_UMAC_VDEV_ID_MAX)
+	if (wlan_mlme_is_primary_interface_configured(psoc))
 		return;
 
 	/*

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -10008,7 +10008,7 @@ static int hdd_set_primary_interface(struct hdd_adapter *adapter,
 	 * If dual sta roaming NOT enabled then need to enable roaming on
 	 * primary vdev for sta concurrency on different mac.
 	 */
-	if (primary_vdev_id !=  WLAN_UMAC_VDEV_ID_MAX)
+	if (wlan_mlme_is_primary_interface_configured(hdd_ctx->psoc))
 		if ((ucfg_mlme_get_dual_sta_roaming_enabled(hdd_ctx->psoc) &&
 		     !policy_mgr_concurrent_sta_on_different_mac(hdd_ctx->psoc)) ||
 		    !ucfg_mlme_get_dual_sta_roaming_enabled(hdd_ctx->psoc)) {