Parcourir la source

qcacld-3.0: Replace typedef hdd_hostapd_state_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_hostapd_state_t typedef
does not meet any of those criteria, so replace references to it with
a reference to the underlying struct.

Change-Id: Ifba43e6a79aced01a73d345d2adcf8302698d9ee
CRs-Fixed: 2119528
Jeff Johnson il y a 7 ans
Parent
commit
ca2530cd52

+ 3 - 4
core/hdd/inc/wlan_hdd_main.h

@@ -701,15 +701,14 @@ struct hdd_station_ctx {
 
 #define BSS_STOP    0
 #define BSS_START   1
-typedef struct hdd_hostapd_state {
+struct hdd_hostapd_state {
 	int bssState;
 	qdf_event_t qdf_event;
 	qdf_event_t qdf_stop_bss_event;
 	qdf_event_t qdf_sta_disassoc_event;
 	QDF_STATUS qdf_status;
 	bool bCommit;
-
-} hdd_hostapd_state_t;
+};
 
 /**
  * enum bss_stop_reason - reasons why a BSS is stopped.
@@ -840,7 +839,7 @@ struct hdd_station_info {
 };
 
 struct hdd_ap_ctx {
-	hdd_hostapd_state_t HostapdState;
+	struct hdd_hostapd_state HostapdState;
 
 	/* Memory differentiation mode is enabled */
 	/* uint16_t uMemoryDiffThreshold; */

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

@@ -13797,7 +13797,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 	tCsrRoamSetKey setKey;
 	int status;
 	uint32_t roamId = 0xFF;
-	hdd_hostapd_state_t *pHostapdState;
+	struct hdd_hostapd_state *pHostapdState;
 	QDF_STATUS qdf_ret_status;
 	struct hdd_context *hdd_ctx;
 	struct hdd_ap_ctx *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
@@ -15080,7 +15080,7 @@ static bool wlan_hdd_handle_sap_sta_dfs_conc(struct hdd_adapter *adapter,
 	struct hdd_context *hdd_ctx;
 	struct hdd_adapter *ap_adapter;
 	struct hdd_ap_ctx *hdd_ap_ctx;
-	hdd_hostapd_state_t *hostapd_state;
+	struct hdd_hostapd_state *hostapd_state;
 	uint8_t channel = 0;
 	QDF_STATUS status;
 
@@ -17781,7 +17781,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
 	struct hdd_adapter *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	struct hdd_context *hdd_ctx;
 	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
-	hdd_hostapd_state_t *hapd_state;
+	struct hdd_hostapd_state *hapd_state;
 	int status;
 	uint8_t staId;
 	uint8_t *mac;
@@ -18664,7 +18664,7 @@ static int __wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
 {
 	int i;
 	struct hdd_adapter *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
-	hdd_hostapd_state_t *pHostapdState;
+	struct hdd_hostapd_state *pHostapdState;
 	tsap_Config_t *pConfig;
 	struct hdd_context *hdd_ctx;
 	int status;

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

@@ -230,7 +230,7 @@ static void hdd_hostapd_channel_allow_suspend(struct hdd_adapter *pAdapter,
 {
 
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
-	hdd_hostapd_state_t *pHostapdState =
+	struct hdd_hostapd_state *pHostapdState =
 		WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
 
 	hdd_debug("bssState: %d, channel: %d, dfs_ref_cnt: %d",
@@ -268,7 +268,7 @@ static void hdd_hostapd_channel_prevent_suspend(struct hdd_adapter *pAdapter,
 						uint8_t channel)
 {
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
-	hdd_hostapd_state_t *pHostapdState =
+	struct hdd_hostapd_state *pHostapdState =
 		WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
 
 	hdd_debug("bssState: %d, channel: %d, dfs_ref_cnt: %d",
@@ -1334,7 +1334,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 {
 	struct hdd_adapter *pHostapdAdapter;
 	struct hdd_ap_ctx *pHddApCtx;
-	hdd_hostapd_state_t *pHostapdState;
+	struct hdd_hostapd_state *pHostapdState;
 	struct net_device *dev;
 	eSapHddEvent sapEvent;
 	union iwreq_data wrqu;
@@ -2830,7 +2830,7 @@ static iw_softap_set_ini_cfg(struct net_device *dev,
 static int hdd_sap_get_chan_width(struct hdd_adapter *adapter, int *value)
 {
 	struct sap_context *sap_ctx;
-	hdd_hostapd_state_t *hostapdstate;
+	struct hdd_hostapd_state *hostapdstate;
 
 	ENTER();
 	hostapdstate = WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
@@ -4867,7 +4867,7 @@ static int __iw_get_ap_freq(struct net_device *dev,
 	struct hdd_adapter *pHostapdAdapter = (netdev_priv(dev));
 	struct hdd_context *hdd_ctx;
 	tHalHandle hHal;
-	hdd_hostapd_state_t *pHostapdState;
+	struct hdd_hostapd_state *pHostapdState;
 	struct hdd_ap_ctx *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
 	int ret;
 
@@ -5018,7 +5018,7 @@ __iw_softap_stopbss(struct net_device *dev,
 		return ret;
 
 	if (test_bit(SOFTAP_BSS_STARTED, &pHostapdAdapter->event_flags)) {
-		hdd_hostapd_state_t *pHostapdState =
+		struct hdd_hostapd_state *pHostapdState =
 			WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter);
 
 		qdf_event_reset(&pHostapdState->qdf_stop_bss_event);
@@ -6083,7 +6083,7 @@ void hdd_set_ap_ops(struct net_device *pWlanHostapdDev)
 
 QDF_STATUS hdd_init_ap_mode(struct hdd_adapter *pAdapter, bool reinit)
 {
-	hdd_hostapd_state_t *phostapdBuf;
+	struct hdd_hostapd_state *phostapdBuf;
 	struct net_device *dev = pAdapter->dev;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
 	QDF_STATUS status;
@@ -6163,7 +6163,7 @@ QDF_STATUS hdd_init_ap_mode(struct hdd_adapter *pAdapter, bool reinit)
 	sme_set_curr_device_mode(hdd_ctx->hHal, pAdapter->device_mode);
 
 	/* Zero the memory.  This zeros the profile structure. */
-	memset(phostapdBuf, 0, sizeof(hdd_hostapd_state_t));
+	memset(phostapdBuf, 0, sizeof(struct hdd_hostapd_state));
 
 	/* Set up the pointer to the Wireless Extensions state structure */
 	/* NOP */
@@ -7416,7 +7416,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *pHostapdAdapter,
 	int status = QDF_STATUS_SUCCESS, ret;
 	int qdf_status = QDF_STATUS_SUCCESS;
 	tpWLAN_SAPEventCB pSapEventCallback;
-	hdd_hostapd_state_t *pHostapdState;
+	struct hdd_hostapd_state *pHostapdState;
 	tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pHostapdAdapter);
 	struct qc_mac_acl_entry *acl_entry = NULL;
 	int32_t i;
@@ -8186,7 +8186,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
 
 	mutex_lock(&hdd_ctx->sap_lock);
 	if (test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags)) {
-		hdd_hostapd_state_t *pHostapdState =
+		struct hdd_hostapd_state *pHostapdState =
 			WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
 
 		qdf_event_reset(&pHostapdState->qdf_stop_bss_event);

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

@@ -1325,7 +1325,7 @@ void hdd_ipa_set_tx_flow_info(void)
 	struct hdd_adapter *adapter;
 	struct hdd_station_ctx *pHddStaCtx;
 	struct hdd_ap_ctx *hdd_ap_ctx;
-	hdd_hostapd_state_t *hostapd_state;
+	struct hdd_hostapd_state *hostapd_state;
 	struct qdf_mac_addr staBssid = QDF_MAC_ADDR_ZERO_INITIALIZER;
 	struct qdf_mac_addr p2pBssid = QDF_MAC_ADDR_ZERO_INITIALIZER;
 	struct qdf_mac_addr apBssid = QDF_MAC_ADDR_ZERO_INITIALIZER;

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

@@ -4395,7 +4395,7 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, struct hdd_adapter *ada
 					WLAN_HDD_GET_SAP_CTX_PTR(adapter));
 
 			if (QDF_IS_STATUS_SUCCESS(status)) {
-				hdd_hostapd_state_t *hostapd_state =
+				struct hdd_hostapd_state *hostapd_state =
 					WLAN_HDD_GET_HOSTAP_STATE_PTR(adapter);
 				qdf_event_reset(&hostapd_state->
 						qdf_stop_bss_event);
@@ -10680,7 +10680,7 @@ QDF_STATUS wlan_hdd_check_custom_con_channel_rules(struct hdd_adapter *sta_adapt
 void wlan_hdd_stop_sap(struct hdd_adapter *ap_adapter)
 {
 	struct hdd_ap_ctx *hdd_ap_ctx;
-	hdd_hostapd_state_t *hostapd_state;
+	struct hdd_hostapd_state *hostapd_state;
 	QDF_STATUS qdf_status;
 	struct hdd_context *hdd_ctx;
 
@@ -10734,7 +10734,7 @@ void wlan_hdd_stop_sap(struct hdd_adapter *ap_adapter)
 void wlan_hdd_start_sap(struct hdd_adapter *ap_adapter, bool reinit)
 {
 	struct hdd_ap_ctx *hdd_ap_ctx;
-	hdd_hostapd_state_t *hostapd_state;
+	struct hdd_hostapd_state *hostapd_state;
 	QDF_STATUS qdf_status;
 	struct hdd_context *hdd_ctx;
 	tsap_Config_t *sap_config;
@@ -12312,7 +12312,7 @@ end:
 void hdd_restart_sap(struct hdd_adapter *ap_adapter)
 {
 	struct hdd_ap_ctx *hdd_ap_ctx;
-	hdd_hostapd_state_t *hostapd_state;
+	struct hdd_hostapd_state *hostapd_state;
 	QDF_STATUS qdf_status;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter);
 	tsap_Config_t *sap_config;

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

@@ -669,7 +669,7 @@ QDF_STATUS hdd_softap_deinit_tx_rx_sta(struct hdd_adapter *pAdapter,
 				       uint8_t STAId)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	hdd_hostapd_state_t *pHostapdState;
+	struct hdd_hostapd_state *pHostapdState;
 
 	pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);