From a9dc1dcd1888a37a95b818f98ad12b2d34dea75e Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 28 Aug 2017 11:37:48 -0700 Subject: [PATCH] qcacld-3.0: Replace hdd_context_t in wlan_hdd_tx_rx.[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: I995c57774d472336294e4190708755742eb49e3f CRs-Fixed: 2100157 --- core/hdd/inc/wlan_hdd_tx_rx.h | 6 ++++-- core/hdd/src/wlan_hdd_tx_rx.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index 4044acf40dc0..2dd4ee9e6383 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -40,6 +40,8 @@ #include #include "cdp_txrx_flow_ctrl_legacy.h" +struct hdd_context; + #define HDD_ETHERTYPE_802_1_X 0x888E #define HDD_ETHERTYPE_802_1_X_FRAME_OFFSET 12 #ifdef FEATURE_WLAN_WAPI @@ -135,9 +137,9 @@ void hdd_send_rps_ind(hdd_adapter_t *adapter); void wlan_hdd_classify_pkt(struct sk_buff *skb); #ifdef MSM_PLATFORM -void hdd_reset_tcp_delack(hdd_context_t *hdd_ctx); +void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx); #else -static inline void hdd_reset_tcp_delack(hdd_context_t *hdd_ctx) {} +static inline void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx) {} #endif #ifdef FEATURE_WLAN_DIAG_SUPPORT diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index a5a028efb56f..85a4f0aaff96 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -298,7 +298,7 @@ static inline struct sk_buff *hdd_skb_orphan(hdd_adapter_t *pAdapter, struct sk_buff *skb) { struct sk_buff *nskb; - hdd_context_t *hdd_ctx = pAdapter->pHddCtx; + struct hdd_context *hdd_ctx = pAdapter->pHddCtx; nskb = skb_unshare(skb, GFP_ATOMIC); if (unlikely(hdd_ctx->config->tx_orphan_enable) && (nskb == skb)) { @@ -406,7 +406,7 @@ void wlan_hdd_classify_pkt(struct sk_buff *skb) static inline void wlan_hdd_latency_opt(hdd_adapter_t *adapter, struct sk_buff *skb) { - hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); if (hdd_ctx->config->icmp_disable_ps_val <= 0) return; @@ -535,7 +535,7 @@ static int __hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) struct qdf_mac_addr *mac_addr; #ifdef QCA_PKT_PROTO_TRACE uint8_t proto_type = 0; - hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter); + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(pAdapter); #endif /* QCA_PKT_PROTO_TRACE */ #ifdef QCA_WIFI_FTM @@ -862,7 +862,7 @@ static inline void hdd_wlan_datastall_sta_event(void) static void __hdd_tx_timeout(struct net_device *dev) { hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - hdd_context_t *hdd_ctx; + struct hdd_context *hdd_ctx; struct netdev_queue *txq; int i = 0; @@ -1143,7 +1143,7 @@ static bool hdd_is_rx_wake_lock_needed(struct sk_buff *skb) QDF_STATUS hdd_rx_packet_cbk(void *context, qdf_nbuf_t rxBuf) { hdd_adapter_t *pAdapter = NULL; - hdd_context_t *pHddCtx = NULL; + struct hdd_context *pHddCtx = NULL; int rxstat; struct sk_buff *skb = NULL; struct sk_buff *next = NULL; @@ -1578,7 +1578,7 @@ void wlan_hdd_netif_queue_control(hdd_adapter_t *adapter, int hdd_set_mon_rx_cb(struct net_device *dev) { hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); + struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); int ret; QDF_STATUS qdf_status; struct ol_txrx_desc_type sta_desc = {0}; @@ -1631,7 +1631,7 @@ void hdd_send_rps_ind(hdd_adapter_t *adapter) { int i; uint8_t cpu_map_list_len = 0; - hdd_context_t *hdd_ctxt = NULL; + struct hdd_context *hdd_ctxt = NULL; struct wlan_rps_data rps_data; if (!adapter) { @@ -1689,7 +1689,7 @@ err: * * Return: None */ -void hdd_reset_tcp_delack(hdd_context_t *hdd_ctx) +void hdd_reset_tcp_delack(struct hdd_context *hdd_ctx) { enum pld_bus_width_type next_level = PLD_BUS_WIDTH_LOW;