1
0

qcacld-3.0: Init channel avoidance in policy manager

Currenly only hdd initializes channel avoidance from platform.
Policy manager should also initialize channel avoidance from platform.

Change-Id: Iefcaae5ff4789d7d334ab2cab693f5dedfd2ca46
CRs-Fixed: 2645512
Este cometimento está contido em:
bings
2020-03-20 12:39:11 +08:00
cometido por nshrivas
ascendente 771ba6828c
cometimento 9e2de44e7f
5 ficheiros modificados com 65 adições e 2 eliminações

Ver ficheiro

@@ -637,6 +637,18 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
uint32_t *pcl_channels, uint32_t *len,
uint8_t *pcl_weight, uint32_t weight_len);
/**
* policy_mgr_init_chan_avoidance() - init channel avoidance in policy manager.
* @psoc: PSOC object information
* @chan_freq_list: channel frequency list
* @chan_cnt: channel count
*
* Return: QDF_STATUS
*/
QDF_STATUS policy_mgr_init_chan_avoidance(struct wlan_objmgr_psoc *psoc,
qdf_freq_t *chan_freq_list,
uint16_t chan_cnt);
/**
* policy_mgr_update_with_safe_channel_list() - provides the safe
* channel list

Ver ficheiro

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -254,6 +254,20 @@ bool
ucfg_policy_mgr_get_dfs_master_dynamic_enabled(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);
/**
* ucfg_policy_mgr_init_chan_avoidance() - init channel avoidance in policy
* manager
* @psoc: pointer to psoc
* @chan_freq_list: channel frequency list
* @chan_cnt: channel count
*
* Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
*/
QDF_STATUS
ucfg_policy_mgr_init_chan_avoidance(struct wlan_objmgr_psoc *psoc,
qdf_freq_t *chan_freq_list,
uint16_t chan_cnt);
/**
* ucfg_policy_mgr_get_sap_mandt_chnl() - to find out if SAP mandatory channel
* support is enabled

Ver ficheiro

@@ -212,6 +212,31 @@ policy_mgr_reg_chan_change_callback(struct wlan_objmgr_psoc *psoc,
pm_ctx->unsafe_channel_count);
}
QDF_STATUS policy_mgr_init_chan_avoidance(struct wlan_objmgr_psoc *psoc,
qdf_freq_t *chan_freq_list,
uint16_t chan_cnt)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
uint32_t i;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("Invalid Context");
return QDF_STATUS_E_FAILURE;
}
pm_ctx->unsafe_channel_count = chan_cnt >= NUM_CHANNELS ?
NUM_CHANNELS : chan_cnt;
for (i = 0; i < pm_ctx->unsafe_channel_count; i++)
pm_ctx->unsafe_channel_list[i] = chan_freq_list[i];
policy_mgr_debug("Channel list init, received %d avoided channels",
pm_ctx->unsafe_channel_count);
return QDF_STATUS_SUCCESS;
}
void policy_mgr_update_with_safe_channel_list(struct wlan_objmgr_psoc *psoc,
uint32_t *pcl_channels,
uint32_t *len,

Ver ficheiro

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -206,6 +206,14 @@ ucfg_policy_mgr_get_sta_sap_scc_lte_coex_chnl(struct wlan_objmgr_psoc *psoc,
sta_sap_scc_lte_coex);
}
QDF_STATUS
ucfg_policy_mgr_init_chan_avoidance(struct wlan_objmgr_psoc *psoc,
qdf_freq_t *chan_freq_list,
uint16_t chan_cnt)
{
return policy_mgr_init_chan_avoidance(psoc, chan_freq_list, chan_cnt);
}
QDF_STATUS ucfg_policy_mgr_get_sap_mandt_chnl(struct wlan_objmgr_psoc *psoc,
uint8_t *sap_mandt_chnl)
{