Greg Please ignore this patch, it needs to be broken down into two separate patches. Sorry, will resubmit. Brett > -----Original Message----- > From: Brett Rudley [mailto:brudley@xxxxxxxxxxxx] > Sent: Thursday, September 30, 2010 9:00 PM > To: greg@xxxxxxxxx > Cc: Brett Rudley; devel@xxxxxxxxxxxxxxxxxxxxxx; Henry Ptasinski; Nohee Ko > Subject: [PATCH] staging: brcm80211: move #includes from .h to .c's > > Move #include's out of linux_osl.h and into individual C files. > For softmac only right now, fullmac still to be done. > > Signed-off-by: Brett Rudley <brudley@xxxxxxxxxxxx> > --- > drivers/staging/brcm80211/include/linux_osl.h | 8 ++++++++ > drivers/staging/brcm80211/phy/wlc_phy_cmn.c | 3 +++ > drivers/staging/brcm80211/phy/wlc_phy_lcn.c | 3 +++ > drivers/staging/brcm80211/phy/wlc_phy_n.c | 4 ++++ > drivers/staging/brcm80211/sys/wl_mac80211.c | 20 ----------------- > --- > drivers/staging/brcm80211/sys/wlc_alloc.c | 10 +++------- > drivers/staging/brcm80211/sys/wlc_ampdu.c | 4 +--- > drivers/staging/brcm80211/sys/wlc_antsel.c | 8 ++------ > drivers/staging/brcm80211/sys/wlc_bmac.c | 1 + > drivers/staging/brcm80211/sys/wlc_channel.c | 3 +++ > drivers/staging/brcm80211/sys/wlc_event.c | 4 ++-- > drivers/staging/brcm80211/sys/wlc_mac80211.c | 6 ++---- > drivers/staging/brcm80211/sys/wlc_phy_shim.c | 2 ++ > drivers/staging/brcm80211/sys/wlc_rate.c | 2 ++ > drivers/staging/brcm80211/sys/wlc_stf.c | 2 ++ > drivers/staging/brcm80211/util/aiutils.c | 3 +++ > drivers/staging/brcm80211/util/bcmotp.c | 3 +++ > drivers/staging/brcm80211/util/bcmsrom.c | 2 ++ > drivers/staging/brcm80211/util/bcmutils.c | 2 ++ > drivers/staging/brcm80211/util/bcmwpa.c | 4 ++++ > drivers/staging/brcm80211/util/hnddma.c | 3 +++ > drivers/staging/brcm80211/util/hndpmu.c | 2 ++ > drivers/staging/brcm80211/util/nicpci.c | 2 ++ > drivers/staging/brcm80211/util/nvram/nvram_ro.c | 1 + > drivers/staging/brcm80211/util/siutils.c | 3 +++ > 25 files changed, 63 insertions(+), 42 deletions(-) > > diff --git a/drivers/staging/brcm80211/include/linux_osl.h > b/drivers/staging/brcm80211/include/linux_osl.h > index 1e55553..7486ded 100644 > --- a/drivers/staging/brcm80211/include/linux_osl.h > +++ b/drivers/staging/brcm80211/include/linux_osl.h > @@ -17,7 +17,9 @@ > #ifndef _linux_osl_h_ > #define _linux_osl_h_ > > +#ifdef BRCM_FULLMAC > #include <typedefs.h> > +#endif > > /* Linux Kernel: File Operations: start */ > extern void *osl_os_open_image(char *filename); > @@ -150,7 +152,9 @@ extern void osl_dma_unmap(osl_t *osh, uint pa, uint > size, int direction); > > /* register access macros */ > #if defined(BCMSDIO) > +#ifdef BRCM_FULLMAC > #include <bcmsdh.h> > +#endif > #define OSL_WRITE_REG(osh, r, v) (bcmsdh_reg_write(NULL, (uintptr)(r), > sizeof(*(r)), (v))) > #define OSL_READ_REG(osh, r) (bcmsdh_reg_read(NULL, (uintptr)(r), > sizeof(*(r)))) > #endif > @@ -173,8 +177,10 @@ extern int osl_error(int bcmerror); > > #define OSL_SYSUPTIME() ((uint32)jiffies * (1000 / HZ)) > #define printf(fmt, args...) printk(fmt , ## args) > +#ifdef BRCM_FULLMAC > #include <linux/kernel.h> /* for vsn/printf's */ > #include <linux/string.h> /* for mem*, str* */ > +#endif > /* bcopy's: Linux kernel doesn't provide these (anymore) */ > #define bcopy(src, dst, len) memcpy((dst), (src), (len)) > #define bcmp(b1, b2, len) memcmp((b1), (b2), (len)) > @@ -320,7 +326,9 @@ extern int osl_error(int bcmerror); > #define W_SM(r, v) (*(r) = (v)) > #define BZERO_SM(r, len) memset((r), '\0', (len)) > > +#ifdef BRCM_FULLMAC > #include <linuxver.h> /* use current 2.4.x calling > conventions */ > +#endif > > /* packet primitives */ > #define PKTGET(osh, len, send) osl_pktget((osh), (len)) > diff --git a/drivers/staging/brcm80211/phy/wlc_phy_cmn.c > b/drivers/staging/brcm80211/phy/wlc_phy_cmn.c > index 18b9849..cafd76d 100644 > --- a/drivers/staging/brcm80211/phy/wlc_phy_cmn.c > +++ b/drivers/staging/brcm80211/phy/wlc_phy_cmn.c > @@ -16,8 +16,11 @@ > > #include <wlc_cfg.h> > > +#include <typedefs.h> > #include <osl.h> > #include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmendian.h> > #include <bcmnvram.h> > #include <sbchipc.h> > diff --git a/drivers/staging/brcm80211/phy/wlc_phy_lcn.c > b/drivers/staging/brcm80211/phy/wlc_phy_lcn.c > index c34d06b..a82e58d 100644 > --- a/drivers/staging/brcm80211/phy/wlc_phy_lcn.c > +++ b/drivers/staging/brcm80211/phy/wlc_phy_lcn.c > @@ -17,6 +17,9 @@ > #include <wlc_cfg.h> > #include <qmath.h> > #include <osl.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <siutils.h> > #include <bitfuncs.h> > #include <hndpmu.h> > diff --git a/drivers/staging/brcm80211/phy/wlc_phy_n.c > b/drivers/staging/brcm80211/phy/wlc_phy_n.c > index 6a0c1cd..5094e8f 100644 > --- a/drivers/staging/brcm80211/phy/wlc_phy_n.c > +++ b/drivers/staging/brcm80211/phy/wlc_phy_n.c > @@ -15,6 +15,10 @@ > */ > > #include <wlc_cfg.h> > +#include <typedefs.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <osl.h> > #include <siutils.h> > #include <sbchipc.h> > diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c > b/drivers/staging/brcm80211/sys/wl_mac80211.c > index 941b4a3..76cd2eb 100644 > --- a/drivers/staging/brcm80211/sys/wl_mac80211.c > +++ b/drivers/staging/brcm80211/sys/wl_mac80211.c > @@ -19,42 +19,22 @@ > #include <typedefs.h> > #include <linuxver.h> > #include <osl.h> > -#include <linux/module.h> > -#include <linux/types.h> > -#include <linux/errno.h> > -#include <linux/pci.h> > -#include <linux/init.h> > #include <linux/kernel.h> > -#include <linux/netdevice.h> > #include <linux/etherdevice.h> > -#include <linux/skbuff.h> > -#include <linux/delay.h> > #include <linux/string.h> > -#include <linux/ethtool.h> > -#include <linux/completion.h> > #include <linux/pci_ids.h> > #define WLC_MAXBSSCFG 1 /* single BSS configs */ > > -#include <asm/system.h> > -#include <asm/io.h> > -#include <asm/irq.h> > -#include <asm/pgtable.h> > -#include <asm/uaccess.h> > -#include <asm/unaligned.h> > #include <wlc_cfg.h> > #include <net/mac80211.h> > #include <epivers.h> > #ifndef WLC_HIGH_ONLY > #include <phy_version.h> > #endif > -#include <bcmendian.h> > #include <bcmutils.h> > #include <pcicfg.h> > #include <wlioctl.h> > #include <wlc_key.h> > -#include <proto/802.1d.h> /* NUMPRIO & BE */ > -#include <linux/proc_fs.h> > -#include <linux/vmalloc.h> > #include <wlc_channel.h> > #include <wlc_pub.h> > #include <wlc_scb.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_alloc.c > b/drivers/staging/brcm80211/sys/wlc_alloc.c > index 6f58c4d..e26c053 100644 > --- a/drivers/staging/brcm80211/sys/wlc_alloc.c > +++ b/drivers/staging/brcm80211/sys/wlc_alloc.c > @@ -16,19 +16,15 @@ > > #include <wlc_cfg.h> > #include <typedefs.h> > -#include <bcmdefs.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <osl.h> > #include <bcmutils.h> > #include <siutils.h> > -#include <proto/802.11.h> > -#include <proto/wpa.h> > #include <wlioctl.h> > -#include <bcmwpa.h> > -#include <d11.h> > -#include <wlc_rate.h> > #include <wlc_pub.h> > #include <wlc_key.h> > -#include <wlc_bsscfg.h> > #include <wlc_mac80211.h> > #include <wlc_alloc.h> > > diff --git a/drivers/staging/brcm80211/sys/wlc_ampdu.c > b/drivers/staging/brcm80211/sys/wlc_ampdu.c > index d2eab6a..24cbd5c 100644 > --- a/drivers/staging/brcm80211/sys/wlc_ampdu.c > +++ b/drivers/staging/brcm80211/sys/wlc_ampdu.c > @@ -16,21 +16,19 @@ > > #include <wlc_cfg.h> > #include <typedefs.h> > +#include <linuxver.h> > #include <bcmdefs.h> > #include <osl.h> > #include <bcmutils.h> > #include <siutils.h> > #include <bcmendian.h> > -#include <proto/802.11.h> > #include <wlioctl.h> > -#include <sbhndpio.h> > #include <sbhnddma.h> > #include <hnddma.h> > #include <d11.h> > #include <wlc_rate.h> > #include <wlc_pub.h> > #include <wlc_key.h> > -#include <wlc_bsscfg.h> > #include <wlc_mac80211.h> > #include <wlc_phy_hal.h> > #include <wlc_antsel.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.c > b/drivers/staging/brcm80211/sys/wlc_antsel.c > index a34ea66..106ee32 100644 > --- a/drivers/staging/brcm80211/sys/wlc_antsel.c > +++ b/drivers/staging/brcm80211/sys/wlc_antsel.c > @@ -19,22 +19,18 @@ > #ifdef WLANTSEL > > #include <typedefs.h> > -#include <qmath.h> > +#include <linux/kernel.h> > +#include <linuxver.h> > #include <bcmdefs.h> > #include <osl.h> > #include <bcmutils.h> > #include <siutils.h> > -#include <bcmendian.h> > #include <wlioctl.h> > -#include <wlc_phy_radio.h> > -#include <bitfuncs.h> > > -#include <proto/802.11.h> > #include <d11.h> > #include <wlc_rate.h> > #include <wlc_key.h> > #include <wlc_pub.h> > -#include <wlc_bsscfg.h> > #include <wl_dbg.h> > #include <wlc_mac80211.h> > #include <wlc_bmac.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.c > b/drivers/staging/brcm80211/sys/wlc_bmac.c > index eea1ffb..e17d01b 100644 > --- a/drivers/staging/brcm80211/sys/wlc_bmac.c > +++ b/drivers/staging/brcm80211/sys/wlc_bmac.c > @@ -20,6 +20,7 @@ > > #include <wlc_cfg.h> > #include <typedefs.h> > +#include <linuxver.h> > #include <bcmdefs.h> > #include <osl.h> > #include <linux/kernel.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_channel.c > b/drivers/staging/brcm80211/sys/wlc_channel.c > index 554a0cb..a7ad94d 100644 > --- a/drivers/staging/brcm80211/sys/wlc_channel.c > +++ b/drivers/staging/brcm80211/sys/wlc_channel.c > @@ -18,6 +18,9 @@ > #include <typedefs.h> > #include <bcmdefs.h> > #include <osl.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmutils.h> > #include <siutils.h> > #include <wlioctl.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_event.c > b/drivers/staging/brcm80211/sys/wlc_event.c > index 9052d69..f0bc0c8 100644 > --- a/drivers/staging/brcm80211/sys/wlc_event.c > +++ b/drivers/staging/brcm80211/sys/wlc_event.c > @@ -15,11 +15,11 @@ > */ > > #include <typedefs.h> > +#include <linux/kernel.h> > +#include <linuxver.h> > #include <bcmutils.h> > #include <siutils.h> > -#include <bcmendian.h> > #include <wlioctl.h> > -#include <wl_dbg.h> > #include <wlc_cfg.h> > #include <wlc_pub.h> > #include <wlc_key.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c > b/drivers/staging/brcm80211/sys/wlc_mac80211.c > index f6cb555..1adaef4 100644 > --- a/drivers/staging/brcm80211/sys/wlc_mac80211.c > +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c > @@ -16,6 +16,8 @@ > > #include <wlc_cfg.h> > #include <typedefs.h> > +#include <linux/kernel.h> > +#include <linuxver.h> > #include <bcmdefs.h> > #include <osl.h> > #include <linux/ctype.h> > @@ -23,17 +25,13 @@ > #include <bcmwifi.h> > #include <siutils.h> > #include <bcmendian.h> > -#include <proto/802.1d.h> > #include <proto/802.11.h> > #include <proto/wpa.h> > -#include <hndsoc.h> > -#include <sbchipc.h> > #include <pcicfg.h> > #include <bcmsrom.h> > #include <wlioctl.h> > #include <epivers.h> > #include <bcmwpa.h> > -#include <sbhndpio.h> > #include <sbhnddma.h> > #include <hnddma.h> > #include <hndpmu.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_phy_shim.c > b/drivers/staging/brcm80211/sys/wlc_phy_shim.c > index 5a41da1..9a81ed2 100644 > --- a/drivers/staging/brcm80211/sys/wlc_phy_shim.c > +++ b/drivers/staging/brcm80211/sys/wlc_phy_shim.c > @@ -23,6 +23,8 @@ > > #include <wlc_cfg.h> > #include <typedefs.h> > +#include <linuxver.h> > +#include <linux/kernel.h> > #include <bcmutils.h> > #include <bcmdefs.h> > #include <osl.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_rate.c > b/drivers/staging/brcm80211/sys/wlc_rate.c > index 9e9e468..ff67c35 100644 > --- a/drivers/staging/brcm80211/sys/wlc_rate.c > +++ b/drivers/staging/brcm80211/sys/wlc_rate.c > @@ -17,6 +17,8 @@ > #include <wlc_cfg.h> > #include <typedefs.h> > #include <osl.h> > +#include <linux/kernel.h> > +#include <linuxver.h> > #include <bcmutils.h> > #include <siutils.h> > #include <bcmendian.h> > diff --git a/drivers/staging/brcm80211/sys/wlc_stf.c > b/drivers/staging/brcm80211/sys/wlc_stf.c > index 5b3a884..69cb364 100644 > --- a/drivers/staging/brcm80211/sys/wlc_stf.c > +++ b/drivers/staging/brcm80211/sys/wlc_stf.c > @@ -16,6 +16,8 @@ > > #include <wlc_cfg.h> > #include <typedefs.h> > +#include <linux/kernel.h> > +#include <linuxver.h> > #include <bcmdefs.h> > #include <osl.h> > #include <bcmutils.h> > diff --git a/drivers/staging/brcm80211/util/aiutils.c > b/drivers/staging/brcm80211/util/aiutils.c > index 6ac49ec..b91f6e4 100644 > --- a/drivers/staging/brcm80211/util/aiutils.c > +++ b/drivers/staging/brcm80211/util/aiutils.c > @@ -17,6 +17,9 @@ > #include <typedefs.h> > #include <bcmdefs.h> > #include <osl.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmutils.h> > #include <siutils.h> > #include <hndsoc.h> > diff --git a/drivers/staging/brcm80211/util/bcmotp.c > b/drivers/staging/brcm80211/util/bcmotp.c > index a63214f..8449ea7 100644 > --- a/drivers/staging/brcm80211/util/bcmotp.c > +++ b/drivers/staging/brcm80211/util/bcmotp.c > @@ -17,6 +17,9 @@ > #include <typedefs.h> > #include <bcmdefs.h> > #include <osl.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmdevs.h> > #include <bcmutils.h> > #include <siutils.h> > diff --git a/drivers/staging/brcm80211/util/bcmsrom.c > b/drivers/staging/brcm80211/util/bcmsrom.c > index 2637a53..0cdf645 100644 > --- a/drivers/staging/brcm80211/util/bcmsrom.c > +++ b/drivers/staging/brcm80211/util/bcmsrom.c > @@ -18,6 +18,8 @@ > #include <bcmdefs.h> > #include <osl.h> > #include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <stdarg.h> > #include <bcmutils.h> > #include <hndsoc.h> > diff --git a/drivers/staging/brcm80211/util/bcmutils.c > b/drivers/staging/brcm80211/util/bcmutils.c > index cc548e0..b10c837 100644 > --- a/drivers/staging/brcm80211/util/bcmutils.c > +++ b/drivers/staging/brcm80211/util/bcmutils.c > @@ -20,6 +20,8 @@ > #include <osl.h> > #include <linux/ctype.h> > #include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmutils.h> > #include <siutils.h> > #include <bcmnvram.h> > diff --git a/drivers/staging/brcm80211/util/bcmwpa.c > b/drivers/staging/brcm80211/util/bcmwpa.c > index a78be43..71e2552 100644 > --- a/drivers/staging/brcm80211/util/bcmwpa.c > +++ b/drivers/staging/brcm80211/util/bcmwpa.c > @@ -14,6 +14,10 @@ > * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > */ > > +#include <typedefs.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmutils.h> > #include <bcmwpa.h> > > diff --git a/drivers/staging/brcm80211/util/hnddma.c > b/drivers/staging/brcm80211/util/hnddma.c > index b78cca1..b35dcf0 100644 > --- a/drivers/staging/brcm80211/util/hnddma.c > +++ b/drivers/staging/brcm80211/util/hnddma.c > @@ -15,6 +15,9 @@ > */ > > #include <typedefs.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmdefs.h> > #include <bcmdevs.h> > #include <osl.h> > diff --git a/drivers/staging/brcm80211/util/hndpmu.c > b/drivers/staging/brcm80211/util/hndpmu.c > index e33cf5d..728faa1 100644 > --- a/drivers/staging/brcm80211/util/hndpmu.c > +++ b/drivers/staging/brcm80211/util/hndpmu.c > @@ -17,6 +17,8 @@ > #include <typedefs.h> > #include <bcmdefs.h> > #include <osl.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <linux/kernel.h> > #include <bcmutils.h> > #include <siutils.h> > diff --git a/drivers/staging/brcm80211/util/nicpci.c > b/drivers/staging/brcm80211/util/nicpci.c > index 0b4f562..75bea18 100644 > --- a/drivers/staging/brcm80211/util/nicpci.c > +++ b/drivers/staging/brcm80211/util/nicpci.c > @@ -15,6 +15,8 @@ > */ > > #include <typedefs.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmdefs.h> > #include <osl.h> > #include <bcmutils.h> > diff --git a/drivers/staging/brcm80211/util/nvram/nvram_ro.c > b/drivers/staging/brcm80211/util/nvram/nvram_ro.c > index f6640ef..04f0c7e 100644 > --- a/drivers/staging/brcm80211/util/nvram/nvram_ro.c > +++ b/drivers/staging/brcm80211/util/nvram/nvram_ro.c > @@ -16,6 +16,7 @@ > > #include <typedefs.h> > #include <bcmdefs.h> > +#include <linux/string.h> > #include <osl.h> > #include <bcmutils.h> > #include <siutils.h> > diff --git a/drivers/staging/brcm80211/util/siutils.c > b/drivers/staging/brcm80211/util/siutils.c > index 2cfc88f..ce19ed1 100644 > --- a/drivers/staging/brcm80211/util/siutils.c > +++ b/drivers/staging/brcm80211/util/siutils.c > @@ -17,6 +17,9 @@ > #include <typedefs.h> > #include <bcmdefs.h> > #include <osl.h> > +#include <linux/kernel.h> > +#include <linux/string.h> > +#include <linuxver.h> > #include <bcmutils.h> > #include <siutils.h> > #include <bcmdevs.h> > -- > 1.6.3.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel