From 28c3e6282dd05ce005609d251fcb9411a26c8b3e Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 28 Aug 2017 11:54:45 -0700 Subject: [PATCH] qcacld-3.0: Replace hdd_context_t in wlan_hdd_lro.[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: I50d6e07d5d765f9cc769e880621740db3df5ab09 CRs-Fixed: 2100187 --- core/hdd/inc/wlan_hdd_lro.h | 14 ++++++++------ core/hdd/src/wlan_hdd_lro.c | 8 ++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_lro.h b/core/hdd/inc/wlan_hdd_lro.h index 9ab08e9119a5..e5b512f333ef 100644 --- a/core/hdd/inc/wlan_hdd_lro.h +++ b/core/hdd/inc/wlan_hdd_lro.h @@ -32,6 +32,8 @@ * WLAN LRO interface module headers */ +struct hdd_context; + /** * enum hdd_lro_rx_status - LRO receive frame status * @HDD_LRO_RX: frame sent over the LRO interface @@ -43,24 +45,24 @@ enum hdd_lro_rx_status { }; #if defined(FEATURE_LRO) -int hdd_lro_init(hdd_context_t *hdd_ctx); +int hdd_lro_init(struct hdd_context *hdd_ctx); -enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx, +enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx, hdd_adapter_t *adapter, struct sk_buff *skb); -void hdd_lro_display_stats(hdd_context_t *hdd_ctx); +void hdd_lro_display_stats(struct hdd_context *hdd_ctx); #else -static inline int hdd_lro_init(hdd_context_t *hdd_ctx) +static inline int hdd_lro_init(struct hdd_context *hdd_ctx) { return 0; } -static inline enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx, +static inline enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx, hdd_adapter_t *adapter, struct sk_buff *skb) { return HDD_LRO_NO_RX; } -static inline void hdd_lro_display_stats(hdd_context_t *hdd_ctx) +static inline void hdd_lro_display_stats(struct hdd_context *hdd_ctx) { } #endif /* FEATURE_LRO */ diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c index c144e7267511..9050f9538138 100644 --- a/core/hdd/src/wlan_hdd_lro.c +++ b/core/hdd/src/wlan_hdd_lro.c @@ -58,7 +58,7 @@ * * Return: 0 - success, < 0 - failure */ -int hdd_lro_init(hdd_context_t *hdd_ctx) +int hdd_lro_init(struct hdd_context *hdd_ctx) { return 0; } @@ -79,7 +79,7 @@ static qdf_lro_ctx_t wlan_hdd_get_lro_ctx(struct sk_buff *skb) * * Return: 0 - success, < 0 - failure */ -int hdd_lro_init(hdd_context_t *hdd_ctx) +int hdd_lro_init(struct hdd_context *hdd_ctx) { struct cdp_lro_hash_config lro_config; @@ -135,7 +135,7 @@ static qdf_lro_ctx_t wlan_hdd_get_lro_ctx(struct sk_buff *skb) * Return: HDD_LRO_RX - frame delivered to LRO manager * HDD_LRO_NO_RX - frame not delivered */ -enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx, +enum hdd_lro_rx_status hdd_lro_rx(struct hdd_context *hdd_ctx, hdd_adapter_t *adapter, struct sk_buff *skb) { qdf_lro_ctx_t ctx; @@ -196,7 +196,7 @@ enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx, * * Return: none */ -void hdd_lro_display_stats(hdd_context_t *hdd_ctx) +void hdd_lro_display_stats(struct hdd_context *hdd_ctx) { hdd_debug("LRO stats is broken, will fix it"); }