qcacld-3.0: Set PCL List as per roam band to fw for connected STA

Whenever host Receives vendor command for SETROAMBAND, Host should
set PCL list as per roam band to fw so that FW can use updated pcl
list for further roaming.

Change-Id: I2f48833801b75f25aaf37ea479867b19477ceecb
CRs-Fixed: 3009751
这个提交包含在:
abhinav kumar
2021-08-02 10:52:10 +05:30
提交者 Madan Koyyalamudi
父节点 0697018d60
当前提交 5823512803
修改 7 个文件,包含 140 行新增0 行删除

查看文件

@@ -1474,6 +1474,7 @@ policy_mgr_get_connected_roaming_vdev_band_mask(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_vdev *vdev;
bool dual_sta_roam_active;
struct wlan_channel *chan;
uint32_t roam_band_mask;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_POLICY_MGR_ID);
@@ -1489,6 +1490,15 @@ policy_mgr_get_connected_roaming_vdev_band_mask(struct wlan_objmgr_psoc *psoc,
return 0;
}
roam_band_mask = wlan_cm_get_roam_band_value(psoc, vdev_id);
/*
* if vendor command to configure roam band is set , we will
* take this as priority instead of drv cmd "SETROAMINTRABAND" or
* active connection band.
*/
if (roam_band_mask != REG_BAND_MASK_ALL)
return roam_band_mask;
/*
* If PCL command is PDEV level, only one sta is active.
* So fill the band mask if intra band roaming is enabled

查看文件

@@ -500,6 +500,60 @@ cm_roam_scan_offload_fill_lfr3_config(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_SUCCESS;
}
bool
cm_roam_is_change_in_band_allowed(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t roam_band_mask)
{
struct wlan_objmgr_vdev *vdev;
uint32_t count;
bool concurrency_is_dbs;
struct wlan_channel *chan;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_MLME_NB_ID);
if (!vdev) {
mlme_err("vdev is NULL");
return false;
}
chan = wlan_vdev_get_active_channel(vdev);
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
if (!chan) {
mlme_err("no active channel");
return false;
}
count = policy_mgr_mode_specific_connection_count(psoc, PM_STA_MODE,
NULL);
if (count != 2)
return true;
concurrency_is_dbs = !(policy_mgr_current_concurrency_is_mcc(psoc) ||
policy_mgr_current_concurrency_is_scc(psoc));
if (!concurrency_is_dbs)
return true;
mlme_debug("STA + STA concurrency is in DBS. ch freq %d, roam band:%d",
chan->ch_freq, roam_band_mask);
if (wlan_reg_freq_to_band(chan->ch_freq) == REG_BAND_2G &&
(!(roam_band_mask & BIT(REG_BAND_2G)))) {
mlme_debug("Change in band (2G to 5G/6G) not allowed");
return false;
}
if ((wlan_reg_freq_to_band(chan->ch_freq) == REG_BAND_5G ||
wlan_reg_freq_to_band(chan->ch_freq) == REG_BAND_6G) &&
(!(roam_band_mask & BIT(REG_BAND_5G)) &&
!(roam_band_mask & BIT(REG_BAND_6G)))) {
mlme_debug("Change in band (5G/6G to 2G) not allowed");
return false;
}
return true;
}
#else
static inline void
cm_roam_reason_vsie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,

查看文件

@@ -101,6 +101,19 @@ QDF_STATUS
cm_roam_fill_rssi_change_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
struct wlan_roam_rssi_change_params *params);
/**
* cm_roam_is_change_in_band_allowed - Check whether change in roam band is
* allowed in FW or not
* @psoc: psoc pointer
* @vdev_id: VDEV id
* @roam_band_mask: band mask to check
*
* Return: return true if change in band allowed
*/
bool
cm_roam_is_change_in_band_allowed(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t roam_band_mask);
/**
* cm_dump_freq_list() - dump chan list
* @chan_info: chan info to dump

查看文件

@@ -752,6 +752,16 @@ QDF_STATUS
wlan_cm_roam_extract_roam_msg_info(wmi_unified_t wmi, void *evt_buf,
struct roam_msg_info *dst, uint8_t idx);
/**
* wlan_cm_get_roam_band_value - Get roam band value from RSO config
* @psoc: psoc pointer
* @vdev_id: vdev id
*
* Return: Roam Band
*/
uint32_t wlan_cm_get_roam_band_value(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);
/**
* wlan_cm_roam_activate_pcl_per_vdev() - Set the PCL command to be sent per
* vdev instead of pdev.
@@ -1051,6 +1061,13 @@ void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
bool pcl_per_vdev)
{}
static inline
uint32_t wlan_cm_get_roam_band_value(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id)
{
return REG_BAND_MASK_ALL;
}
static inline
bool wlan_cm_roam_is_pcl_per_vdev_active(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id)

查看文件

@@ -130,6 +130,13 @@ ucfg_cm_set_roam_band_mask(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
return wlan_cm_set_roam_band_bitmask(psoc, vdev_id, roam_band_mask);
}
static inline bool
ucfg_cm_is_change_in_band_allowed(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t roam_band_mask)
{
return cm_roam_is_change_in_band_allowed(psoc, vdev_id, roam_band_mask);
}
#else
static inline QDF_STATUS
ucfg_cm_update_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
@@ -145,6 +152,14 @@ ucfg_cm_set_roam_band_mask(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
{
return QDF_STATUS_SUCCESS;
}
static inline bool
ucfg_cm_is_change_in_band_allowed(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, uint32_t roam_band_mask)
{
return true;
}
#endif
/**

查看文件

@@ -366,6 +366,19 @@ wlan_cm_roam_extract_roam_msg_info(wmi_unified_t wmi, void *evt_buf,
return QDF_STATUS_E_FAILURE;
}
uint32_t wlan_cm_get_roam_band_value(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id)
{
struct cm_roam_values_copy config;
uint32_t band_mask;
wlan_cm_roam_cfg_get_value(psoc, vdev_id, ROAM_BAND, &config);
band_mask = config.uint_value;
mlme_debug("[ROAM BAND] band mask:%d", band_mask);
return band_mask;
}
void wlan_cm_roam_activate_pcl_per_vdev(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id, bool pcl_per_vdev)
{
@@ -754,6 +767,9 @@ QDF_STATUS wlan_cm_roam_cfg_get_value(struct wlan_objmgr_psoc *psoc,
case LOST_LINK_RSSI:
dst_config->int_value = rso_cfg->lost_link_rssi;
break;
case ROAM_BAND:
dst_config->uint_value = rso_cfg->roam_band_bitmask;
break;
default:
mlme_err("Invalid roam config requested:%d", roam_cfg_type);
status = QDF_STATUS_E_FAILURE;