qcacld-3.0: Replace typedef tSmeConfigParams
The Linux Coding Style enumerates a few special cases where typedefs are useful, but stresses "NEVER EVER use a typedef unless you can clearly match one of those rules." The tSmeConfigParams typedef does not meet any of those criteria, so replace it (and the "tp" variant) with a reference to the underlying struct. Further note the Linux Coding Style frowns upon mixed-case names and so-called Hungarian notation, so in conjunction rename the underlying struct to be in compliance. Change-Id: I926cf67d87398782049bf9acbcd06f806a7cec29 CRs-Fixed: 2412715
This commit is contained in:
parent
13926ec103
commit
46b4f0e2cc
@ -1138,9 +1138,9 @@ eCsrRoamWmmUserModeType hdd_to_csr_wmm_mode(uint8_t mode)
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
QDF_STATUS hdd_set_sme_cfgs_related_to_plcy_mgr(struct hdd_context *hdd_ctx,
|
||||
tSmeConfigParams *sme_cfg)
|
||||
static QDF_STATUS
|
||||
hdd_set_sme_cfgs_related_to_plcy_mgr(struct hdd_context *hdd_ctx,
|
||||
struct sme_config_params *sme_cfg)
|
||||
{
|
||||
uint8_t mcc_to_scc_switch = 0, is_force_1x1 = 0, allow_diff_bi = 0;
|
||||
uint8_t conc_rule1 = 0, conc_rule2 = 0, sta_cxn_5g = 0;
|
||||
@ -1197,14 +1197,14 @@ QDF_STATUS hdd_set_sme_cfgs_related_to_plcy_mgr(struct hdd_context *hdd_ctx,
|
||||
}
|
||||
|
||||
#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
|
||||
static QDF_STATUS hdd_set_sap_mcc_chnl_avoid(tSmeConfigParams *sme_cfg,
|
||||
static QDF_STATUS hdd_set_sap_mcc_chnl_avoid(struct sme_config_params *sme_cfg,
|
||||
uint8_t val)
|
||||
{
|
||||
sme_cfg->csrConfig.sap_channel_avoidance = val;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#else
|
||||
static QDF_STATUS hdd_set_sap_mcc_chnl_avoid(tSmeConfigParams *sme_cfg,
|
||||
static QDF_STATUS hdd_set_sap_mcc_chnl_avoid(struct sme_config_params *sme_cfg,
|
||||
uint8_t val)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
@ -1213,7 +1213,7 @@ static QDF_STATUS hdd_set_sap_mcc_chnl_avoid(tSmeConfigParams *sme_cfg,
|
||||
|
||||
static
|
||||
QDF_STATUS hdd_set_sme_cfgs_related_to_mlme(struct hdd_context *hdd_ctx,
|
||||
tSmeConfigParams *sme_cfg)
|
||||
struct sme_config_params *sme_cfg)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
uint8_t wmm_mode = 0, enable_mcc = 0, sap_mcc_avoid = 0;
|
||||
@ -1289,7 +1289,7 @@ QDF_STATUS hdd_set_sme_cfgs_related_to_mlme(struct hdd_context *hdd_ctx,
|
||||
QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
||||
bool roam_scan_enabled;
|
||||
bool enable_dfs_scan = true;
|
||||
|
@ -6703,7 +6703,7 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
|
||||
int ret_val = 0;
|
||||
uint8_t cfg_val = 0;
|
||||
uint8_t set_val = 0;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
bool update_sme_cfg = false;
|
||||
uint8_t tid = 0, ac;
|
||||
uint16_t buff_size = 0;
|
||||
@ -15895,7 +15895,7 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter,
|
||||
uint32_t roam_id = INVALID_ROAM_ID;
|
||||
struct csr_roam_profile *roam_profile;
|
||||
eCsrAuthType RSNAuthType;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
uint8_t channel = 0;
|
||||
mac_handle_t mac_handle;
|
||||
uint8_t wmm_mode = 0;
|
||||
|
@ -3541,7 +3541,7 @@ int wlan_hdd_set_channel(struct wiphy *wiphy,
|
||||
struct hdd_context *hdd_ctx;
|
||||
int status;
|
||||
mac_handle_t mac_handle;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
tsap_config_t *sap_config;
|
||||
|
||||
hdd_enter();
|
||||
@ -4907,7 +4907,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
|
||||
struct hdd_config *iniConfig;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
uint8_t mcc_to_scc_switch = 0, conc_rule1 = 0;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
bool MFPCapable = false;
|
||||
bool MFPRequired = false;
|
||||
uint16_t prev_rsn_length = 0;
|
||||
|
@ -3928,7 +3928,7 @@ int wlan_hdd_update_phymode(struct hdd_adapter *adapter, int new_phymode)
|
||||
mac_handle_t mac_handle = phddctx->mac_handle;
|
||||
bool band_24 = false, band_5g = false;
|
||||
bool ch_bond24 = false, ch_bond5g = false;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
uint32_t chwidth = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
|
||||
uint8_t vhtchanwidth;
|
||||
eCsrPhyMode phymode = -EIO, old_phymode;
|
||||
@ -4295,7 +4295,7 @@ static int hdd_we_set_ch_width(struct hdd_adapter *adapter, int ch_width)
|
||||
int errno;
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
uint32_t bonding_mode;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
mac_handle_t mac_handle;
|
||||
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
@ -6098,7 +6098,7 @@ static int __iw_setnone_getint(struct net_device *dev,
|
||||
mac_handle_t mac_handle;
|
||||
int *value = (int *)extra;
|
||||
int ret;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
struct hdd_context *hdd_ctx;
|
||||
QDF_STATUS status;
|
||||
bool bval = false;
|
||||
@ -7239,7 +7239,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
||||
struct hdd_context *hddctx = WLAN_HDD_GET_CTX(adapter);
|
||||
eCsrPhyMode phymode;
|
||||
enum band_info currBand;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
|
||||
sme_config = qdf_mem_malloc(sizeof(*sme_config));
|
||||
if (!sme_config) {
|
||||
|
@ -129,9 +129,9 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
Type declarations
|
||||
------------------------------------------------------------------------*/
|
||||
typedef struct _smeConfigParams {
|
||||
struct sme_config_params {
|
||||
tCsrConfigParam csrConfig;
|
||||
} tSmeConfigParams, *tpSmeConfigParams;
|
||||
};
|
||||
|
||||
#ifdef FEATURE_WLAN_TDLS
|
||||
#define SME_TDLS_MAX_SUPP_CHANNELS 128
|
||||
@ -440,10 +440,10 @@ QDF_STATUS sme_update_roam_params(mac_handle_t mac_handle,
|
||||
struct roam_ext_params *roam_params_src,
|
||||
int update_param);
|
||||
QDF_STATUS sme_update_config(mac_handle_t mac_handle,
|
||||
tpSmeConfigParams pSmeConfigParams);
|
||||
struct sme_config_params *pSmeConfigParams);
|
||||
|
||||
QDF_STATUS sme_set11dinfo(mac_handle_t mac_handle,
|
||||
tpSmeConfigParams pSmeConfigParams);
|
||||
struct sme_config_params *pSmeConfigParams);
|
||||
QDF_STATUS sme_hdd_ready_ind(mac_handle_t mac_handle);
|
||||
/**
|
||||
* sme_ser_cmd_callback() - callback from serialization module
|
||||
@ -593,7 +593,7 @@ QDF_STATUS sme_roam_get_wpa_rsn_rsp_ie(mac_handle_t mac_handle,
|
||||
uint32_t *len, uint8_t *buf);
|
||||
|
||||
QDF_STATUS sme_get_config_param(mac_handle_t mac_handle,
|
||||
tSmeConfigParams *pParam);
|
||||
struct sme_config_params *pParam);
|
||||
#ifndef QCA_SUPPORT_CP_STATS
|
||||
QDF_STATUS sme_get_statistics(mac_handle_t mac_handle,
|
||||
eCsrStatsRequesterType requesterId,
|
||||
|
@ -776,7 +776,7 @@ QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2,
|
||||
*
|
||||
* mac_handle - The handle returned by mac_open.
|
||||
* pSmeConfigParams - a pointer to a caller allocated object of
|
||||
* typedef struct _smeConfigParams.
|
||||
* struct sme_config_params.
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS - SME update the config parameters successfully.
|
||||
*
|
||||
@ -784,7 +784,7 @@ QDF_STATUS sme_init_chan_list(mac_handle_t mac_handle, uint8_t *alpha2,
|
||||
*/
|
||||
|
||||
QDF_STATUS sme_set11dinfo(mac_handle_t mac_handle,
|
||||
tpSmeConfigParams pSmeConfigParams)
|
||||
struct sme_config_params *pSmeConfigParams)
|
||||
{
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
@ -886,12 +886,12 @@ static void sme_update_neighbor_report_config(struct mac_context *mac,
|
||||
*
|
||||
* mac_handle - The handle returned by mac_open.
|
||||
* pSmeConfigParams - a pointer to a caller allocated object of
|
||||
* typedef struct _smeConfigParams.
|
||||
* struct sme_config_params.
|
||||
* Return QDF_STATUS_SUCCESS - SME update the config parameters successfully.
|
||||
* Other status means SME is failed to update the config parameters.
|
||||
*/
|
||||
QDF_STATUS sme_update_config(mac_handle_t mac_handle, tpSmeConfigParams
|
||||
pSmeConfigParams)
|
||||
QDF_STATUS sme_update_config(mac_handle_t mac_handle,
|
||||
struct sme_config_params *pSmeConfigParams)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
@ -3216,7 +3216,7 @@ QDF_STATUS sme_roam_get_wpa_rsn_rsp_ie(mac_handle_t mac_handle,
|
||||
* Return QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_get_config_param(mac_handle_t mac_handle,
|
||||
tSmeConfigParams *pParam)
|
||||
struct sme_config_params *pParam)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
struct mac_context *mac = MAC_CONTEXT(mac_handle);
|
||||
@ -12977,7 +12977,7 @@ QDF_STATUS sme_update_sta_roam_policy(mac_handle_t mac_handle,
|
||||
{
|
||||
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tSmeConfigParams *sme_config;
|
||||
struct sme_config_params *sme_config;
|
||||
|
||||
if (!mac_ctx) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_FATAL,
|
||||
|
Loading…
Reference in New Issue
Block a user