Merge "qcacmn: Cleanup reg_cache_channel_state" into wlan-cmn.driver.lnx.2.0.8.r3-rel

This commit is contained in:
Linux Build Service Account 2023-10-10 05:39:06 -07:00 • committed by Gerrit - the friendly Code Review server
commit cb155787f3
5 changed files with 6 additions and 118 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@ -732,8 +732,8 @@ static void reg_modify_chan_list_for_cached_channels(
if (pdev_priv_obj->disable_cached_channels) {
for (i = 0; i < num_cache_channels; i++)
for (j = 0; j < NUM_CHANNELS; j++)
if (cache_chan_list[i].chan_num ==
chan_list[j].chan_num) {
if (cache_chan_list[i].center_freq ==
chan_list[j].center_freq) {
chan_list[j].state =
CHANNEL_STATE_DISABLE;
chan_list[j].chan_flags |=

View file

@ -686,63 +686,6 @@ QDF_STATUS reg_cache_channel_freq_state(struct wlan_objmgr_pdev *pdev,
return QDF_STATUS_SUCCESS;
}
#endif /* CONFIG_CHAN_FREQ_API */
#ifdef CONFIG_CHAN_NUM_API
QDF_STATUS reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
uint32_t *channel_list,
uint32_t num_channels)
{
struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
struct wlan_objmgr_psoc *psoc;
uint8_t i, j;
pdev_priv_obj = reg_get_pdev_obj(pdev);
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
reg_err("pdev reg component is NULL");
return QDF_STATUS_E_INVAL;
}
psoc = wlan_pdev_get_psoc(pdev);
if (!psoc) {
reg_err("psoc is NULL");
return QDF_STATUS_E_INVAL;
}
psoc_priv_obj = reg_get_psoc_obj(psoc);
if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
reg_err("psoc reg component is NULL");
return QDF_STATUS_E_INVAL;
}
if (pdev_priv_obj->num_cache_channels > 0) {
pdev_priv_obj->num_cache_channels = 0;
qdf_mem_zero(&pdev_priv_obj->cache_disable_chan_list,
sizeof(pdev_priv_obj->cache_disable_chan_list));
}
for (i = 0; i < num_channels; i++) {
for (j = 0; j < NUM_CHANNELS; j++) {
if (channel_list[i] == pdev_priv_obj->
cur_chan_list[j].chan_num) {
pdev_priv_obj->
cache_disable_chan_list[i].chan_num =
channel_list[i];
pdev_priv_obj->
cache_disable_chan_list[i].state =
pdev_priv_obj->cur_chan_list[j].state;
pdev_priv_obj->
cache_disable_chan_list[i].chan_flags =
pdev_priv_obj->
cur_chan_list[j].chan_flags;
}
}
}
pdev_priv_obj->num_cache_channels = num_channels;
return QDF_STATUS_SUCCESS;
}
#endif /* CONFIG_CHAN_NUM_API */
#endif
#ifdef CONFIG_REG_CLIENT

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@ -175,27 +175,6 @@ QDF_STATUS reg_cache_channel_freq_state(struct wlan_objmgr_pdev *pdev,
}
#endif /* defined(DISABLE_CHANNEL_LIST) && defined(CONFIG_CHAN_FREQ_API) */
#if defined(DISABLE_CHANNEL_LIST) && defined(CONFIG_CHAN_NUM_API)
/**
* reg_cache_channel_state() - Cache the current state of the channels
* @pdev: The physical dev to cache the channels for
* @channel_list: List of the channels for which states needs to be cached
* @num_channels: Number of channels in the list
*
*/
QDF_STATUS reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
uint32_t *channel_list,
uint32_t num_channels);
#else
static inline
QDF_STATUS reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
uint32_t *channel_list,
uint32_t num_channels)
{
return QDF_STATUS_SUCCESS;
}
#endif /* defined (DISABLE_CHANNEL_LIST) && defined(CONFIG_CHAN_NUM_API) */
#ifdef CONFIG_REG_CLIENT
/**
* reg_set_band() - Sets the band information for the PDEV

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@ -61,27 +62,6 @@ QDF_STATUS ucfg_reg_get_band(struct wlan_objmgr_pdev *pdev,
QDF_STATUS ucfg_reg_notify_sap_event(struct wlan_objmgr_pdev *pdev,
bool sap_state);
/**
* ucfg_reg_cache_channel_state() - Cache the current state of the channles
* @pdev: The physical dev to cache the channels for
* @channel_list: List of the channels for which states needs to be cached
* @num_channels: Number of channels in the list
*
* Return: QDF_STATUS
*/
#if defined(DISABLE_CHANNEL_LIST) && defined(CONFIG_CHAN_NUM_API)
void ucfg_reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
uint32_t *channel_list,
uint32_t num_channels);
#else
static inline
void ucfg_reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
uint32_t *channel_list,
uint32_t num_channels)
{
}
#endif /* CONFIG_CHAN_NUM_API */
/**
* ucfg_reg_cache_channel_freq_state() - Cache the current state of the
* channels based on the channel center frequency.

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@ -311,21 +312,6 @@ void ucfg_reg_cache_channel_freq_state(struct wlan_objmgr_pdev *pdev,
}
#endif /* CONFIG_CHAN_FREQ_API */
#ifdef CONFIG_CHAN_NUM_API
/**
* ucfg_reg_cache_channel_state() - Cache the current state of the channles
* @pdev: The physical dev to cache the channels for
* @channel_list: List of the channels for which states needs to be cached
* @num_channels: Number of channels in the list
*
*/
void ucfg_reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
uint32_t *channel_list, uint32_t num_channels)
{
reg_cache_channel_state(pdev, channel_list, num_channels);
}
#endif /* CONFIG_CHAN_NUM_API */
void ucfg_reg_restore_cached_channels(struct wlan_objmgr_pdev *pdev)
{
reg_restore_cached_channels(pdev);