From 7fb55e58eea5f21963ea791eeb77c6e6962fd0c2 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 6 Feb 2019 11:28:12 -0800 Subject: [PATCH] qcacld-3.0: Replace typedef tSirQosMapSet 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 tSirQosMapSet 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: I415ee669362b71b72788f8068cbf2385470ef216 CRs-Fixed: 2396055 --- core/mac/inc/sir_api.h | 4 ++-- core/mac/src/include/parser_api.h | 4 ++-- core/mac/src/pe/include/lim_session.h | 2 +- core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c | 6 ++++-- core/mac/src/sys/legacy/src/utils/inc/utils_parser.h | 4 ++-- core/mac/src/sys/legacy/src/utils/src/parser_api.c | 5 +++-- core/mac/src/sys/legacy/src/utils/src/utils_parser.c | 4 ++-- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index cc9471d38e..e2cede1fae 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1679,12 +1679,12 @@ typedef struct sSirAggrQosRsp { } tSirAggrQosRsp, *tpSirAggrQosRsp; -typedef struct sSirQosMapSet { +struct qos_map_set { uint8_t present; uint8_t num_dscp_exceptions; uint8_t dscp_exceptions[21][2]; uint8_t dscp_range[8][2]; -} tSirQosMapSet, *tpSirQosMapSet; +}; typedef struct sSmeIbssPeerInd { uint16_t mesgType; diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h index 85af4aab75..d5d7f23568 100644 --- a/core/mac/src/include/parser_api.h +++ b/core/mac/src/include/parser_api.h @@ -400,7 +400,7 @@ typedef struct sSirAssocRsp { tDot11fIEVHTCaps VHTCaps; tDot11fIEVHTOperation VHTOperation; tDot11fIEExtCap ExtCap; - tSirQosMapSet QosMapSet; + struct qos_map_set QosMapSet; #ifdef WLAN_FEATURE_11W tDot11fIETimeoutInterval TimeoutInterval; #endif @@ -625,7 +625,7 @@ sir_convert_delts_req2_struct(struct mac_context *mac, QDF_STATUS sir_convert_qos_map_configure_frame2_struct(struct mac_context *mac, uint8_t *pFrame, uint32_t nFrame, - tSirQosMapSet *pQosMapSet); + struct qos_map_set *pQosMapSet); #ifdef ANI_SUPPORT_11H QDF_STATUS diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index 358f42a4d9..09603088cd 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -450,7 +450,7 @@ struct pe_session { uint16_t schBeaconOffsetEnd; bool isOSENConnection; /* DSCP to UP mapping for HS 2.0 */ - tSirQosMapSet QosMapSet; + struct qos_map_set QosMapSet; #ifdef WLAN_FEATURE_ROAM_OFFLOAD bool bRoamSynchInProgress; diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c index 7af5841c43..6939ed1abd 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c @@ -838,9 +838,11 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, if (assoc_rsp->QosMapSet.present) qdf_mem_copy(&session_entry->QosMapSet, - &assoc_rsp->QosMapSet, sizeof(tSirQosMapSet)); + &assoc_rsp->QosMapSet, + sizeof(struct qos_map_set)); else - qdf_mem_zero(&session_entry->QosMapSet, sizeof(tSirQosMapSet)); + qdf_mem_zero(&session_entry->QosMapSet, + sizeof(struct qos_map_set)); if (assoc_rsp->obss_scanparams.present) lim_update_obss_scanparams(session_entry, diff --git a/core/mac/src/sys/legacy/src/utils/inc/utils_parser.h b/core/mac/src/sys/legacy/src/utils/inc/utils_parser.h index e32a5bc1cc..4c4c8b8ecf 100644 --- a/core/mac/src/sys/legacy/src/utils/inc/utils_parser.h +++ b/core/mac/src/sys/legacy/src/utils/inc/utils_parser.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2019 The Linux Foundation. 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 @@ -89,7 +89,7 @@ QDF_STATUS convert_p2p_opaque(struct mac_context *, tSirAddie *, QDF_STATUS convert_wfd_opaque(struct mac_context *, tSirAddie *, tDot11fIEWFDIEOpaque *); #endif -void convert_qos_mapset_frame(struct mac_context *, tSirQosMapSet *, +void convert_qos_mapset_frame(struct mac_context *, struct qos_map_set *, tDot11fIEQosMapSet *); #endif diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index bad99822b0..e6e426d56a 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -805,7 +805,8 @@ static void lim_log_operating_mode(struct mac_context *mac, #endif /* DUMP_MGMT_CNTNTS */ } -static void lim_log_qos_map_set(struct mac_context *mac, tSirQosMapSet *pQosMapSet) +static void lim_log_qos_map_set(struct mac_context *mac, + struct qos_map_set *pQosMapSet) { uint8_t i; @@ -4502,7 +4503,7 @@ QDF_STATUS sir_convert_qos_map_configure_frame2_struct(struct mac_context *mac, uint8_t *pFrame, uint32_t nFrame, - tSirQosMapSet *pQosMapSet) + struct qos_map_set *pQosMapSet) { tDot11fQosMapConfigure mapConfigure; uint32_t status; diff --git a/core/mac/src/sys/legacy/src/utils/src/utils_parser.c b/core/mac/src/sys/legacy/src/utils/src/utils_parser.c index 81d90350bd..48d342430e 100644 --- a/core/mac/src/sys/legacy/src/utils/src/utils_parser.c +++ b/core/mac/src/sys/legacy/src/utils/src/utils_parser.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2019 The Linux Foundation. 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 @@ -650,7 +650,7 @@ void convert_wmm_schedule(struct mac_context *mac, pOld->specInterval = pNew->spec_interval; } -void convert_qos_mapset_frame(struct mac_context *mac, tSirQosMapSet *Qos, +void convert_qos_mapset_frame(struct mac_context *mac, struct qos_map_set *Qos, tDot11fIEQosMapSet *dot11fIE) { uint8_t i, j = 0;