Browse Source

qcacld-3.0: Replace typedef hdd_ap_ctx_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_ap_ctx_t typedef does not
meet any of those criteria, so replace it with a well named struct.

Change-Id: I3084d902b405529f82ff9056f48a8c38392f50f5
CRs-Fixed: 2101017
Jeff Johnson 7 years ago
parent
commit
8725103294

+ 0 - 1
core/hdd/inc/wlan_hdd_assoc.h

@@ -215,7 +215,6 @@ struct hdd_connection_info {
 /* Forward declarations */
 typedef struct hdd_adapter hdd_adapter_t;
 typedef struct hdd_station_ctx hdd_station_ctx_t;
-typedef struct hdd_ap_ctx hdd_ap_ctx_t;
 
 /**
  * hdd_is_connecting() - Function to check connection progress

+ 1 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -1191,7 +1191,7 @@ struct hdd_adapter {
 
 	union {
 		hdd_station_ctx_t station;
-		hdd_ap_ctx_t ap;
+		struct hdd_ap_ctx ap;
 	} sessionCtx;
 
 #ifdef WLAN_FEATURE_TSF

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

@@ -3819,7 +3819,7 @@ static bool wlan_hdd_check_dfs_channel_for_adapter(struct hdd_context *hdd_ctx,
 {
 	hdd_adapter_t *adapter;
 	hdd_adapter_list_node_t *adapter_node = NULL, *next = NULL;
-	hdd_ap_ctx_t *ap_ctx;
+	struct hdd_ap_ctx *ap_ctx;
 	hdd_station_ctx_t *sta_ctx;
 	QDF_STATUS qdf_status;
 
@@ -8906,7 +8906,7 @@ int wlan_hdd_request_pre_cac(uint8_t channel)
 	struct hdd_context *hdd_ctx;
 	int ret;
 	hdd_adapter_t *ap_adapter, *pre_cac_adapter;
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	QDF_STATUS status;
 	struct wiphy *wiphy;
 	struct net_device *dev;
@@ -9550,7 +9550,7 @@ __wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy,
 	struct hdd_context *hdd_ctx = wiphy_priv(wiphy);
 	struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_MAX + 1];
 	uint8_t config_channel = 0;
-	hdd_ap_ctx_t *ap_ctx;
+	struct hdd_ap_ctx *ap_ctx;
 	int ret;
 	QDF_STATUS status;
 
@@ -10125,7 +10125,7 @@ static int hdd_update_acs_channel(hdd_adapter_t *adapter, uint8_t reason,
 				  struct hdd_vendor_chan_info *channel_list)
 {
 	tsap_Config_t *sap_config;
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
@@ -13588,7 +13588,7 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 	hdd_hostapd_state_t *pHostapdState;
 	QDF_STATUS qdf_ret_status;
 	struct hdd_context *pHddCtx;
-	hdd_ap_ctx_t *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
+	struct hdd_ap_ctx *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
 
 	ENTER();
 
@@ -14192,7 +14192,7 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
 		    (eCSR_ENCRYPT_TYPE_AES_GCMP_256 !=
 		    pWextState->roamProfile.EncryptionType.encryptionType[0])) {
 			/* Saving key direction for default key index to TX default */
-			hdd_ap_ctx_t *pAPCtx =
+			struct hdd_ap_ctx *pAPCtx =
 				WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
 			pAPCtx->wepKey[key_index].keyDirection =
 				eSIR_TX_DEFAULT;
@@ -14867,7 +14867,7 @@ static bool wlan_hdd_handle_sap_sta_dfs_conc(hdd_adapter_t *adapter,
 {
 	struct hdd_context *hdd_ctx;
 	hdd_adapter_t *ap_adapter;
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	hdd_hostapd_state_t *hostapd_state;
 	uint8_t channel = 0;
 	QDF_STATUS status;

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

@@ -602,7 +602,7 @@ static void hdd_hostapd_inactivity_timer_cb(void *context)
 #ifdef DISABLE_CONCURRENCY_AUTOSAVE
 	QDF_STATUS qdf_status;
 	hdd_adapter_t *pHostapdAdapter;
-	hdd_ap_ctx_t *pHddApCtx;
+	struct hdd_ap_ctx *pHddApCtx;
 	struct hdd_context *hdd_ctx;
 #endif /* DISABLE_CONCURRENCY_AUTOSAVE */
 
@@ -1332,7 +1332,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 				    void *usrDataForCallback)
 {
 	hdd_adapter_t *pHostapdAdapter;
-	hdd_ap_ctx_t *pHddApCtx;
+	struct hdd_ap_ctx *pHddApCtx;
 	hdd_hostapd_state_t *pHostapdState;
 	struct net_device *dev;
 	eSapHddEvent sapEvent;
@@ -2698,7 +2698,7 @@ QDF_STATUS wlan_hdd_get_channel_for_sap_restart(
 				uint8_t *sec_ch)
 {
 	tHalHandle *hal_handle;
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	uint8_t intf_ch = 0;
 	struct hdd_context *hdd_ctx;
 	hdd_station_ctx_t *hdd_sta_ctx;
@@ -4797,7 +4797,7 @@ int __iw_get_wpspbc_probe_req_ies(struct net_device *dev,
 {
 	hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
 	struct sap_wpspbc_probe_reqies WPSPBCProbeReqIEs;
-	hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
+	struct hdd_ap_ctx *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
 	struct hdd_context *hdd_ctx;
 	int ret;
 
@@ -4953,7 +4953,7 @@ static int __iw_set_ap_encodeext(struct net_device *dev,
 			       union iwreq_data *wrqu, char *extra)
 {
 	hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev));
-	hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
+	struct hdd_ap_ctx *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
 	struct hdd_context *hdd_ctx;
 	int ret;
 	QDF_STATUS vstatus;
@@ -5164,7 +5164,7 @@ static int __iw_get_ap_freq(struct net_device *dev,
 	struct hdd_context *hdd_ctx;
 	tHalHandle hHal;
 	hdd_hostapd_state_t *pHostapdState;
-	hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
+	struct hdd_ap_ctx *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
 	int ret;
 
 	ENTER_DEV(dev);

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

@@ -1321,7 +1321,7 @@ void hdd_ipa_set_tx_flow_info(void)
 	QDF_STATUS status;
 	hdd_adapter_t *adapter;
 	hdd_station_ctx_t *pHddStaCtx;
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	hdd_hostapd_state_t *hostapd_state;
 	struct qdf_mac_addr staBssid = QDF_MAC_ADDR_ZERO_INITIALIZER;
 	struct qdf_mac_addr p2pBssid = QDF_MAC_ADDR_ZERO_INITIALIZER;

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

@@ -1719,7 +1719,7 @@ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx)
 	hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL;
 	hdd_adapter_t *adapter;
 	QDF_STATUS status;
-	hdd_ap_ctx_t *ap_ctx;
+	struct hdd_ap_ctx *ap_ctx;
 
 	if (!hdd_ctx || hdd_ctx->config->disableDFSChSwitch) {
 		hdd_info("skip tx block hdd_ctx=%p, disableDFSChSwitch=%d",
@@ -7167,7 +7167,7 @@ static uint8_t hdd_get_safe_channel_from_pcl_and_acs_range(
  */
 void hdd_switch_sap_channel(hdd_adapter_t *adapter, uint8_t channel)
 {
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	tHalHandle *hal_handle;
 	struct hdd_context *hdd_ctx;
 
@@ -10613,7 +10613,7 @@ QDF_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
 						  tScanResultHandle *scan_cache,
 						  bool *concurrent_chnl_same)
 {
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	uint8_t channel_id;
 	QDF_STATUS status;
 	enum tQDF_ADAPTER_MODE device_mode = ap_adapter->device_mode;
@@ -10662,7 +10662,7 @@ QDF_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
  */
 void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
 {
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	hdd_hostapd_state_t *hostapd_state;
 	QDF_STATUS qdf_status;
 	struct hdd_context *hdd_ctx;
@@ -10716,7 +10716,7 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
  */
 void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter, bool reinit)
 {
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	hdd_hostapd_state_t *hostapd_state;
 	QDF_STATUS qdf_status;
 	struct hdd_context *hdd_ctx;
@@ -12266,7 +12266,7 @@ end:
  */
 void hdd_restart_sap(hdd_adapter_t *ap_adapter)
 {
-	hdd_ap_ctx_t *hdd_ap_ctx;
+	struct hdd_ap_ctx *hdd_ap_ctx;
 	hdd_hostapd_state_t *hostapd_state;
 	QDF_STATUS qdf_status;
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter);

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

@@ -253,7 +253,7 @@ static int __hdd_softap_hard_start_xmit(struct sk_buff *skb,
 {
 	sme_ac_enum_type ac = SME_AC_BE;
 	hdd_adapter_t *pAdapter = (hdd_adapter_t *) netdev_priv(dev);
-	hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
+	struct hdd_ap_ctx *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
 	struct qdf_mac_addr *pDestMacAddress;
 	uint8_t STAId;
 	uint32_t num_seg;
@@ -990,7 +990,7 @@ QDF_STATUS hdd_softap_register_bc_sta(hdd_adapter_t *pAdapter,
 	struct hdd_context *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 	struct qdf_mac_addr broadcastMacAddr =
 					QDF_MAC_ADDR_BROADCAST_INITIALIZER;
-	hdd_ap_ctx_t *pHddApCtx;
+	struct hdd_ap_ctx *pHddApCtx;
 
 	pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
 

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

@@ -3724,7 +3724,7 @@ static uint8_t hdd_get_rate_flags(uint32_t rate,
  *
  * Return: None
  */
-static void wlan_hdd_fill_rate_info(hdd_ap_ctx_t *ap_ctx,
+static void wlan_hdd_fill_rate_info(struct hdd_ap_ctx *ap_ctx,
 				    struct sir_peer_info_ext *peer_info)
 {
 	uint8_t flags;
@@ -3818,7 +3818,7 @@ int wlan_hdd_get_station_remote(struct wiphy *wiphy,
 {
 	hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	struct hdd_context *hddctx = wiphy_priv(wiphy);
-	hdd_ap_ctx_t *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
+	struct hdd_ap_ctx *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 	hdd_station_info_t *stainfo = NULL;
 	struct hdd_config *cfg;
 	struct qdf_mac_addr macaddr;