From dda4075a5ee73918fd251a4d7cd60b5228518a88 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 2 Feb 2019 21:43:34 -0800 Subject: [PATCH] qcacld-3.0: Replace typedef tSirEseBcnReportRsp 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 tSirEseBcnReportRsp 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: Id687d039c51eaf293cdd39536cf200874bd8fbc9 CRs-Fixed: 2394253 --- core/mac/inc/sir_api.h | 4 ++-- core/sme/inc/csr_api.h | 2 +- core/sme/src/rrm/sme_rrm.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index d5419fa59d96..0b18cd055a36 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -837,13 +837,13 @@ struct ese_bcn_report_bss_info { uint8_t *pBuf; }; -typedef struct sSirEseBcnReportRsp { +struct ese_bcn_report_rsp { uint16_t measurementToken; uint8_t flag; /* Flag to report measurement done and more data */ uint8_t numBss; struct ese_bcn_report_bss_info bcnRepBssInfo[SIR_BCN_REPORT_MAX_BSS_DESC]; -} tSirEseBcnReportRsp, *tpSirEseBcnReportRsp; +}; #define TSRS_11AG_RATE_6MBPS 0xC #define TSRS_11B_RATE_5_5MBPS 0xB diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 6eafa57ce6fd..f1dab7815b94 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1098,7 +1098,7 @@ struct csr_roam_info { struct tsm_ie tsm_ie; uint32_t timestamp[2]; uint16_t tsmRoamDelay; - tSirEseBcnReportRsp *pEseBcnReportRsp; + struct ese_bcn_report_rsp *pEseBcnReportRsp; #endif void *pRemainCtx; uint32_t roc_scan_id; diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index 825f37161945..956b27ecc9ae 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -277,8 +277,8 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results( tCsrScanResultInfo *cur_result = NULL; tpRrmSMEContext rrm_ctx = &mac_ctx->rrm.rrmSmeContext; struct csr_roam_info roam_info; - tSirEseBcnReportRsp bcn_rpt_rsp; - tpSirEseBcnReportRsp bcn_report = &bcn_rpt_rsp; + struct ese_bcn_report_rsp bcn_rpt_rsp; + struct ese_bcn_report_rsp *bcn_report = &bcn_rpt_rsp; tpCsrEseBeaconReqParams cur_meas_req = NULL; uint8_t i = 0, j = 0; tBcnReportFields *bcn_rpt_fields; @@ -296,7 +296,7 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results( if (result_arr) cur_result = result_arr[bss_counter]; - qdf_mem_zero(&bcn_rpt_rsp, sizeof(tSirEseBcnReportRsp)); + qdf_mem_zero(&bcn_rpt_rsp, sizeof(bcn_rpt_rsp)); do { cur_meas_req = NULL; for (i = 0; i < rrm_ctx->eseBcnReqInfo.numBcnReqIe; i++) {