Przeglądaj źródła

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
Srinivas Girigowda 8 lat temu
rodzic
commit
85218af8fd
2 zmienionych plików z 48 dodań i 47 usunięć
  1. 38 37
      core/hdd/inc/wlan_hdd_main.h
  2. 10 10
      core/hdd/src/wlan_hdd_p2p.c

+ 38 - 37
core/hdd/inc/wlan_hdd_main.h

@@ -135,7 +135,7 @@
 #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
+ * This value should be larger than the timeout used by WDI to wait for
  * a response from WCNSS
  */
 #define WLAN_WAIT_TIME_SESSIONOPENCLOSE  15000
@@ -223,7 +223,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) \
@@ -393,20 +394,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;
@@ -428,23 +430,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;
@@ -472,22 +471,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;
@@ -538,10 +534,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;
@@ -555,7 +551,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;
@@ -590,14 +586,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,
@@ -607,7 +603,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;
@@ -616,7 +612,7 @@ 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.
@@ -639,27 +635,27 @@ struct hdd_mon_set_ch_info {
 };
 
 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;
 
 	int ft_carrier_on;
 
-	/*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;
 
@@ -709,8 +705,8 @@ 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;
 
@@ -767,7 +763,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];
@@ -1338,8 +1336,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;
@@ -2246,6 +2246,7 @@ int wlan_hdd_sap_get_valid_channellist(hdd_adapter_t *adapter,
  * Return: None
  */
 void wlan_hdd_init_chan_info(hdd_context_t *hdd_ctx);
+
 /**
  * wlan_hdd_deinit_chan_info() - deinitialize channel info variables
  * @hdd_ctx: hdd ctx

+ 10 - 10
core/hdd/src/wlan_hdd_p2p.c

@@ -153,7 +153,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 =
@@ -177,7 +177,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");
@@ -842,7 +842,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);
@@ -1398,7 +1398,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;
@@ -1577,7 +1577,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 */
 
@@ -2464,8 +2464,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,
@@ -2499,8 +2499,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)
 {
 
 }
@@ -2515,7 +2515,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;