diff --git a/core/cds/inc/cds_ieee80211_common.h b/core/cds/inc/cds_ieee80211_common.h index 7039a01c0fb4..a2ff44e1fb5b 100644 --- a/core/cds/inc/cds_ieee80211_common.h +++ b/core/cds/inc/cds_ieee80211_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011,2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2011,2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -233,7 +233,7 @@ struct ieee80211_ctlframe_addr2 { #define IEEE80211_SEQ_SEQ_SHIFT 4 #define IEEE80211_SEQ_MAX 4096 -#define IEEE80211_SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0) +#define IEEE80211_SEQ_LEQ(a, b) ((int)((a) - (b)) <= 0) #define IEEE80211_QOS_TXOP 0x00ff @@ -462,18 +462,18 @@ struct ieee80211_wme_param { #define WME_CAPINFO_UAPSD_MAXSP_MASK 0x3 #define WME_CAPINFO_IE_OFFSET 8 #define WME_UAPSD_MAXSP(_qosinfo) (((_qosinfo) >> WME_CAPINFO_UAPSD_MAXSP_SHIFT) & WME_CAPINFO_UAPSD_MAXSP_MASK) -#define WME_UAPSD_AC_ENABLED(_ac, _qosinfo) ( (1<<(3 - (_ac))) & \ - (((_qosinfo) >> WME_CAPINFO_UAPSD_ACFLAGS_SHIFT) & WME_CAPINFO_UAPSD_ACFLAGS_MASK) ) +#define WME_UAPSD_AC_ENABLED(_ac, _qosinfo) ((1 << (3 - (_ac))) & \ + (((_qosinfo) >> WME_CAPINFO_UAPSD_ACFLAGS_SHIFT) & WME_CAPINFO_UAPSD_ACFLAGS_MASK)) /* Mask used to determined whether all queues are UAPSD-enabled */ #define WME_CAPINFO_UAPSD_ALL (WME_CAPINFO_UAPSD_VO | \ WME_CAPINFO_UAPSD_VI | \ WME_CAPINFO_UAPSD_BK | \ WME_CAPINFO_UAPSD_BE) -#define WME_CAPINFO_UAPSD_NONE 0 +#define WME_CAPINFO_UAPSD_NONE 0 #define WME_UAPSD_AC_MAX_VAL 1 -#define WME_UAPSD_AC_INVAL WME_UAPSD_AC_MAX_VAL+1 +#define WME_UAPSD_AC_INVAL (WME_UAPSD_AC_MAX_VAL + 1) /* * Atheros Advanced Capability information element. @@ -1840,7 +1840,7 @@ enum { #define IEEE80211_AID_MAX 2007 #define IEEE80211_AID_DEF 128 -#define IEEE80211_AID(b) ((b) &~0xc000) +#define IEEE80211_AID(b) ((b) & ~0xc000) /* * RTS frame length parameters. The default is specified in diff --git a/core/cds/inc/cds_if_upperproto.h b/core/cds/inc/cds_if_upperproto.h index 072c6bca2edb..cef7fc714b1d 100644 --- a/core/cds/inc/cds_if_upperproto.h +++ b/core/cds/inc/cds_if_upperproto.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2014, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -233,6 +233,6 @@ struct igmp_v3_report { }; /* Calculate the group record length*/ -#define IGMPV3_GRP_REC_LEN(x) (8 + (4 * x->grec_nsrcs) + (4 * x->grec_auxwords) ) +#define IGMPV3_GRP_REC_LEN(x) (8 + (4 * x->grec_nsrcs) + (4 * x->grec_auxwords)) #endif /* _NET_IF_ETHERSUBR_H_ */ diff --git a/core/cds/src/cds_ieee80211_common_i.h b/core/cds/src/cds_ieee80211_common_i.h index 35d803957053..b57120141146 100644 --- a/core/cds/src/cds_ieee80211_common_i.h +++ b/core/cds/src/cds_ieee80211_common_i.h @@ -428,11 +428,11 @@ enum ieee80211_scanmode { (((_c)->ic_flags & (IEEE80211_CHAN_VHT20 | \ IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS | IEEE80211_CHAN_VHT80)) != 0) #define IEEE80211_IS_CHAN_11AC(_c) \ - ( IEEE80211_IS_CHAN_5GHZ((_c)) && IEEE80211_IS_CHAN_VHT((_c)) ) + (IEEE80211_IS_CHAN_5GHZ((_c)) && IEEE80211_IS_CHAN_VHT((_c))) #define IEEE80211_CHAN_11AC_VHT20 \ (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT20) #define IEEE80211_CHAN_11AC_VHT40 \ - (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS ) + (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS) #define IEEE80211_CHAN_11AC_VHT40PLUS \ (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_VHT40PLUS) #define IEEE80211_CHAN_11AC_VHT40MINUS \ @@ -443,7 +443,7 @@ enum ieee80211_scanmode { (((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT20) == IEEE80211_CHAN_11AC_VHT20) #define IEEE80211_IS_CHAN_11AC_VHT40(_c) \ - (((_c)->ic_flags & (IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS)) !=0) + (((_c)->ic_flags & (IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS)) != 0) #define IEEE80211_IS_CHAN_11AC_VHT40PLUS(_c) \ (((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT40PLUS) == IEEE80211_CHAN_11AC_VHT40PLUS) #define IEEE80211_IS_CHAN_11AC_VHT40MINUS(_c) \ @@ -469,10 +469,10 @@ enum ieee80211_scanmode { ((_c)->ic_flagext |= IEEE80211_CHAN_11D_EXCLUDED) /* channel encoding for FH phy */ -#define IEEE80211_FH_CHANMOD 80 -#define IEEE80211_FH_CHAN(set,pat) (((set)-1)*IEEE80211_FH_CHANMOD+(pat)) -#define IEEE80211_FH_CHANSET(chan) ((chan)/IEEE80211_FH_CHANMOD+1) -#define IEEE80211_FH_CHANPAT(chan) ((chan)%IEEE80211_FH_CHANMOD) +#define IEEE80211_FH_CHANMOD 80 +#define IEEE80211_FH_CHAN(set, pat) (((set) - 1) * IEEE80211_FH_CHANMOD + (pat)) +#define IEEE80211_FH_CHANSET(chan) ((chan) / IEEE80211_FH_CHANMOD + 1) +#define IEEE80211_FH_CHANPAT(chan) ((chan) % IEEE80211_FH_CHANMOD) /* * 802.11 rate set. @@ -485,7 +485,7 @@ enum ieee80211_scanmode { #define IEEE80211_RATE_MCS 0x8000 #define IEEE80211_RATE_MCS_VAL 0x7FFF -#define IEEE80211_RATE_IDX_ENTRY(val, idx) (((val&(0xff<<(idx*8)))>>(idx*8))) +#define IEEE80211_RATE_IDX_ENTRY(val, idx) (((val & (0xff << (idx * 8))) >> (idx * 8))) /* * RSSI range diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index a03590416614..42e2f58a4a6c 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3194,7 +3194,7 @@ struct pmkid_mode_bits { * @num_disallowed_aps: Maximum number of AP's in LCA list * */ -struct lca_disallow_config_params{ +struct lca_disallow_config_params { uint32_t disallow_duration; uint32_t rssi_channel_penalization; uint32_t num_disallowed_aps; diff --git a/core/mac/src/cfg/cfg_api.c b/core/mac/src/cfg/cfg_api.c index 929908d8bbc9..de4920a293eb 100644 --- a/core/mac/src/cfg/cfg_api.c +++ b/core/mac/src/cfg/cfg_api.c @@ -58,7 +58,7 @@ typedef enum { } eRfBandMode; extern cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING]; -extern cgstatic cfg_static[CFG_PARAM_MAX_NUM] ; +extern cgstatic cfg_static[CFG_PARAM_MAX_NUM]; /* --------------------------------------------------------------------- */ uint32_t cfg_need_restart(tpAniSirGlobal pMac, uint16_t cfgId) diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h index 0bd2d45e57bb..4dd9e9ea0458 100644 --- a/core/mac/src/include/parser_api.h +++ b/core/mac/src/include/parser_api.h @@ -1154,9 +1154,9 @@ void update_fils_data(struct sir_fils_indication *fils_ind, tDot11fIEfils_indication * fils_indication); #endif #ifdef WLAN_FEATURE_11AX -QDF_STATUS populate_dot11f_he_caps(tpAniSirGlobal , tpPESession , +QDF_STATUS populate_dot11f_he_caps(tpAniSirGlobal, tpPESession, tDot11fIEhe_cap *); -QDF_STATUS populate_dot11f_he_operation(tpAniSirGlobal , tpPESession , +QDF_STATUS populate_dot11f_he_operation(tpAniSirGlobal, tpPESession, tDot11fIEhe_op *); #ifdef WLAN_FEATURE_11AX_BSS_COLOR QDF_STATUS populate_dot11f_he_bss_color_change(tpAniSirGlobal mac_ctx, diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index a2545b839a36..e3df4c047e8d 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -1179,7 +1179,7 @@ static inline QDF_STATUS lim_populate_he_mcs_set(tpAniSirGlobal mac_ctx, * Return: void */ void lim_assoc_rej_add_to_rssi_based_reject_list(tpAniSirGlobal mac_ctx, - tDot11fTLVrssi_assoc_rej *rssi_assoc_rej, + tDot11fTLVrssi_assoc_rej *rssi_assoc_rej, tSirMacAddr bssid, int8_t rssi); /** diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 6a7f04aa4f78..76a130f9d596 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -424,7 +424,7 @@ struct sap_roc_ready_ind_s { * @channellist: acs scan channels * @num_of_channels: number of channels */ -struct sap_acs_scan_complete_event{ +struct sap_acs_scan_complete_event { uint8_t status; uint8_t *channellist; uint8_t num_of_channels; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 2142a311bfde..98304ef0d2de 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -5720,7 +5720,7 @@ static enum csr_join_state csr_roam_join_next_bss(tpAniSirGlobal mac_ctx, return eCsrStopRoaming; } - roam_info = qdf_mem_malloc(sizeof (*roam_info)); + roam_info = qdf_mem_malloc(sizeof(*roam_info)); if (!roam_info) { sme_err("failed to allocate memory"); return eCsrStopRoaming; diff --git a/core/wma/inc/wma_if.h b/core/wma/inc/wma_if.h index 3a9ab53da59e..284d163528ca 100644 --- a/core/wma/inc/wma_if.h +++ b/core/wma/inc/wma_if.h @@ -1321,7 +1321,7 @@ struct del_sta_self_params { tSirMacAddr self_mac_addr; uint8_t session_id; uint32_t status; - QDF_STATUS (*sme_callback) (void *sme_ctx); + QDF_STATUS (*sme_callback)(void *sme_ctx); void *sme_ctx; }; diff --git a/uapi/linux/a_debug.h b/uapi/linux/a_debug.h index 3a5fd4c2204c..d7a81c2f8e5b 100644 --- a/uapi/linux/a_debug.h +++ b/uapi/linux/a_debug.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -150,9 +150,9 @@ typedef struct _ATH_DEBUG_MODULE_DBG_INFO { #ifdef WLAN_DEBUG /* for source files that will instantiate the debug variables */ -#define ATH_DEBUG_INSTANTIATE_MODULE_VAR(s,name,moddesc,initmask,count,descriptions) \ +#define ATH_DEBUG_INSTANTIATE_MODULE_VAR(s, name, moddesc, initmask, count, descriptions) \ ATH_DEBUG_MODULE_DBG_INFO GET_ATH_MODULE_DEBUG_VAR_NAME(s) = \ - {NULL,(name),(moddesc),0,(initmask),count,(descriptions)} + {NULL, (name), (moddesc), 0, (initmask), (count), (descriptions)} #ifdef ATH_MODULE_NAME extern ATH_DEBUG_MODULE_DBG_INFO @@ -160,12 +160,12 @@ GET_ATH_MODULE_DEBUG_VAR_NAME(ATH_MODULE_NAME); #define AR_DEBUG_LVL_CHECK(lvl) (GET_ATH_MODULE_DEBUG_VAR_MASK(ATH_MODULE_NAME) & (lvl)) #endif /* ATH_MODULE_NAME */ -#define ATH_DEBUG_SET_DEBUG_MASK(s,lvl) GET_ATH_MODULE_DEBUG_VAR_MASK(s) = (lvl) +#define ATH_DEBUG_SET_DEBUG_MASK(s, lvl) GET_ATH_MODULE_DEBUG_VAR_MASK(s) = (lvl) #define ATH_DEBUG_DECLARE_EXTERN(s) \ extern ATH_DEBUG_MODULE_DBG_INFO GET_ATH_MODULE_DEBUG_VAR_NAME(s) -#define AR_DEBUG_PRINTBUF(buffer, length, desc) debug_dump_bytes(buffer,length,desc) +#define AR_DEBUG_PRINTBUF(buffer, length, desc) debug_dump_bytes(buffer, length, desc) #define AR_DEBUG_ASSERT A_ASSERT @@ -181,12 +181,12 @@ void a_register_module_debug_info(ATH_DEBUG_MODULE_DBG_INFO *pInfo); #else /* !DEBUG */ /* NON DEBUG */ -#define ATH_DEBUG_INSTANTIATE_MODULE_VAR(s,name,moddesc,initmask,count,descriptions) +#define ATH_DEBUG_INSTANTIATE_MODULE_VAR(s, name, moddesc, initmask, count, descriptions) #define AR_DEBUG_LVL_CHECK(lvl) 0 #define AR_DEBUG_PRINTBUF(buffer, length, desc) #define AR_DEBUG_ASSERT(test) #define ATH_DEBUG_DECLARE_EXTERN(s) -#define ATH_DEBUG_SET_DEBUG_MASK(s,lvl) +#define ATH_DEBUG_SET_DEBUG_MASK(s, lvl) #define A_DUMP_MODULE_DEBUG_INFO(s) #define A_REGISTER_MODULE_DEBUG_INFO(s) diff --git a/uapi/linux/osapi_linux.h b/uapi/linux/osapi_linux.h index b74b6a589d66..cc3e4cfe6ce0 100644 --- a/uapi/linux/osapi_linux.h +++ b/uapi/linux/osapi_linux.h @@ -83,7 +83,7 @@ QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, ## args) #define A_PRINTF_LOG(args ...) \ QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, ## args) -#define A_SNPRINTF(buf, len, args ...) snprintf (buf, len, args) +#define A_SNPRINTF(buf, len, args ...) snprintf(buf, len, args) /* * Timer Functions diff --git a/uapi/linux/pktlog_ac_fmt.h b/uapi/linux/pktlog_ac_fmt.h index ee5b4abb402a..8b03aecb2e27 100644 --- a/uapi/linux/pktlog_ac_fmt.h +++ b/uapi/linux/pktlog_ac_fmt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -299,7 +299,7 @@ struct ath_pktlog_buf { #define PKTLOG_MOV_RD_IDX(_rd_offset, _log_buf, _log_size) \ do { \ - if((_rd_offset + sizeof(struct ath_pktlog_hdr) + \ + if ((_rd_offset + sizeof(struct ath_pktlog_hdr) + \ ((struct ath_pktlog_hdr *)((_log_buf)->log_data + \ (_rd_offset)))->size) <= _log_size) { \ _rd_offset = ((_rd_offset) + sizeof(struct ath_pktlog_hdr) + \ @@ -311,7 +311,7 @@ struct ath_pktlog_buf { } \ (_rd_offset) = (((_log_size) - (_rd_offset)) >= \ sizeof(struct ath_pktlog_hdr)) ? _rd_offset : 0; \ - } while(0) + } while (0) /** * enum tx_pkt_fate - tx packet fate