From 45575664fb22c50a686719f1f1e07b13cd04ef1c Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Fri, 25 Feb 2011 16:39:14 +0100 Subject: [PATCH] staging: brcm80211: remove nested include statements In order to analyze include file usage nested includes have been removed from the driver sources. Reviewed-by: Roland Vossen Reviewed-by: Brett Rudley Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 38 +++++++------- drivers/staging/brcm80211/brcmsmac/wl_mac80211.h | 2 - drivers/staging/brcm80211/brcmsmac/wlc_alloc.c | 30 +++++++---- drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c | 32 +++++++----- drivers/staging/brcm80211/brcmsmac/wlc_antsel.c | 35 +++++++------ drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | 63 ++++++++++------------- drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h | 4 -- drivers/staging/brcm80211/brcmsmac/wlc_channel.c | 33 +++++++----- drivers/staging/brcm80211/brcmsmac/wlc_channel.h | 2 - drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c | 46 +++++++++-------- drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h | 6 --- drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c | 42 ++++++++------- drivers/staging/brcm80211/brcmsmac/wlc_pub.h | 4 -- drivers/staging/brcm80211/brcmsmac/wlc_rate.c | 22 ++++---- drivers/staging/brcm80211/brcmsmac/wlc_scb.h | 2 - drivers/staging/brcm80211/brcmsmac/wlc_stf.c | 36 +++++++------ 16 files changed, 208 insertions(+), 189 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c index 6e421b94727..1b3f12ba5ed 100644 --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c @@ -18,35 +18,35 @@ #include #include -#include +#include #include -#include #include #include #include -#include -#define WLC_MAXBSSCFG 1 /* single BSS configs */ - -#include +#include #include -#include + +#include +#include +#include #include #include #include -#include -#include #include -#include -#include -#include -#include -#include - -#include -#include -#include -#include +#include "wlc_cfg.h" +#include "phy/phy_version.h" +#include "wlc_key.h" +#include "sbhndpio.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_channel.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wl_dbg.h" +#include "wl_export.h" +#include "wl_ucode.h" +#include "d11ucode_ext.h" +#include "wl_mac80211.h" static void wl_timer(unsigned long data); static void _wl_timer(wl_timer_t *t); diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h index b7407caa4db..f761fd14ee4 100644 --- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h +++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.h @@ -17,8 +17,6 @@ #ifndef _wl_mac80211_h_ #define _wl_mac80211_h_ -#include - /* BMAC Note: High-only driver is no longer working in softirq context as it needs to block and * sleep so perimeter lock has to be a semaphore instead of spinlock. This requires timers to be * submitted to workqueue instead of being on kernel timer diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c index a4555f74512..20a0f86a2cd 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c @@ -14,22 +14,30 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include -#include -#include -#include -#include -#include +#include + +#include #include +#include #include #include #include -#include -#include -#include #include -#include -#include -#include + +#include "sbhndpio.h" +#include "d11.h" +#include "wlc_types.h" +#include "wlc_cfg.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wlc_key.h" +#include "wlc_alloc.h" +#include "wl_dbg.h" +#include "wlc_rate.h" +#include "wlc_bsscfg.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_channel.h" +#include "wlc_mac80211.h" static struct wlc_bsscfg *wlc_bsscfg_malloc(struct osl_info *osh, uint unit); static void wlc_bsscfg_mfree(struct osl_info *osh, struct wlc_bsscfg *cfg); diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c index d6475af0f7e..68b65a0c896 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c @@ -14,9 +14,11 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include -#include -#include +#include + +#include #include +#include #include #include #include @@ -24,17 +26,21 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "wlc_types.h" +#include "wlc_cfg.h" +#include "wlc_rate.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wlc_key.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_antsel.h" +#include "wl_export.h" +#include "wl_dbg.h" +#include "wlc_bsscfg.h" +#include "wlc_channel.h" +#include "wlc_mac80211.h" +#include "wlc_ampdu.h" /* * Disable AMPDU statistics counters for now diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c b/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c index da19a082ee4..a5f2508367e 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c @@ -21,26 +21,31 @@ #include #include #include -#include + +#include #include +#include #include #include -#include - #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include + +#include "sbhndpio.h" +#include "d11.h" +#include "wlc_rate.h" +#include "wlc_key.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wl_dbg.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_bmac.h" +#include "wlc_channel.h" +#include "wlc_bsscfg.h" +#include "wlc_mac80211.h" +#include "wl_export.h" +#include "wlc_phy_shim.h" +#include "wlc_antsel.h" /* useful macros */ #define WLC_ANTSEL_11N_0(ant) ((((ant) & ANT_SELCFG_MASK) >> 4) & 0xf) diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c index 20ce4c3777e..dc41593d956 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c @@ -16,57 +16,50 @@ #include -#include #include #include #include #include -#include -#include + #include +#include +#include +#include +#include #include -#include #include +#include +#include +#include #include #include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -/* BMAC_NOTE: a WLC_HIGH compile include of wlc.h adds in more structures and type - * dependencies. Need to include these to files to allow a clean include of wlc.h - * with WLC_HIGH defined. - * At some point we may be able to skip the include of wlc.h and instead just - * define a stub wlc_info and band struct to allow rpc calls to get the rpc handle. - */ -#include -#include -#include -#include -#include + +#include "wlc_types.h" +#include "sbhndpio.h" +#include "d11.h" +#include "wlc_cfg.h" +#include "wlc_rate.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wlc_key.h" +#include "wlc_phy_shim.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_channel.h" +#include "wlc_bsscfg.h" +#include "wlc_mac80211.h" +#include "wl_export.h" #include "wl_ucode.h" #include "d11ucode_ext.h" -#include - -/* BMAC_NOTE: With WLC_HIGH defined, some fns in this file make calls to high level - * functions defined in the headers below. We should be eliminating those calls and - * will be able to delete these include lines. - */ -#include - -#include - -#include -#include +#include "wlc_antsel.h" +#include "pcie_core.h" +#include "wlc_alloc.h" +#include "wl_dbg.h" +#include "wlc_bmac.h" #define TIMER_INTERVAL_WATCHDOG_BMAC 1000 /* watchdog timer, in unit of ms */ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h b/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h index 301270f4002..0951574ea60 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h @@ -17,8 +17,6 @@ #ifndef _WLC_BSSCFG_H_ #define _WLC_BSSCFG_H_ -#include - /* Check if a particular BSS config is AP or STA */ #define BSSCFG_AP(cfg) (0) #define BSSCFG_STA(cfg) (1) @@ -28,8 +26,6 @@ /* forward declarations */ typedef struct wlc_bsscfg wlc_bsscfg_t; -#include - #define NTXRATE 64 /* # tx MPDUs rate is reported for */ #define MAXMACLIST 64 /* max # source MAC matches */ #define BCN_TEMPLATE_COUNT 2 diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_channel.c b/drivers/staging/brcm80211/brcmsmac/wlc_channel.c index d53a9587589..edfc392d75a 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_channel.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_channel.c @@ -15,24 +15,33 @@ */ #include -#include -#include -#include -#include +#include #include #include + +#include +#include +#include #include #include -#include #include #include -#include -#include -#include -#include -#include -#include -#include + +#include "wlc_types.h" +#include "sbhndpio.h" +#include "d11.h" +#include "wlc_cfg.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wlc_key.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_bmac.h" +#include "wlc_rate.h" +#include "wlc_channel.h" +#include "wlc_bsscfg.h" +#include "wlc_mac80211.h" +#include "wlc_stf.h" +#include "wl_dbg.h" #define VALID_CHANNEL20_DB(wlc, val) wlc_valid_channel20_db((wlc)->cmi, val) #define VALID_CHANNEL20_IN_BAND(wlc, bandunit, val) \ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_channel.h b/drivers/staging/brcm80211/brcmsmac/wlc_channel.h index 9b3bf11d445..b8dec5b39d8 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_channel.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_channel.h @@ -17,8 +17,6 @@ #ifndef _WLC_CHANNEL_H_ #define _WLC_CHANNEL_H_ -#include - #define WLC_TXPWR_DB_FACTOR 4 /* conversion for phy txpwr cacluations that use .25 dB units */ struct wlc_info; diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c index 77cd2c9f1dd..1d8434586d2 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c @@ -16,10 +16,11 @@ #include #include #include -#include +#include + +#include #include #include -#include #include #include #include @@ -27,29 +28,32 @@ #include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "sbhndpio.h" +#include "d11.h" +#include "wlc_types.h" +#include "wlc_cfg.h" +#include "wlc_rate.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wlc_key.h" +#include "wlc_bsscfg.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_channel.h" +#include "wlc_mac80211.h" +#include "wlc_bmac.h" +#include "wlc_phy_hal.h" +#include "wlc_phy_shim.h" +#include "wlc_antsel.h" +#include "wlc_stf.h" +#include "wlc_ampdu.h" +#include "wl_export.h" #include "d11ucode_ext.h" -#include -#include -#include +#include "wlc_alloc.h" +#include "wl_dbg.h" /* * Disable statistics counting for WME diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h index 72bfb8fa4d0..3914e2b18fa 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h @@ -17,12 +17,6 @@ #ifndef _wlc_h_ #define _wlc_h_ -#include -#include -#include -#include -#include - #define MA_WINDOW_SZ 8 /* moving average window size */ #define WL_HWRXOFF 38 /* chip rx buffer offset */ #define INVCHANNEL 255 /* invalid channel */ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c b/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c index 4eaec04c527..ff595ab1173 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c @@ -22,38 +22,42 @@ */ #include -#include -#include #include #include -#include -#include #include +#include +#include +#include +#include #include #include #include #include #include #include -#include #include #include #include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include + +#include "wlc_types.h" +#include "wl_dbg.h" +#include "sbhndpio.h" +#include "wlc_cfg.h" +#include "d11.h" +#include "wlc_rate.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_channel.h" +#include "bcmsrom.h" +#include "wlc_key.h" +#include "wlc_bmac.h" +#include "wlc_phy_hal.h" +#include "wl_export.h" +#include "wlc_bsscfg.h" +#include "wlc_mac80211.h" +#include "wlc_phy_shim.h" /* PHY SHIM module specific state */ struct wlc_phy_shim_info { diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h index d4d3cd21f80..af5d82ca3d2 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h @@ -17,10 +17,6 @@ #ifndef _wlc_pub_h_ #define _wlc_pub_h_ -#include -#include -#include - #define WLC_NUMRATES 16 /* max # of rates in a rateset */ #define MAXMULTILIST 32 /* max # multicast addresses */ #define D11_PHY_HDR_LEN 6 /* Phy header length - 6 bytes */ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_rate.c b/drivers/staging/brcm80211/brcmsmac/wlc_rate.c index d48dd47ef84..a8e30016a65 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_rate.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_rate.c @@ -14,21 +14,25 @@ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include +#include + +#include +#include #include -#include #include -#include #include #include #include - -#include #include -#include -#include -#include -#include -#include + +#include "wlc_types.h" +#include "sbhndpio.h" +#include "d11.h" +#include "wl_dbg.h" +#include "wlc_cfg.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wlc_rate.h" /* Rate info per rate: It tells whether a rate is ofdm or not and its phy_rate value */ const u8 rate_info[WLC_MAXRATE + 1] = { diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_scb.h b/drivers/staging/brcm80211/brcmsmac/wlc_scb.h index 142b7567444..73260068898 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_scb.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_scb.h @@ -17,8 +17,6 @@ #ifndef _wlc_scb_h_ #define _wlc_scb_h_ -#include - extern bool wlc_aggregatable(struct wlc_info *wlc, u8 tid); #define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */ diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_stf.c b/drivers/staging/brcm80211/brcmsmac/wlc_stf.c index 46556ead78c..6574fb4d693 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_stf.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_stf.c @@ -16,28 +16,34 @@ #include #include -#include + +#include +#include + #include #include #include #include -#include #include #include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include + +#include "wlc_types.h" +#include "sbhndpio.h" +#include "d11.h" +#include "wl_dbg.h" +#include "wlc_cfg.h" +#include "wlc_rate.h" +#include "wlc_scb.h" +#include "wlc_pub.h" +#include "wlc_key.h" +#include "phy/wlc_phy_hal.h" +#include "wlc_channel.h" +#include "wlc_bsscfg.h" +#include "wlc_mac80211.h" +#include "wl_export.h" +#include "wlc_bmac.h" +#include "wlc_stf.h" #define MIN_SPATIAL_EXPANSION 0 #define MAX_SPATIAL_EXPANSION 1 -- 2.11.4.GIT