staging: brcm80211: replaced typedef wlc_pub_t by struct wlc_pub
authorRoland Vossen <rvossen@broadcom.com>
Tue, 7 Dec 2010 16:45:46 +0000 (17:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 8 Dec 2010 22:27:48 +0000 (14:27 -0800)
Code cleanup

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/sys/wl_mac80211.h
drivers/staging/brcm80211/sys/wlc_alloc.c
drivers/staging/brcm80211/sys/wlc_antsel.c
drivers/staging/brcm80211/sys/wlc_antsel.h
drivers/staging/brcm80211/sys/wlc_channel.c
drivers/staging/brcm80211/sys/wlc_event.c
drivers/staging/brcm80211/sys/wlc_event.h
drivers/staging/brcm80211/sys/wlc_mac80211.c
drivers/staging/brcm80211/sys/wlc_mac80211.h
drivers/staging/brcm80211/sys/wlc_pub.h

index 87a8128d1b3c522ba79f2fa00d6c32b44ab9aa9a..bb39b77059473558dbc02f6efd6edce0fa7a3c78 100644 (file)
@@ -60,7 +60,7 @@ struct wl_firmware {
 };
 
 struct wl_info {
-       wlc_pub_t *pub;         /* pointer to public wlc state */
+       struct wlc_pub *pub;            /* pointer to public wlc state */
        void *wlc;              /* pointer to private common os-independent data */
        struct osl_info *osh;           /* pointer to os handler */
        u32 magic;
index 7d04d532a02407237a17d186df3b080b45a36bc1..9af2d17a40c0a22c88096a44f8f868cf60c4a547 100644 (file)
@@ -32,9 +32,9 @@
 #include <wlc_alloc.h>
 #include <wl_dbg.h>
 
-static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err,
-                                uint devid);
-static void wlc_pub_mfree(struct osl_info *osh, wlc_pub_t *pub);
+static struct wlc_pub *wlc_pub_malloc(struct osl_info *osh, uint unit,
+                                     uint *err, uint devid);
+static void wlc_pub_mfree(struct osl_info *osh, struct wlc_pub *pub);
 static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid);
 
 void *wlc_calloc(struct osl_info *osh, uint unit, uint size)
@@ -65,12 +65,12 @@ void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
        tunables->txsbnd = TXSBND;
 }
 
-static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err,
-                                uint devid)
+static struct wlc_pub *wlc_pub_malloc(struct osl_info *osh, uint unit,
+                                     uint *err, uint devid)
 {
-       wlc_pub_t *pub;
+       struct wlc_pub *pub;
 
-       pub = (wlc_pub_t *) wlc_calloc(osh, unit, sizeof(wlc_pub_t));
+       pub = (struct wlc_pub *) wlc_calloc(osh, unit, sizeof(struct wlc_pub));
        if (pub == NULL) {
                *err = 1001;
                goto fail;
@@ -100,7 +100,7 @@ static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err,
        return NULL;
 }
 
-static void wlc_pub_mfree(struct osl_info *osh, wlc_pub_t *pub)
+static void wlc_pub_mfree(struct osl_info *osh, struct wlc_pub *pub)
 {
        if (pub == NULL)
                return;
@@ -179,7 +179,7 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
 
        wlc->hwrxoff = WL_HWRXOFF;
 
-       /* allocate wlc_pub_t state structure */
+       /* allocate struct wlc_pub state structure */
        wlc->pub = wlc_pub_malloc(osh, unit, err, devid);
        if (wlc->pub == NULL) {
                *err = 1003;
index aaf9985a1995e09d3033c7c68f5fd57eb1465df2..27558fa02ba7b9d6bc98038bb36236cfc881cfaf 100644 (file)
@@ -96,8 +96,8 @@ const u8 mimo_2x3_div_antselid_tbl[16] = {
 
 struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
                                      struct osl_info *osh,
-                                                 wlc_pub_t *pub,
-                                                 struct wlc_hw_info *wlc_hw) {
+                                     struct wlc_pub *pub,
+                                     struct wlc_hw_info *wlc_hw) {
        struct antsel_info *asi;
 
        asi = kzalloc(sizeof(struct antsel_info), GFP_ATOMIC);
index ba38a2aedbd91be608a1d9800c876cdc1fac00b9..8875b584866533511173c7beb01517f5089c46f5 100644 (file)
@@ -18,7 +18,7 @@
 #define _wlc_antsel_h_
 extern struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
                                        struct osl_info *osh,
-                                       wlc_pub_t *pub,
+                                       struct wlc_pub *pub,
                                        struct wlc_hw_info *wlc_hw);
 extern void wlc_antsel_detach(struct antsel_info *asi);
 extern void wlc_antsel_init(struct antsel_info *asi);
index 741e13af7b67fe2bf4b82a1c77e02943a740abd2..33041e36585c85741dfb29914717231d7a9744bd 100644 (file)
@@ -44,7 +44,7 @@ typedef struct wlc_cm_band {
 } wlc_cm_band_t;
 
 struct wlc_cm_info {
-       wlc_pub_t *pub;
+       struct wlc_pub *pub;
        struct wlc_info *wlc;
        char srom_ccode[WLC_CNTRY_BUF_SZ];      /* Country Code in SROM */
        uint srom_regrev;       /* Regulatory Rev for the SROM ccode */
@@ -611,7 +611,7 @@ wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc)
        wlc_cm_info_t *wlc_cm;
        char country_abbrev[WLC_CNTRY_BUF_SZ];
        const country_info_t *country;
-       wlc_pub_t *pub = wlc->pub;
+       struct wlc_pub *pub = wlc->pub;
        char *ccode;
 
        WL_TRACE(("wl%d: wlc_channel_mgr_attach\n", wlc->pub->unit));
index e4ab077bf87f5c0d603bc8da0201fc3f56202264..9b503d839aae2be5a32b7139e4c7fb4f89dcb7cf 100644 (file)
@@ -47,7 +47,7 @@ struct wlc_eventq {
        wlc_event_t *tail;
        struct wlc_info *wlc;
        void *wl;
-       wlc_pub_t *pub;
+       struct wlc_pub *pub;
        bool tpending;
        bool workpending;
        struct wl_timer *timer;
@@ -58,7 +58,8 @@ struct wlc_eventq {
 /*
  * Export functions
  */
-wlc_eventq_t *wlc_eventq_attach(wlc_pub_t *pub, struct wlc_info *wlc, void *wl,
+wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub, struct wlc_info *wlc,
+                               void *wl,
                                wlc_eventq_cb_t cb)
 {
        wlc_eventq_t *eq;
index 7c8e49550f2d3e46ddf2a75bbb5da4e9c261fd09..e75582dcdd93f037958d04f901e462c899980f76 100644 (file)
@@ -21,7 +21,8 @@ typedef struct wlc_eventq wlc_eventq_t;
 
 typedef void (*wlc_eventq_cb_t) (void *arg);
 
-extern wlc_eventq_t *wlc_eventq_attach(wlc_pub_t *pub, struct wlc_info *wlc,
+extern wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub,
+                                      struct wlc_info *wlc,
                                       void *wl, wlc_eventq_cb_t cb);
 extern int wlc_eventq_detach(wlc_eventq_t *eq);
 extern int wlc_eventq_down(wlc_eventq_t *eq);
index b25b5bd6a110542bea67532afd9df6c5df9a504e..eb4013dab36c30e5126e67fcbc86ddc73eece4ba 100644 (file)
@@ -1697,7 +1697,7 @@ static uint wlc_attach_module(struct wlc_info *wlc)
        return err;
 }
 
-wlc_pub_t *wlc_pub(void *wlc)
+struct wlc_pub *wlc_pub(void *wlc)
 {
        return ((struct wlc_info *) wlc)->pub;
 }
@@ -1714,7 +1714,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
        struct wlc_info *wlc;
        uint err = 0;
        uint j;
-       wlc_pub_t *pub;
+       struct wlc_pub *pub;
        wlc_txq_info_t *qi;
        uint n_disabled;
 
@@ -4309,7 +4309,7 @@ int wlc_iovar_gets8(struct wlc_info *wlc, const char *name, s8 *arg)
  * calling function must keep 'iovars' until wlc_module_unregister is called.
  * 'iovar' must have the last entry's name field being NULL as terminator.
  */
-int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
+int wlc_module_register(struct wlc_pub *pub, const bcm_iovar_t *iovars,
                        const char *name, void *hdl, iovar_fn_t i_fn,
                        watchdog_fn_t w_fn, down_fn_t d_fn)
 {
@@ -4339,7 +4339,7 @@ int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
 }
 
 /* unregister module callbacks */
-int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl)
+int wlc_module_unregister(struct wlc_pub *pub, const char *name, void *hdl)
 {
        struct wlc_info *wlc = (struct wlc_info *) pub->wlc;
        int i;
@@ -4455,7 +4455,7 @@ wlc_iovar_op(struct wlc_info *wlc, const char *name,
 }
 
 int
-wlc_iovar_check(wlc_pub_t *pub, const bcm_iovar_t *vi, void *arg, int len,
+wlc_iovar_check(struct wlc_pub *pub, const bcm_iovar_t *vi, void *arg, int len,
                bool set)
 {
        struct wlc_info *wlc = (struct wlc_info *) pub->wlc;
index ba2b953800e316046d7b0ee2f4b923f3f4b0d395..d3def7448bf75e8dd4359996a4c7965ed8206a83 100644 (file)
@@ -510,7 +510,7 @@ typedef struct wlc_txq_info {
  * Principal common (os-independent) software data structure.
  */
 struct wlc_info {
-       wlc_pub_t *pub;         /* pointer to wlc public state */
+       struct wlc_pub *pub;            /* pointer to wlc public state */
        struct osl_info *osh;           /* pointer to os handle */
        struct wl_info *wl;     /* pointer to os-specific private state */
        d11regs_t *regs;        /* pointer to device registers */
@@ -787,7 +787,7 @@ struct wlc_info {
 /* antsel module specific state */
 struct antsel_info {
        struct wlc_info *wlc;   /* pointer to main wlc structure */
-       wlc_pub_t *pub;         /* pointer to public fn */
+       struct wlc_pub *pub;            /* pointer to public fn */
        u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic
                                 * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
                                 */
index 80331e8a81ea91a7192dadb99a070f0d1225e523..146a6904a39bb87fe2f52123974afe76549aecb0 100644 (file)
@@ -251,7 +251,7 @@ typedef int (*iovar_fn_t) (void *handle, const bcm_iovar_t *vi,
  * Public portion of "common" os-independent state structure.
  * The wlc handle points at this.
  */
-typedef struct wlc_pub {
+struct wlc_pub {
        void *wlc;
 
        struct ieee80211_hw *ieee_hw;
@@ -330,7 +330,7 @@ typedef struct wlc_pub {
        bool _lmacproto;        /* lmac protocol module included and enabled */
        bool phy_11ncapable;    /* the PHY/HW is capable of 802.11N */
        bool _ampdumac;         /* mac assist ampdu enabled or not */
-} wlc_pub_t;
+};
 
 /* wl_monitor rx status per packet */
 typedef struct wl_rxsts {
@@ -528,7 +528,7 @@ extern void wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
 extern void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg,
                              bool suspend);
 
-extern wlc_pub_t *wlc_pub(void *wlc);
+extern struct wlc_pub *wlc_pub(void *wlc);
 
 /* common functions for every port */
 extern int wlc_bmac_up_prep(struct wlc_hw_info *wlc_hw);
@@ -554,13 +554,15 @@ extern void wlc_scb_ratesel_init_all(struct wlc_info *wlc);
 /* ioctl */
 extern int wlc_iovar_gets8(struct wlc_info *wlc, const char *name,
                             s8 *arg);
-extern int wlc_iovar_check(wlc_pub_t *pub, const bcm_iovar_t *vi, void *arg,
+extern int wlc_iovar_check(struct wlc_pub *pub, const bcm_iovar_t *vi,
+                          void *arg,
                           int len, bool set);
 
-extern int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
+extern int wlc_module_register(struct wlc_pub *pub, const bcm_iovar_t *iovars,
                               const char *name, void *hdl, iovar_fn_t iovar_fn,
                               watchdog_fn_t watchdog_fn, down_fn_t down_fn);
-extern int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl);
+extern int wlc_module_unregister(struct wlc_pub *pub, const char *name,
+                                void *hdl);
 extern void wlc_event_if(struct wlc_info *wlc, struct wlc_bsscfg *cfg,
                         wlc_event_t *e, const struct ether_addr *addr);
 extern void wlc_suspend_mac_and_wait(struct wlc_info *wlc);