Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ede53ec authored by sheenam monga's avatar sheenam monga
Browse files

qcacld-3.0: Validate ini for standalone SAP CSA

Currently if sta_sap_scc_on_dfs_chnl is disabled,
standalone sap can come up on DFS channel in non-dbs
hw but standalone sap channel switch to dfs is rejected
by hdd in case of non-dbs hw and with disabled
sta_sap_scc_on_dfs_chnl.

Fix is not to reject standalone sap csa request for
DFS channel on non-dbs hw if sta_sap_scc_on_dfs_chnl is
disabled, as standalone sap can come up on DFS channel
when sta_sap_scc_on_dfs_chnl is set to 0.

Change-Id: Ibd1b0af25309aa5cc7d9629d2cb78311c20fffcb
CRs-Fixed: 3095298
parent 6e258365
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -2956,6 +2956,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_chan_freq,
	struct sap_context *sap_ctx;
	uint8_t conc_rule1 = 0;
	uint8_t scc_on_lte_coex = 0;
	uint8_t  sta_sap_scc_on_dfs_chnl;
	bool is_p2p_go_session = false;
	struct wlan_objmgr_vdev *vdev;
	bool strict;
@@ -3010,9 +3011,16 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_chan_freq,
							    NULL);
	/*
	 * For non-dbs HW, don't allow Channel switch on DFS channel if STA is
	 * not connected.
	 * not connected and sta_sap_scc_on_dfs_chnl is enabled.
	 */
	status = policy_mgr_get_sta_sap_scc_on_dfs_chnl(
				hdd_ctx->psoc, &sta_sap_scc_on_dfs_chnl);
	if (QDF_STATUS_SUCCESS != status) {
		return status;
	}

	if (!sta_cnt && !policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) &&
	    !!sta_sap_scc_on_dfs_chnl &&
	    (wlan_reg_is_dfs_for_freq(hdd_ctx->pdev, target_chan_freq) ||
	    (wlan_reg_is_5ghz_ch_freq(target_chan_freq) &&
	     target_bw == CH_WIDTH_160MHZ))) {