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

Commit baf0b1d1 authored by Vinod Kumar Myadam's avatar Vinod Kumar Myadam Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: refine functions for getting preferred channel list

Refine policy manager get PCL channel list APIs to help
add new PCL type.

Change-Id: I1e9d49c5f0a8c2c38f1fb5302615bc956ed6aae0
CRs-Fixed: 2998478
parent 76fdddbc
Loading
Loading
Loading
Loading
+361 −388

File changed.

Preview size limit exceeded, changes collapsed.

+25 −4
Original line number Diff line number Diff line
@@ -571,11 +571,32 @@ void pm_dbs_opportunistic_timer_handler(void *data);
enum policy_mgr_con_mode policy_mgr_get_mode(uint8_t type,
		uint8_t subtype);

/**
 * policy_mgr_get_bw() - Convert phy_ch_width to hw_mode_bandwidth.
 * @chan_width: phy_ch_width
 *
 * Return: hw_mode_bandwidth
 */
enum hw_mode_bandwidth policy_mgr_get_bw(enum phy_ch_width chan_width);

/**
 * policy_mgr_get_channel_list() - Get channel list based on PCL and mode
 * @psoc: psoc object
 * @pcl: pcl type
 * @mode: interface mode
 * @pcl_channels: pcl channel list buffer
 * @pcl_weights: pcl weight buffer
 * @pcl_sz: pcl channel list buffer size
 * @len: pcl channel number returned from API
 *
 * Return: QDF_STATUS
 */
QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc,
				       enum policy_mgr_pcl_type pcl,
			uint32_t *pcl_channels, uint32_t *len,
				       enum policy_mgr_con_mode mode,
			uint8_t *pcl_weights, uint32_t weight_len);
				       uint32_t *pcl_channels,
				       uint8_t *pcl_weights,
				       uint32_t pcl_sz, uint32_t *len);

/**
 * policy_mgr_allow_new_home_channel() - Check for allowed number of
+2 −2
Original line number Diff line number Diff line
@@ -1022,8 +1022,8 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
	/* once the PCL enum is obtained find out the exact channel list with
	 * help from sme_get_cfg_valid_channels
	 */
	status = policy_mgr_get_channel_list(psoc, pcl, pcl_channels, len, mode,
					pcl_weight, weight_len);
	status = policy_mgr_get_channel_list(psoc, pcl, mode, pcl_channels,
					     pcl_weight, weight_len, len);
	if (QDF_IS_STATUS_ERROR(status)) {
		policy_mgr_err("failed to get channel list:%d", status);
		return status;