Преглед изворни кода

qcacld-3.0: Replace typedef hdd_scaninfo_t

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 hdd_scaninfo_t typedef does not
meet any of those criteria, so replace it with a well named struct.

Change-Id: Ia61b1f525a02e21a29e512dcb4c3678b730e6bd6
CRs-Fixed: 2093812
Jeff Johnson пре 7 година
родитељ
комит
3758894ae8

+ 14 - 15
core/hdd/inc/wlan_hdd_main.h

@@ -865,27 +865,26 @@ struct hdd_ap_ctx {
 	enum bss_stop_reason bss_stop_reason;
 };
 
-typedef struct hdd_scaninfo_s {
-	/* The scan pending  */
+/**
+ * struct hdd_scan_info - Per-adapter scan information
+ * @mScanPending: is a scan pending on this adapter?
+ * @mScanPendingCounter: Counter for @mScanPending so that the scan
+ *    pending error log is not printed excessively
+ * @scanAddIE: Additional IE for scan
+ * @default_scan_ies: Default scan IEs
+ * @default_scan_ies_len: Length of @default_scan_ies
+ * @scan_mode: Scan mode
+ * @abortscan_event_var: completion variable for abortscan
+ */
+struct hdd_scan_info {
 	uint32_t mScanPending;
-
-	/* Counter for mScanPending so that the scan pending
-	 * error log is not printed for more than 5 times
-	 */
 	uint32_t mScanPendingCounter;
-
-	/* Additional IE for scan */
 	tSirAddie scanAddIE;
-
 	uint8_t *default_scan_ies;
 	uint16_t default_scan_ies_len;
-	/* Scan mode */
 	tSirScanType scan_mode;
-
-	/* completion variable for abortscan */
 	struct completion abortscan_event_var;
-
-} hdd_scaninfo_t;
+};
 
 #define WLAN_HDD_MAX_MC_ADDR_LIST CFG_TGT_MAX_MULTICAST_FILTER_ENTRIES
 
@@ -1141,7 +1140,7 @@ struct hdd_adapter {
 	bool higherDtimTransition;
 	bool survey_idx;
 
-	hdd_scaninfo_t scan_info;
+	struct hdd_scan_info scan_info;
 
 	/* Flag to ensure PSB is configured through framework */
 	uint8_t psbChanged;

+ 2 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -5166,7 +5166,7 @@ static int wlan_hdd_save_default_scan_ies(hdd_context_t *hdd_ctx,
 					  hdd_adapter_t *adapter,
 					  uint8_t *ie_data, uint16_t ie_len)
 {
-	hdd_scaninfo_t *scan_info = &adapter->scan_info;
+	struct hdd_scan_info *scan_info = &adapter->scan_info;
 	bool add_qcn_ie = hdd_ctx->config->qcn_ie_support;
 
 	if (!scan_info)
@@ -15945,7 +15945,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
 	    (pHddStaCtx->conn_info.connState == eConnectionState_Connecting)) {
 		eCsrRoamDisconnectReason reasonCode =
 			eCSR_DISCONNECT_REASON_UNSPECIFIED;
-		hdd_scaninfo_t *pScanInfo;
+		struct hdd_scan_info *pScanInfo;
 
 		switch (reason) {
 		case WLAN_REASON_MIC_FAILURE:

+ 2 - 2
core/hdd/src/wlan_hdd_hostapd.c

@@ -1066,7 +1066,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 	uint8_t we_custom_start_event[64];
 	char *startBssEvent;
 	hdd_context_t *pHddCtx;
-	hdd_scaninfo_t *pScanInfo = NULL;
+	struct hdd_scan_info *pScanInfo = NULL;
 	struct iw_michaelmicfailure msg;
 	uint8_t ignoreCAC = 0;
 	struct hdd_config *cfg = NULL;
@@ -8139,7 +8139,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
 {
 	hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	hdd_context_t *pHddCtx = wiphy_priv(wiphy);
-	hdd_scaninfo_t *pScanInfo = NULL;
+	struct hdd_scan_info *pScanInfo = NULL;
 	hdd_adapter_t *staAdapter = NULL;
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;

+ 1 - 1
core/hdd/src/wlan_hdd_main.c

@@ -4197,7 +4197,7 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
 	union iwreq_data wrqu;
 	tSirUpdateIE updateIE;
 	unsigned long rc;
-	hdd_scaninfo_t *scan_info = NULL;
+	struct hdd_scan_info *scan_info = NULL;
 
 	ENTER();
 

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

@@ -2259,7 +2259,7 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
 {
 	hdd_context_t *pHddCtx = (hdd_context_t *) wiphy_priv(wiphy);
 	hdd_adapter_t *pAdapter = NULL;
-	hdd_scaninfo_t *scan_info = NULL;
+	struct hdd_scan_info *scan_info = NULL;
 	int ret;
 	uint8_t session_type;
 

+ 1 - 1
core/hdd/src/wlan_hdd_power.c

@@ -1710,7 +1710,7 @@ static int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
 	p_cds_sched_context cds_sched_context = get_cds_sched_ctxt();
 	hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
 	hdd_adapter_t *pAdapter;
-	hdd_scaninfo_t *pScanInfo;
+	struct hdd_scan_info *pScanInfo;
 	QDF_STATUS status;
 	int rc;
 

+ 4 - 4
core/hdd/src/wlan_hdd_scan.c

@@ -456,7 +456,7 @@ static QDF_STATUS hdd_cfg80211_scan_done_callback(tHalHandle halHandle,
 {
 	struct net_device *dev = (struct net_device *)pContext;
 	hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
-	hdd_scaninfo_t *pScanInfo = &pAdapter->scan_info;
+	struct hdd_scan_info *pScanInfo = &pAdapter->scan_info;
 	struct cfg80211_scan_request *req = NULL;
 	bool aborted = false;
 	hdd_context_t *hddctx = WLAN_HDD_GET_CTX(pAdapter);
@@ -696,7 +696,7 @@ static inline void wlan_hdd_copy_bssid_scan_request(tCsrScanRequest *scan_req,
  * Return: 0 on success; error number otherwise
  */
 static int wlan_hdd_update_scan_ies(hdd_adapter_t *adapter,
-			hdd_scaninfo_t *scan_info, uint8_t *scan_ie,
+			struct hdd_scan_info *scan_info, uint8_t *scan_ie,
 			uint16_t *scan_ie_len)
 {
 	uint16_t rem_len = scan_info->default_scan_ies_len;
@@ -770,7 +770,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 	hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 	struct hdd_config *cfg_param = NULL;
 	int status;
-	hdd_scaninfo_t *pScanInfo = NULL;
+	struct hdd_scan_info *pScanInfo = NULL;
 	hdd_adapter_t *con_sap_adapter;
 	uint16_t con_dfs_ch;
 	hdd_wext_state_t *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
@@ -1773,7 +1773,7 @@ int wlan_hdd_vendor_abort_scan(
 int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter)
 {
 	hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-	hdd_scaninfo_t *pScanInfo = NULL;
+	struct hdd_scan_info *pScanInfo = NULL;
 
 	pScanInfo = &pAdapter->scan_info;