summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Girigowda <sgirigow@codeaurora.org>2017-03-25 13:21:40 -0700
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-31 16:00:36 -0700
commit66f2fd546ff7f2659260df622c29464906596b69 (patch)
tree3c2da9fe9e8240455a47983104ab420d1900f65e
parentf03b1b549b493e3d62349b0848b9d0583c06573b (diff)
qcacld-3.0: Fix kernel checkpatch warnings in wlan_hdd_main.h
Fix kernel checkpatch warnings in wlan_hdd_main.h. Change-Id: I3e93ce6073b7ea70f1e471e6ac4beded90999bf7 CRs-Fixed: 2024274
-rw-r--r--core/hdd/inc/wlan_hdd_main.h119
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c20
2 files changed, 64 insertions, 75 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 335b099ad96d..65e0cb0a86c2 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -27,17 +27,11 @@
#if !defined(WLAN_HDD_MAIN_H)
#define WLAN_HDD_MAIN_H
-/**===========================================================================
-
- \file WLAN_HDD_MAIN_H.h
-
- \brief Linux HDD Adapter Type
-
- ==========================================================================*/
-
-/*---------------------------------------------------------------------------
- Include files
- -------------------------------------------------------------------------*/
+/**
+ * DOC: wlan_hdd_main.h
+ *
+ * WLAN Linux Host driver main header file
+ */
#include <linux/netdevice.h>
#include <linux/skbuff.h>
@@ -67,9 +61,6 @@
#include "wlan_hdd_nan_datapath.h"
#include "wlan_tgt_def_config.h"
-/*---------------------------------------------------------------------------
- Preprocessor definitions and constants
- -------------------------------------------------------------------------*/
/** Number of Tx Queues */
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
#define NUM_TX_QUEUES 5
@@ -121,8 +112,9 @@
#define WLAN_WAIT_TIME_LINK_STATUS 800
#define WLAN_WAIT_TIME_POWER_STATS 800
/* Amount of time to wait for sme close session callback.
- This value should be larger than the timeout used by WDI to wait for
- a response from WCNSS */
+ * This value should be larger than the timeout used by WDI to wait for
+ * a response from WCNSS
+ */
#define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000
#define WLAN_WAIT_TIME_ABORTSCAN 2000
@@ -212,7 +204,8 @@
#define WLAN_HDD_PUBLIC_ACTION_FRAME_SUB_TYPE_OFFSET 6
#define WLAN_HDD_IS_SOCIAL_CHANNEL(center_freq) \
- (((center_freq) == 2412) || ((center_freq) == 2437) || ((center_freq) == 2462))
+ (((center_freq) == 2412) || ((center_freq) == 2437) || \
+ ((center_freq) == 2462))
#define WLAN_HDD_CHANNEL_IN_UNII_1_BAND(center_freq) \
(((center_freq) == 5180) || ((center_freq) == 5200) \
@@ -375,7 +368,8 @@ extern spinlock_t hdd_context_lock;
#define ACTION_FRAME_RANDOM_CONTEXT_MAGIC 0x87878787
/* MAX OS Q block time value in msec
- * Prevent from permanent stall, resume OS Q if timer expired */
+ * Prevent from permanent stall, resume OS Q if timer expired
+ */
#define WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME 1000
#define WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME 100
#define WLAN_HDD_TX_FLOW_CONTROL_MAX_24BAND_CH 14
@@ -465,20 +459,21 @@ typedef struct hdd_stats_s {
#endif
} hdd_stats_t;
-typedef enum {
+enum hdd_roam_state {
HDD_ROAM_STATE_NONE,
- /* Issuing a disconnect due to transition into low power states. */
+ /* Issuing a disconnect due to transition into low power states */
HDD_ROAM_STATE_DISCONNECTING_POWER,
- /* move to this state when HDD sets a key with SME/CSR. Note this is */
- /* an important state to get right because we will get calls into our SME */
- /* callback routine for SetKey activity that we did not initiate! */
+ /* Move to this state when HDD sets a key with SME/CSR. Note this is
+ * an important state to get right because we will get calls into our
+ * SME callback routine for SetKey activity that we did not initiate!
+ */
HDD_ROAM_STATE_SETTING_KEY,
-} HDD_ROAM_STATE;
+};
typedef struct roaming_info_s {
- HDD_ROAM_STATE roamingState;
+ enum hdd_roam_state roamingState;
qdf_event_t roamingEvent;
tSirMacAddr bssid;
@@ -500,23 +495,20 @@ typedef struct roaming_info_s {
#define MAX_NUM_BKIDS 16
/** WAPI AUTH mode definition */
-enum _WAPIAuthMode {
+enum wapi_auth_mode {
WAPI_AUTH_MODE_OPEN = 0,
WAPI_AUTH_MODE_PSK = 1,
WAPI_AUTH_MODE_CERT
} __packed;
-typedef enum _WAPIAuthMode WAPIAuthMode;
/** WAPI Work mode structure definition */
#define WZC_ORIGINAL 0
#define WAPI_EXTENTION 1
-struct _WAPI_FUNCTION_MODE {
+struct wapi_function_mode {
unsigned char wapiMode;
} __packed;
-typedef struct _WAPI_FUNCTION_MODE WAPI_FUNCTION_MODE;
-
typedef struct _WAPI_BKID {
uint8_t bkid[16];
} WAPI_BKID, *pWAPI_BKID;
@@ -544,22 +536,19 @@ enum _WAPIKeyType {
PAIRWISE_KEY, /* 0 */
GROUP_KEY /* 1 */
} __packed;
-typedef enum _WAPIKeyType WAPIKeyType;
/** WAPI KEY Direction definition */
-enum _KEY_DIRECTION {
+enum key_direction {
None,
Rx,
Tx,
Rx_Tx
} __packed;
-typedef enum _KEY_DIRECTION WAPI_KEY_DIRECTION;
-
/* WAPI KEY structure definition */
struct WLAN_WAPI_KEY {
- WAPIKeyType keyType;
- WAPI_KEY_DIRECTION keyDirection; /*reserved for future use */
+ enum _WAPIKeyType keyType;
+ enum key_direction keyDirection; /*reserved for future use */
uint8_t keyId;
uint8_t addrIndex[MAX_ADDR_INDEX]; /*reserved for future use */
int wpiekLen;
@@ -610,10 +599,10 @@ typedef struct beacon_data_s {
int dtim_period;
} beacon_data_t;
-typedef enum rem_on_channel_request_type {
+enum rem_on_channel_request_type {
REMAIN_ON_CHANNEL_REQUEST,
OFF_CHANNEL_ACTION_TX,
-} rem_on_channel_request_type_t;
+};
typedef struct action_pkt_buffer {
uint8_t *frame_ptr;
@@ -627,7 +616,7 @@ typedef struct hdd_remain_on_chan_ctx {
enum nl80211_channel_type chan_type;
unsigned int duration;
u64 cookie;
- rem_on_channel_request_type_t rem_on_chan_request;
+ enum rem_on_channel_request_type rem_on_chan_request;
qdf_mc_timer_t hdd_remain_on_chan_timer;
action_pkt_buffer_t action_pkt_buff;
bool hdd_remain_on_chan_cancel_in_progress;
@@ -662,14 +651,14 @@ struct hdd_scan_req {
uint32_t timestamp;
};
-typedef enum {
+enum p2p_action_frame_state {
HDD_IDLE,
HDD_PD_REQ_ACK_PENDING,
HDD_GO_NEG_REQ_ACK_PENDING,
HDD_INVALID_STATE,
-} eP2PActionFrameState;
+};
-typedef enum {
+enum action_frm_type {
WLAN_HDD_GO_NEG_REQ,
WLAN_HDD_GO_NEG_RESP,
WLAN_HDD_GO_NEG_CNF,
@@ -679,7 +668,7 @@ typedef enum {
WLAN_HDD_DEV_DIS_RESP,
WLAN_HDD_PROV_DIS_REQ,
WLAN_HDD_PROV_DIS_RESP,
-} tActionFrmType;
+};
typedef struct hdd_cfg80211_state_s {
uint16_t current_freq;
@@ -688,11 +677,11 @@ typedef struct hdd_cfg80211_state_s {
size_t len;
hdd_remain_on_chan_ctx_t *remain_on_chan_ctx;
struct mutex remain_on_chan_ctx_lock;
- eP2PActionFrameState actionFrmState;
+ enum p2p_action_frame_state actionFrmState;
/* is_go_neg_ack_received flag is set to 1 when
- * the pending ack for GO negotiation req is
- * received.
- */
+ * the pending ack for GO negotiation req is
+ * received.
+ */
bool is_go_neg_ack_received;
} hdd_cfg80211_state_t;
@@ -736,14 +725,14 @@ struct action_frame_random_mac {
};
struct hdd_station_ctx {
- /** Handle to the Wireless Extension State */
+ /* Handle to the Wireless Extension State */
hdd_wext_state_t WextState;
#ifdef FEATURE_WLAN_TDLS
tdlsCtx_t *pHddTdlsCtx;
#endif
- /**Connection information*/
+ /* Connection information*/
connection_info_t conn_info;
roaming_info_t roam_info;
@@ -753,13 +742,13 @@ struct hdd_station_ctx {
#ifdef WLAN_FEATURE_GTK_OFFLOAD
tSirGtkOffloadParams gtkOffloadReqParams;
#endif
- /*Increment whenever ibss New peer joins and departs the network */
+ /* Increment whenever ibss New peer joins and departs the network */
int ibss_sta_generation;
/* Indication of wep/wpa-none keys installation */
bool ibss_enc_key_installed;
- /*Save the wep/wpa-none keys */
+ /* Save the wep/wpa-none keys */
tCsrRoamSetKey ibss_enc_key;
tSirPeerInfoRspParams ibss_peer_info;
@@ -809,15 +798,17 @@ typedef struct {
/** The station entry is used or not */
bool isUsed;
- /** Station ID reported back from HAL (through SAP). Broadcast
- * uses station ID zero by default in both libra and volans. */
+ /* Station ID reported back from HAL (through SAP).
+ * Broadcast uses station ID zero by default
+ */
uint8_t ucSTAId;
/** MAC address of the station */
struct qdf_mac_addr macAddrSTA;
/** Current Station state so HDD knows how to deal with packet
- * queue. Most recent states used to change TLSHIM STA state */
+ * queue. Most recent states used to change TLSHIM STA state
+ */
enum ol_txrx_peer_state tlSTAState;
/** Track QoS status of station */
@@ -867,7 +858,9 @@ struct hdd_ap_ctx_s {
eCsrEncryptionType ucEncryptType;
- /* This will point to group key data, if it is received before start bss. */
+ /* This will point to group key data,
+ * if it is received before start bss
+ */
tCsrRoamSetKey groupKey;
/* This will have WEP key data, if it is received before start bss */
tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY];
@@ -892,7 +885,8 @@ typedef struct hdd_scaninfo_s {
uint32_t mScanPending;
/* Counter for mScanPending so that the scan pending
- error log is not printed for more than 5 times */
+ * error log is not printed for more than 5 times
+ */
uint32_t mScanPendingCounter;
/* Additional IE for scan */
@@ -1474,8 +1468,10 @@ struct hdd_context_s {
qdf_spinlock_t hdd_adapter_lock;
qdf_list_t hddAdapters; /* List of adapters */
- /* One per STA: 1 for BCMC_STA_ID, 1 for each SAP_SELF_STA_ID, 1 for WDS_STAID */
- hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + QDF_MAX_NO_OF_SAP_MODE + 2]; /* One per sta. For quick reference. */
+ /* One per STA: 1 for BCMC_STA_ID, 1 for each SAP_SELF_STA_ID,
+ * 1 for WDS_STAID
+ */
+ hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + QDF_MAX_NO_OF_SAP_MODE + 2];
/** Pointer for firmware image data */
const struct firmware *fw;
@@ -1749,9 +1745,6 @@ struct hdd_context_s {
uint8_t bt_vo_active:1;
};
-/*---------------------------------------------------------------------------
- Function declarations and documentation
- -------------------------------------------------------------------------*/
int hdd_validate_channel_and_bandwidth(hdd_adapter_t *adapter,
uint32_t chan_number,
enum phy_ch_width chan_bw);
@@ -1873,12 +1866,10 @@ void hdd_bus_bandwidth_destroy(hdd_context_t *hdd_ctx);
#else
static inline void hdd_start_bus_bw_compute_timer(hdd_adapter_t *pAdapter)
{
- return;
}
static inline void hdd_stop_bus_bw_computer_timer(hdd_adapter_t *pAdapter)
{
- return;
}
int hdd_bus_bandwidth_init(hdd_context_t *hdd_ctx)
@@ -1888,7 +1879,6 @@ int hdd_bus_bandwidth_init(hdd_context_t *hdd_ctx)
void hdd_bus_bandwidth_destroy(hdd_context_t *hdd_ctx)
{
- return;
}
#endif
@@ -2274,7 +2264,6 @@ void hdd_set_rx_mode_rps(hdd_context_t *hdd_ctx, void *padapter, bool enable);
static inline void hdd_init_nud_stats_ctx(hdd_context_t *hdd_ctx)
{
init_completion(&hdd_ctx->nud_stats_context.response_event);
- return;
}
/**
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 483c25c3647f..b844f81ed9ed 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -146,7 +146,7 @@ static bool wlan_hdd_is_type_p2p_action(const u8 *buf)
static bool hdd_p2p_is_action_type_rsp(const u8 *buf)
{
- tActionFrmType actionFrmType;
+ enum action_frm_type actionFrmType;
if (wlan_hdd_is_type_p2p_action(buf)) {
actionFrmType =
@@ -677,7 +677,7 @@ QDF_STATUS wlan_hdd_remain_on_channel_callback(tHalHandle hHal, void *pCtx,
hdd_cfg80211_state_t *cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
hdd_remain_on_chan_ctx_t *pRemainChanCtx;
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
- rem_on_channel_request_type_t req_type;
+ enum rem_on_channel_request_type req_type;
if (!hdd_ctx) {
hdd_err("Invalid HDD context");
@@ -1343,7 +1343,7 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
struct ieee80211_channel *chan,
unsigned int duration,
u64 *cookie,
- rem_on_channel_request_type_t
+ enum rem_on_channel_request_type
request_type)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
@@ -1811,7 +1811,7 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
uint16_t extendedWait = 0;
uint8_t type = WLAN_HDD_GET_TYPE_FRM_FC(buf[0]);
uint8_t subType = WLAN_HDD_GET_SUBTYPE_FRM_FC(buf[0]);
- tActionFrmType actionFrmType;
+ enum action_frm_type actionFrmType;
bool noack = 0;
int status;
unsigned long rc;
@@ -1985,7 +1985,7 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
if (offchan && wait && chan) {
int status;
- rem_on_channel_request_type_t req_type = OFF_CHANNEL_ACTION_TX;
+ enum rem_on_channel_request_type req_type = OFF_CHANNEL_ACTION_TX;
/* In case of P2P Client mode if we are already */
/* on the same channel then send the frame directly */
@@ -2900,8 +2900,8 @@ int wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
*
* return: void
*/
-static void wlan_hdd_p2p_action_debug(tActionFrmType actionFrmType,
- uint8_t *macFrom)
+static void wlan_hdd_p2p_action_debug(enum action_frm_type actionFrmType,
+ uint8_t *macFrom)
{
if (actionFrmType >= MAX_P2P_ACTION_FRAME_TYPE) {
hdd_debug("[P2P] unknown[%d] <--- OTA from " MAC_ADDRESS_STR,
@@ -2935,8 +2935,8 @@ static void wlan_hdd_p2p_action_debug(tActionFrmType actionFrmType,
*
* return: void
*/
-static void wlan_hdd_p2p_action_debug(tActionFrmType actionFrmType,
- uint8_t *macFrom)
+static void wlan_hdd_p2p_action_debug(enum action_frm_type actionFrmType,
+ uint8_t *macFrom)
{
}
@@ -2951,7 +2951,7 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter,
uint16_t extend_time;
uint8_t type = 0;
uint8_t subType = 0;
- tActionFrmType actionFrmType;
+ enum action_frm_type actionFrmType;
hdd_cfg80211_state_t *cfgState = NULL;
QDF_STATUS status;
hdd_remain_on_chan_ctx_t *pRemainChanCtx = NULL;