Browse Source

qcacld-3.0: Replace hdd_context_t in wlan_hdd_oemdata.[ch]

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

Change-Id: Ia6cbe718dec3dc1c3b8bae19a84408d439b21717
CRs-Fixed: 2100174
Jeff Johnson 7 years ago
parent
commit
1e3e3eed95
2 changed files with 7 additions and 5 deletions
  1. 4 2
      core/hdd/inc/wlan_hdd_oemdata.h
  2. 3 3
      core/hdd/src/wlan_hdd_oemdata.c

+ 4 - 2
core/hdd/inc/wlan_hdd_oemdata.h

@@ -34,6 +34,8 @@
 #ifndef __WLAN_HDD_OEM_DATA_H__
 #define __WLAN_HDD_OEM_DATA_H__
 
+struct hdd_context;
+
 #ifdef FEATURE_OEM_DATA_SUPPORT
 
 #ifndef OEM_DATA_REQ_SIZE
@@ -187,7 +189,7 @@ int iw_get_oem_data_cap(struct net_device *dev, struct iw_request_info *info,
 int oem_activate_service(struct hdd_context *hdd_ctx);
 
 void hdd_send_oem_data_rsp_msg(struct oem_data_rsp *oem_rsp);
-void hdd_update_channel_bw_info(hdd_context_t *hdd_ctx,
+void hdd_update_channel_bw_info(struct hdd_context *hdd_ctx,
 				uint16_t chan,
 				void *hdd_chan_info);
 #else
@@ -198,7 +200,7 @@ static inline int oem_activate_service(struct hdd_context *hdd_ctx)
 
 static inline void hdd_send_oem_data_rsp_msg(void *oem_rsp) {}
 
-static inline void hdd_update_channel_bw_info(hdd_context_t *hdd_ctx,
+static inline void hdd_update_channel_bw_info(struct hdd_context *hdd_ctx,
 					      uint16_t chan,
 					      void *hdd_chan_info) {}
 #endif /* FEATURE_OEM_DATA_SUPPORT */

+ 3 - 3
core/hdd/src/wlan_hdd_oemdata.c

@@ -67,7 +67,7 @@ static int populate_oem_data_cap(hdd_adapter_t *adapter,
 	struct hdd_config *config;
 	uint32_t num_chan;
 	uint8_t *chan_list;
-	hdd_context_t *hdd_ctx = adapter->pHddCtx;
+	struct hdd_context *hdd_ctx = adapter->pHddCtx;
 
 	config = hdd_ctx->config;
 	if (!config) {
@@ -144,7 +144,7 @@ int iw_get_oem_data_cap(struct net_device *dev,
 	struct oem_data_cap oemDataCap = { {0} };
 	struct oem_data_cap *pHddOemDataCap;
 	hdd_adapter_t *pAdapter = (netdev_priv(dev));
-	hdd_context_t *pHddContext;
+	struct hdd_context *pHddContext;
 	int ret;
 
 	ENTER();
@@ -401,7 +401,7 @@ static QDF_STATUS oem_process_data_req_msg(int oem_data_len, char *oem_data)
  *
  * Return: void
  */
-void hdd_update_channel_bw_info(hdd_context_t *hdd_ctx,
+void hdd_update_channel_bw_info(struct hdd_context *hdd_ctx,
 				uint16_t chan, void *chan_info)
 {
 	struct ch_params ch_params = {0};