qcacld-3.0: Replace typedef tSirSmeChanInfo
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 tSirSmeChanInfo 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, as well as to be more specific on how the struct is used. Change-Id: Ic9a596d05a7c4c0727264c33e865edd4a9786dac CRs-Fixed: 2394998
This commit is contained in:
@@ -3101,7 +3101,7 @@ static inline void hdd_send_peer_status_ind_to_app(
|
|||||||
uint8_t peer_status,
|
uint8_t peer_status,
|
||||||
uint8_t peer_timing_meas_cap,
|
uint8_t peer_timing_meas_cap,
|
||||||
uint8_t sessionId,
|
uint8_t sessionId,
|
||||||
tSirSmeChanInfo *chan_info,
|
struct oem_channel_info *chan_info,
|
||||||
enum QDF_OPMODE dev_mode)
|
enum QDF_OPMODE dev_mode)
|
||||||
{
|
{
|
||||||
struct wifi_pos_ch_info ch_info;
|
struct wifi_pos_ch_info ch_info;
|
||||||
@@ -3134,7 +3134,7 @@ static inline void hdd_send_peer_status_ind_to_app(
|
|||||||
uint8_t peer_status,
|
uint8_t peer_status,
|
||||||
uint8_t peer_timing_meas_cap,
|
uint8_t peer_timing_meas_cap,
|
||||||
uint8_t sessionId,
|
uint8_t sessionId,
|
||||||
tSirSmeChanInfo *chan_info,
|
struct oem_channel_info *chan_info,
|
||||||
enum QDF_OPMODE dev_mode)
|
enum QDF_OPMODE dev_mode)
|
||||||
{
|
{
|
||||||
hdd_send_peer_status_ind_to_oem_app(peer_mac, peer_status,
|
hdd_send_peer_status_ind_to_oem_app(peer_mac, peer_status,
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -171,7 +171,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
|
|||||||
uint8_t peerStatus,
|
uint8_t peerStatus,
|
||||||
uint8_t peerTimingMeasCap,
|
uint8_t peerTimingMeasCap,
|
||||||
uint8_t sessionId,
|
uint8_t sessionId,
|
||||||
struct sSirSmeChanInfo *chan_info,
|
struct oem_channel_info *chan_info,
|
||||||
enum QDF_OPMODE dev_mode);
|
enum QDF_OPMODE dev_mode);
|
||||||
|
|
||||||
int iw_get_oem_data_cap(struct net_device *dev, struct iw_request_info *info,
|
int iw_get_oem_data_cap(struct net_device *dev, struct iw_request_info *info,
|
||||||
|
@@ -1353,7 +1353,7 @@ static void hdd_send_association_event(struct net_device *dev,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (eConnectionState_Associated == sta_ctx->conn_info.connState) {
|
if (eConnectionState_Associated == sta_ctx->conn_info.connState) {
|
||||||
tSirSmeChanInfo chan_info = {0};
|
struct oem_channel_info chan_info = {0};
|
||||||
|
|
||||||
if (!pCsrRoamInfo || !pCsrRoamInfo->pBssDesc) {
|
if (!pCsrRoamInfo || !pCsrRoamInfo->pBssDesc) {
|
||||||
hdd_warn("STA in associated state but pCsrRoamInfo is null");
|
hdd_warn("STA in associated state but pCsrRoamInfo is null");
|
||||||
|
@@ -682,7 +682,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
|
|||||||
uint8_t peerStatus,
|
uint8_t peerStatus,
|
||||||
uint8_t peerTimingMeasCap,
|
uint8_t peerTimingMeasCap,
|
||||||
uint8_t sessionId,
|
uint8_t sessionId,
|
||||||
tSirSmeChanInfo *chan_info,
|
struct oem_channel_info *chan_info,
|
||||||
enum QDF_OPMODE dev_mode)
|
enum QDF_OPMODE dev_mode)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
@@ -1056,7 +1056,7 @@ struct join_rsp {
|
|||||||
uint8_t frames[1];
|
uint8_t frames[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct sSirSmeChanInfo {
|
struct oem_channel_info {
|
||||||
uint8_t chan_id;
|
uint8_t chan_id;
|
||||||
uint32_t mhz;
|
uint32_t mhz;
|
||||||
uint32_t band_center_freq1;
|
uint32_t band_center_freq1;
|
||||||
@@ -1068,7 +1068,7 @@ typedef struct sSirSmeChanInfo {
|
|||||||
uint32_t rate_flags;
|
uint32_t rate_flags;
|
||||||
uint8_t sec_ch_offset;
|
uint8_t sec_ch_offset;
|
||||||
enum phy_ch_width ch_width;
|
enum phy_ch_width ch_width;
|
||||||
} tSirSmeChanInfo, *tpSirSmeChanInfo;
|
};
|
||||||
|
|
||||||
enum sir_sme_phy_mode {
|
enum sir_sme_phy_mode {
|
||||||
SIR_SME_PHY_MODE_LEGACY = 0,
|
SIR_SME_PHY_MODE_LEGACY = 0,
|
||||||
@@ -1110,7 +1110,7 @@ typedef struct sSirSmeAssocInd {
|
|||||||
|
|
||||||
/* Timing measurement capability */
|
/* Timing measurement capability */
|
||||||
uint8_t timingMeasCap;
|
uint8_t timingMeasCap;
|
||||||
tSirSmeChanInfo chan_info;
|
struct oem_channel_info chan_info;
|
||||||
bool ampdu;
|
bool ampdu;
|
||||||
bool sgi_enable;
|
bool sgi_enable;
|
||||||
bool tx_stbc;
|
bool tx_stbc;
|
||||||
|
@@ -736,7 +736,7 @@ lim_fill_assoc_ind_params(struct mac_context *mac_ctx,
|
|||||||
assoc_ind->supportedChannels.numChnl);
|
assoc_ind->supportedChannels.numChnl);
|
||||||
}
|
}
|
||||||
qdf_mem_copy(&sme_assoc_ind->chan_info, &assoc_ind->chan_info,
|
qdf_mem_copy(&sme_assoc_ind->chan_info, &assoc_ind->chan_info,
|
||||||
sizeof(tSirSmeChanInfo));
|
sizeof(struct oem_channel_info));
|
||||||
/* Fill in WmmInfo */
|
/* Fill in WmmInfo */
|
||||||
sme_assoc_ind->wmmEnabledSta = assoc_ind->WmmStaInfoPresent;
|
sme_assoc_ind->wmmEnabledSta = assoc_ind->WmmStaInfoPresent;
|
||||||
sme_assoc_ind->ampdu = assoc_ind->ampdu;
|
sme_assoc_ind->ampdu = assoc_ind->ampdu;
|
||||||
|
@@ -227,7 +227,7 @@ typedef struct sLimMlmAssocInd {
|
|||||||
uint8_t *beaconPtr;
|
uint8_t *beaconPtr;
|
||||||
uint32_t assocReqLength;
|
uint32_t assocReqLength;
|
||||||
uint8_t *assocReqPtr;
|
uint8_t *assocReqPtr;
|
||||||
tSirSmeChanInfo chan_info;
|
struct oem_channel_info chan_info;
|
||||||
bool ampdu;
|
bool ampdu;
|
||||||
bool sgi_enable;
|
bool sgi_enable;
|
||||||
bool tx_stbc;
|
bool tx_stbc;
|
||||||
|
@@ -267,7 +267,7 @@ typedef struct sap_StationAssocReassocCompleteEvent_s {
|
|||||||
uint32_t statusCode;
|
uint32_t statusCode;
|
||||||
bool wmmEnabled;
|
bool wmmEnabled;
|
||||||
uint8_t timingMeasCap;
|
uint8_t timingMeasCap;
|
||||||
tSirSmeChanInfo chan_info;
|
struct oem_channel_info chan_info;
|
||||||
bool ampdu;
|
bool ampdu;
|
||||||
bool sgi_enable;
|
bool sgi_enable;
|
||||||
bool tx_stbc;
|
bool tx_stbc;
|
||||||
|
@@ -1357,7 +1357,7 @@ QDF_STATUS sap_signal_hdd_event(struct sap_context *sap_ctx,
|
|||||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||||
tSap_Event sap_ap_event = {0};
|
tSap_Event sap_ap_event = {0};
|
||||||
struct mac_context *mac_ctx;
|
struct mac_context *mac_ctx;
|
||||||
tSirSmeChanInfo *chaninfo;
|
struct oem_channel_info *chaninfo;
|
||||||
tSap_StationAssocIndication *assoc_ind;
|
tSap_StationAssocIndication *assoc_ind;
|
||||||
tSap_StartBssCompleteEvent *bss_complete;
|
tSap_StartBssCompleteEvent *bss_complete;
|
||||||
struct sap_ch_selected_s *acs_selected;
|
struct sap_ch_selected_s *acs_selected;
|
||||||
|
@@ -1137,7 +1137,7 @@ struct csr_roam_info {
|
|||||||
uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
|
uint8_t replay_ctr[SIR_REPLAY_CTR_LEN];
|
||||||
uint8_t subnet_change_status;
|
uint8_t subnet_change_status;
|
||||||
#endif
|
#endif
|
||||||
tSirSmeChanInfo chan_info;
|
struct oem_channel_info chan_info;
|
||||||
uint8_t target_channel;
|
uint8_t target_channel;
|
||||||
|
|
||||||
#ifdef WLAN_FEATURE_NAN
|
#ifdef WLAN_FEATURE_NAN
|
||||||
@@ -1194,7 +1194,7 @@ typedef struct sSirSmeAssocIndToUpperLayerCnf {
|
|||||||
uint8_t reassocReq; /* set to true if reassoc */
|
uint8_t reassocReq; /* set to true if reassoc */
|
||||||
/* Timing and fine Timing measurement capability clubbed together */
|
/* Timing and fine Timing measurement capability clubbed together */
|
||||||
uint8_t timingMeasCap;
|
uint8_t timingMeasCap;
|
||||||
tSirSmeChanInfo chan_info;
|
struct oem_channel_info chan_info;
|
||||||
uint8_t target_channel;
|
uint8_t target_channel;
|
||||||
bool ampdu;
|
bool ampdu;
|
||||||
bool sgi_enable;
|
bool sgi_enable;
|
||||||
|
@@ -9621,7 +9621,7 @@ void csr_roam_joined_state_msg_processor(struct mac_context *mac, void *pMsgBuf)
|
|||||||
pUpperLayerAssocCnf->timingMeasCap;
|
pUpperLayerAssocCnf->timingMeasCap;
|
||||||
qdf_mem_copy(&roam_info->chan_info,
|
qdf_mem_copy(&roam_info->chan_info,
|
||||||
&pUpperLayerAssocCnf->chan_info,
|
&pUpperLayerAssocCnf->chan_info,
|
||||||
sizeof(tSirSmeChanInfo));
|
sizeof(struct oem_channel_info));
|
||||||
roam_info->ampdu = pUpperLayerAssocCnf->ampdu;
|
roam_info->ampdu = pUpperLayerAssocCnf->ampdu;
|
||||||
roam_info->sgi_enable = pUpperLayerAssocCnf->sgi_enable;
|
roam_info->sgi_enable = pUpperLayerAssocCnf->sgi_enable;
|
||||||
roam_info->tx_stbc = pUpperLayerAssocCnf->tx_stbc;
|
roam_info->tx_stbc = pUpperLayerAssocCnf->tx_stbc;
|
||||||
@@ -10579,7 +10579,7 @@ csr_roam_chk_lnk_assoc_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
|
|||||||
roam_info_ptr->ecsa_capable = pAssocInd->ecsa_capable;
|
roam_info_ptr->ecsa_capable = pAssocInd->ecsa_capable;
|
||||||
qdf_mem_copy(&roam_info_ptr->chan_info,
|
qdf_mem_copy(&roam_info_ptr->chan_info,
|
||||||
&pAssocInd->chan_info,
|
&pAssocInd->chan_info,
|
||||||
sizeof(tSirSmeChanInfo));
|
sizeof(struct oem_channel_info));
|
||||||
|
|
||||||
if (pAssocInd->HTCaps.present)
|
if (pAssocInd->HTCaps.present)
|
||||||
qdf_mem_copy(&roam_info_ptr->ht_caps,
|
qdf_mem_copy(&roam_info_ptr->ht_caps,
|
||||||
@@ -15585,7 +15585,7 @@ QDF_STATUS csr_send_assoc_ind_to_upper_layer_cnf_msg(struct mac_context *mac,
|
|||||||
/* chan_info */
|
/* chan_info */
|
||||||
pBuf = (uint8_t *)&pMsg->chan_info;
|
pBuf = (uint8_t *)&pMsg->chan_info;
|
||||||
qdf_mem_copy((void *)pBuf, &pAssocInd->chan_info,
|
qdf_mem_copy((void *)pBuf, &pAssocInd->chan_info,
|
||||||
sizeof(tSirSmeChanInfo));
|
sizeof(struct oem_channel_info));
|
||||||
/* ampdu */
|
/* ampdu */
|
||||||
pBuf = (uint8_t *)&pMsg->ampdu;
|
pBuf = (uint8_t *)&pMsg->ampdu;
|
||||||
*((bool *)pBuf) = pAssocInd->ampdu;
|
*((bool *)pBuf) = pAssocInd->ampdu;
|
||||||
|
Fai riferimento in un nuovo problema
Block a user