diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2017-03-25 15:35:34 -0700 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2017-03-31 16:00:27 -0700 |
| commit | 5e5b25ff98fe09f7f5c40eed86d8281b29c35fe7 (patch) | |
| tree | 3318bc1c3f1ac12f66d36c07709012953b0cc276 | |
| parent | 3a67a43b2f32fb1327eee3639a81514f62e6764b (diff) | |
qcacld-3.0: Fix kernel checkpatch warnings in wlan_hdd_cfg.h
Fix kernel checkpatch warnings in wlan_hdd_cfg.h.
Change-Id: I88d7c7409fe413a732f69a950e46f4847e90b04b
CRs-Fixed: 2024274
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 90 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 20 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_wext.c | 2 |
4 files changed, 52 insertions, 62 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 66b59cfb40ed..f996e2870d41 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -234,7 +234,7 @@ #define CFG_ADVERTISE_CONCURRENT_OPERATION_MIN (0) #define CFG_ADVERTISE_CONCURRENT_OPERATION_MAX (1) -typedef enum { +enum hdd_dot11_mode { eHDD_DOT11_MODE_AUTO = 0, /* covers all things we support */ eHDD_DOT11_MODE_abg, /* 11a/b/g only, no HT, no proprietary */ eHDD_DOT11_MODE_11b, @@ -246,7 +246,7 @@ typedef enum { eHDD_DOT11_MODE_11ac_ONLY, eHDD_DOT11_MODE_11ac, eHDD_DOT11_MODE_11a, -} eHddDot11Mode; +}; /* * <ini> @@ -2796,7 +2796,9 @@ typedef enum { #define CFG_MAX_TX_POWER_NAME "gTxPowerCap" #define CFG_MAX_TX_POWER_MIN WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMIN #define CFG_MAX_TX_POWER_MAX WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX -/* Not to use CFG default because if no registry setting, this is ignored by SME. */ +/* Not to use CFG default because if no registry setting, + * this is ignored by SME + */ #define CFG_MAX_TX_POWER_DEFAULT WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX /* This ini controls driver to honor/dishonor power constraint from AP */ @@ -4251,11 +4253,11 @@ enum station_keepalive_method { #define CFG_ENABLE_RAMDUMP_COLLECTION_MAX (1) #define CFG_ENABLE_RAMDUMP_COLLECTION_DEFAULT (1) -typedef enum { +enum hdd_link_speed_rpt_type { eHDD_LINK_SPEED_REPORT_ACTUAL = 0, eHDD_LINK_SPEED_REPORT_MAX = 1, eHDD_LINK_SPEED_REPORT_MAX_SCALED = 2, -} eHddLinkSpeedReportType; +}; /* * <ini> @@ -4285,26 +4287,25 @@ typedef enum { #define CFG_VHT_CHANNEL_WIDTH_DEFAULT (3) /* -* <ini> -* gVhtRxMCS - VHT Rx MCS capability for 1x1 mode -* @Min: 0 -* @Max: 2 -* @Default: 0 -* -* This ini is used to set VHT Rx MCS capability for 1x1 mode. -* 0, MCS0-7 -* 1, MCS0-8 -* 2, MCS0-9 -* -* Related: NA -* -* Supported Feature: 11AC -* -* Usage: Internal/External -* -* </ini> -*/ - + * <ini> + * gVhtRxMCS - VHT Rx MCS capability for 1x1 mode + * @Min: 0 + * @Max: 2 + * @Default: 0 + * + * This ini is used to set VHT Rx MCS capability for 1x1 mode. + * 0, MCS0-7 + * 1, MCS0-8 + * 2, MCS0-9 + * + * Related: NA + * + * Supported Feature: 11AC + * + * Usage: Internal/External + * + * </ini> + */ #define CFG_VHT_ENABLE_RX_MCS_8_9 "gVhtRxMCS" #define CFG_VHT_ENABLE_RX_MCS_8_9_MIN (0) #define CFG_VHT_ENABLE_RX_MCS_8_9_MAX (2) @@ -5163,7 +5164,8 @@ typedef enum { * Options * 0 -Disable DynamicDTIM * 1 to 5 - SLM will switch to DTIM specified here when host suspends and - * switch DTIM1 when host resumes */ + * switch DTIM1 when host resumes + */ #define CFG_ENABLE_DYNAMIC_DTIM_NAME "gEnableDynamicDTIM" #define CFG_ENABLE_DYNAMIC_DTIM_MIN (0) #define CFG_ENABLE_DYNAMIC_DTIM_MAX (9) @@ -10466,9 +10468,6 @@ enum dot11p_mode { #define CFG_SAP_CH_SWITCH_BEACON_CNT_MAX (5) #define CFG_SAP_CH_SWITCH_BEACON_CNT_DEFAULT (5) -/*--------------------------------------------------------------------------- - Type declarations - -------------------------------------------------------------------------*/ struct hdd_config { /* Bitmap to track what is explicitly configured */ @@ -10490,7 +10489,7 @@ struct hdd_config { uint32_t nBmpsModListenInterval; uint32_t nBmpsMaxListenInterval; uint32_t nBmpsMinListenInterval; - eHddDot11Mode dot11Mode; + enum hdd_dot11_mode dot11Mode; uint32_t nChannelBondingMode24GHz; uint32_t nChannelBondingMode5GHz; uint32_t MaxRxAmpduFactor; @@ -10572,9 +10571,9 @@ struct hdd_config { uint32_t min_rest_time_conc; /* In units of milliseconds */ uint32_t idle_time_conc; - uint8_t nNumStaChanCombinedConc; /* number of channels combined for */ + uint8_t nNumStaChanCombinedConc; /* STA in each split scan operation */ - uint8_t nNumP2PChanCombinedConc; /* number of channels combined for */ + uint8_t nNumP2PChanCombinedConc; /* P2P in each split scan operation */ #endif @@ -10650,7 +10649,8 @@ struct hdd_config { char wowlPattern[1024]; /* Control for Replay counetr. value 1 means - single replay counter for all TID */ + * single replay counter for all TID + */ bool bSingleTidRc; uint8_t mcastBcastFilterSetting; bool fhostArpOffload; @@ -10716,7 +10716,7 @@ struct hdd_config { uint8_t enable_dfs_pno_chnl_scan; uint8_t enableDynamicDTIM; uint8_t ShortGI40MhzEnable; - eHddLinkSpeedReportType reportMaxLinkSpeed; + enum hdd_link_speed_rpt_type reportMaxLinkSpeed; int32_t linkSpeedRssiHigh; int32_t linkSpeedRssiMid; int32_t linkSpeedRssiLow; @@ -10833,7 +10833,6 @@ struct hdd_config { uint32_t cfgMaxMediumTime; bool enableVhtFor24GHzBand; bool enable_sap_vendor_vht; - /* Flag indicating whether legacy fast roam during concurrency is enabled in cfg.ini or not */ bool bFastRoamInConIniFeatureEnabled; bool fEnableAdaptRxDrain; bool enableIbssHeartBeatOffload; @@ -11252,13 +11251,13 @@ struct hdd_config { */ #define VAR_FLAGS_DYNAMIC_CFG (1 << 3) -typedef enum { +enum wlan_parameter_type { WLAN_PARAM_Integer, WLAN_PARAM_SignedInteger, WLAN_PARAM_HexInteger, WLAN_PARAM_String, WLAN_PARAM_MacAddr, -} WLAN_PARAMETER_TYPE; +}; #define REG_VARIABLE(_Name, _Type, _Struct, _VarName, \ _Flags, _Default, _Min, _Max) \ @@ -11306,10 +11305,9 @@ typedef enum { 0 \ } -typedef struct tREG_TABLE_ENTRY { - +struct reg_table_entry { char *RegName; /* variable name in the qcom_cfg.ini file */ - WLAN_PARAMETER_TYPE RegType; /* variable type in hdd_config struct */ + enum wlan_parameter_type RegType; /* variable type in hdd_config struct */ unsigned long Flags; /* Specify optional parms and if RangeCheck is performed */ unsigned short VarOffset; /* offset to field from the base address of the structure */ unsigned short VarSize; /* size (in bytes) of the field */ @@ -11320,15 +11318,7 @@ typedef struct tREG_TABLE_ENTRY { void (*pfnDynamicnotify)(hdd_context_t *pHddCtx, unsigned long notifyId); unsigned long notifyId; /* Dynamic modification identifier */ -} REG_TABLE_ENTRY; - -static __inline unsigned long util_min(unsigned long a, unsigned long b) -{ - unsigned long r; - - r = ((a < b) ? a : b); - return r; -} +}; /* Function declarations and documenation */ QDF_STATUS hdd_parse_config_ini(hdd_context_t *pHddCtx); @@ -11381,7 +11371,7 @@ bool hdd_update_config_cfg(hdd_context_t *pHddCtx); QDF_STATUS hdd_cfg_get_global_config(hdd_context_t *pHddCtx, char *pBuf, int buflen); -eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode(eHddDot11Mode dot11Mode); +eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode(enum hdd_dot11_mode dot11Mode); QDF_STATUS hdd_execute_global_config_command(hdd_context_t *pHddCtx, char *command); diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 0dc353ab1fef..2f1fc63c2823 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -326,7 +326,7 @@ cb_notify_set_roam_scan_hi_rssi_scan_params(hdd_context_t *hdd_ctx, } -REG_TABLE_ENTRY g_registry_table[] = { +struct reg_table_entry g_registry_table[] = { REG_VARIABLE(CFG_RTS_THRESHOLD_NAME, WLAN_PARAM_Integer, struct hdd_config, RTSThreshold, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -4595,14 +4595,14 @@ static char *i_trim(char *str) * Return: QDF_STATUS_SUCCESS if the configuration and buffer size can carry * the content, otherwise QDF_STATUS_E_RESOURCES */ -static QDF_STATUS hdd_cfg_get_config(REG_TABLE_ENTRY *reg_table, +static QDF_STATUS hdd_cfg_get_config(struct reg_table_entry *reg_table, unsigned long cRegTableEntries, uint8_t *ini_struct, hdd_context_t *pHddCtx, char *pBuf, int buflen) { unsigned int idx; - REG_TABLE_ENTRY *pRegEntry = reg_table; + struct reg_table_entry *pRegEntry = reg_table; uint32_t value; char valueStr[CFG_VALUE_MAX_LEN]; char configStr[CFG_ENTRY_MAX_LEN]; @@ -4801,7 +4801,7 @@ static QDF_STATUS hdd_apply_cfg_ini(hdd_context_t *pHddCtx, uint32_t value; int32_t svalue; void *pStructBase = pHddCtx->config; - REG_TABLE_ENTRY *pRegEntry = g_registry_table; + struct reg_table_entry *pRegEntry = g_registry_table; unsigned long cRegTableEntries = QDF_ARRAY_SIZE(g_registry_table); uint32_t cbOutString; int i; @@ -4961,8 +4961,8 @@ static QDF_STATUS hdd_apply_cfg_ini(hdd_context_t *pHddCtx, pRegEntry->RegName, WLAN_INI_FILE); cbOutString = - util_min(strlen - ((char *)pRegEntry-> + QDF_MIN(strlen + ((char *)pRegEntry-> VarDefault), pRegEntry->VarSize - 1); memcpy(pField, @@ -4979,7 +4979,7 @@ static QDF_STATUS hdd_apply_cfg_ini(hdd_context_t *pHddCtx, } else { /* Failed to read the string parameter from the registry. Use the default. */ cbOutString = - util_min(strlen((char *)pRegEntry->VarDefault), + QDF_MIN(strlen((char *)pRegEntry->VarDefault), pRegEntry->VarSize - 1); memcpy(pField, (void *)(pRegEntry->VarDefault), cbOutString); @@ -5033,13 +5033,13 @@ static QDF_STATUS hdd_apply_cfg_ini(hdd_context_t *pHddCtx, * Return: QDF_STATUS_SUCCESS if the command is found and able to execute, * otherwise the appropriate QDF_STATUS will be returned */ -static QDF_STATUS hdd_execute_config_command(REG_TABLE_ENTRY *reg_table, +static QDF_STATUS hdd_execute_config_command(struct reg_table_entry *reg_table, unsigned long tableSize, uint8_t *ini_struct, hdd_context_t *pHddCtx, char *command) { - REG_TABLE_ENTRY *pRegEntry; + struct reg_table_entry *pRegEntry; char *clone; char *pCmd; void *pField; @@ -6322,7 +6322,7 @@ config_exit: * * Return: the CSR phy mode value */ -eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode(eHddDot11Mode dot11Mode) +eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode(enum hdd_dot11_mode dot11Mode) { if (cds_is_sub_20_mhz_enabled()) return eCSR_DOT11_MODE_abg; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index a7589aff7aa1..b0ff7de8adae 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12734,7 +12734,7 @@ void hdd_select_cbmode(hdd_adapter_t *pAdapter, uint8_t operationChannel, cds_set_channel_params(operationChannel, sec_ch, ch_params); if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam()) { - eHddDot11Mode hdd_dot11_mode; + enum hdd_dot11_mode hdd_dot11_mode; uint8_t iniDot11Mode = (WLAN_HDD_GET_CTX(pAdapter))->config->dot11Mode; diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 17718ed8801f..6bb9f15c6ad0 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -7050,7 +7050,7 @@ int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal, uint32_t chwidth = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE; uint32_t vhtchanwidth; eCsrPhyMode phymode = -EIO, old_phymode; - eHddDot11Mode hdd_dot11mode = phddctx->config->dot11Mode; + enum hdd_dot11_mode hdd_dot11mode = phddctx->config->dot11Mode; eCsrBand curr_band = eCSR_BAND_ALL; old_phymode = sme_get_phy_mode(hal); |
