aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2010-12-07 11:45:46 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-08 17:27:48 -0500
commit08db27dc8d829e6df007cd079fdfa83584f66544 (patch)
tree266b6bfbbeb1c2a5ab4c65c0b9cda2d6628f6ee5
parentc41c858f695b6626e2fc0729edc0dd26b091f354 (diff)
staging: brcm80211: replaced typedef wlc_pub_t by struct wlc_pub
Code cleanup Signed-off-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/brcm80211/sys/wl_mac80211.h2
-rw-r--r--drivers/staging/brcm80211/sys/wlc_alloc.c18
-rw-r--r--drivers/staging/brcm80211/sys/wlc_antsel.c4
-rw-r--r--drivers/staging/brcm80211/sys/wlc_antsel.h2
-rw-r--r--drivers/staging/brcm80211/sys/wlc_channel.c4
-rw-r--r--drivers/staging/brcm80211/sys/wlc_event.c5
-rw-r--r--drivers/staging/brcm80211/sys/wlc_event.h3
-rw-r--r--drivers/staging/brcm80211/sys/wlc_mac80211.c10
-rw-r--r--drivers/staging/brcm80211/sys/wlc_mac80211.h4
-rw-r--r--drivers/staging/brcm80211/sys/wlc_pub.h14
10 files changed, 35 insertions, 31 deletions
diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.h b/drivers/staging/brcm80211/sys/wl_mac80211.h
index 87a8128d1b3c..bb39b7705947 100644
--- a/drivers/staging/brcm80211/sys/wl_mac80211.h
+++ b/drivers/staging/brcm80211/sys/wl_mac80211.h
@@ -60,7 +60,7 @@ struct wl_firmware {
60}; 60};
61 61
62struct wl_info { 62struct wl_info {
63 wlc_pub_t *pub; /* pointer to public wlc state */ 63 struct wlc_pub *pub; /* pointer to public wlc state */
64 void *wlc; /* pointer to private common os-independent data */ 64 void *wlc; /* pointer to private common os-independent data */
65 struct osl_info *osh; /* pointer to os handler */ 65 struct osl_info *osh; /* pointer to os handler */
66 u32 magic; 66 u32 magic;
diff --git a/drivers/staging/brcm80211/sys/wlc_alloc.c b/drivers/staging/brcm80211/sys/wlc_alloc.c
index 7d04d532a024..9af2d17a40c0 100644
--- a/drivers/staging/brcm80211/sys/wlc_alloc.c
+++ b/drivers/staging/brcm80211/sys/wlc_alloc.c
@@ -32,9 +32,9 @@
32#include <wlc_alloc.h> 32#include <wlc_alloc.h>
33#include <wl_dbg.h> 33#include <wl_dbg.h>
34 34
35static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err, 35static struct wlc_pub *wlc_pub_malloc(struct osl_info *osh, uint unit,
36 uint devid); 36 uint *err, uint devid);
37static void wlc_pub_mfree(struct osl_info *osh, wlc_pub_t *pub); 37static void wlc_pub_mfree(struct osl_info *osh, struct wlc_pub *pub);
38static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid); 38static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid);
39 39
40void *wlc_calloc(struct osl_info *osh, uint unit, uint size) 40void *wlc_calloc(struct osl_info *osh, uint unit, uint size)
@@ -65,12 +65,12 @@ void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
65 tunables->txsbnd = TXSBND; 65 tunables->txsbnd = TXSBND;
66} 66}
67 67
68static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err, 68static struct wlc_pub *wlc_pub_malloc(struct osl_info *osh, uint unit,
69 uint devid) 69 uint *err, uint devid)
70{ 70{
71 wlc_pub_t *pub; 71 struct wlc_pub *pub;
72 72
73 pub = (wlc_pub_t *) wlc_calloc(osh, unit, sizeof(wlc_pub_t)); 73 pub = (struct wlc_pub *) wlc_calloc(osh, unit, sizeof(struct wlc_pub));
74 if (pub == NULL) { 74 if (pub == NULL) {
75 *err = 1001; 75 *err = 1001;
76 goto fail; 76 goto fail;
@@ -100,7 +100,7 @@ static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err,
100 return NULL; 100 return NULL;
101} 101}
102 102
103static void wlc_pub_mfree(struct osl_info *osh, wlc_pub_t *pub) 103static void wlc_pub_mfree(struct osl_info *osh, struct wlc_pub *pub)
104{ 104{
105 if (pub == NULL) 105 if (pub == NULL)
106 return; 106 return;
@@ -179,7 +179,7 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
179 179
180 wlc->hwrxoff = WL_HWRXOFF; 180 wlc->hwrxoff = WL_HWRXOFF;
181 181
182 /* allocate wlc_pub_t state structure */ 182 /* allocate struct wlc_pub state structure */
183 wlc->pub = wlc_pub_malloc(osh, unit, err, devid); 183 wlc->pub = wlc_pub_malloc(osh, unit, err, devid);
184 if (wlc->pub == NULL) { 184 if (wlc->pub == NULL) {
185 *err = 1003; 185 *err = 1003;
diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.c b/drivers/staging/brcm80211/sys/wlc_antsel.c
index aaf9985a1995..27558fa02ba7 100644
--- a/drivers/staging/brcm80211/sys/wlc_antsel.c
+++ b/drivers/staging/brcm80211/sys/wlc_antsel.c
@@ -96,8 +96,8 @@ const u8 mimo_2x3_div_antselid_tbl[16] = {
96 96
97struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc, 97struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
98 struct osl_info *osh, 98 struct osl_info *osh,
99 wlc_pub_t *pub, 99 struct wlc_pub *pub,
100 struct wlc_hw_info *wlc_hw) { 100 struct wlc_hw_info *wlc_hw) {
101 struct antsel_info *asi; 101 struct antsel_info *asi;
102 102
103 asi = kzalloc(sizeof(struct antsel_info), GFP_ATOMIC); 103 asi = kzalloc(sizeof(struct antsel_info), GFP_ATOMIC);
diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.h b/drivers/staging/brcm80211/sys/wlc_antsel.h
index ba38a2aedbd9..8875b5848665 100644
--- a/drivers/staging/brcm80211/sys/wlc_antsel.h
+++ b/drivers/staging/brcm80211/sys/wlc_antsel.h
@@ -18,7 +18,7 @@
18#define _wlc_antsel_h_ 18#define _wlc_antsel_h_
19extern struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc, 19extern struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc,
20 struct osl_info *osh, 20 struct osl_info *osh,
21 wlc_pub_t *pub, 21 struct wlc_pub *pub,
22 struct wlc_hw_info *wlc_hw); 22 struct wlc_hw_info *wlc_hw);
23extern void wlc_antsel_detach(struct antsel_info *asi); 23extern void wlc_antsel_detach(struct antsel_info *asi);
24extern void wlc_antsel_init(struct antsel_info *asi); 24extern void wlc_antsel_init(struct antsel_info *asi);
diff --git a/drivers/staging/brcm80211/sys/wlc_channel.c b/drivers/staging/brcm80211/sys/wlc_channel.c
index 741e13af7b67..33041e36585c 100644
--- a/drivers/staging/brcm80211/sys/wlc_channel.c
+++ b/drivers/staging/brcm80211/sys/wlc_channel.c
@@ -44,7 +44,7 @@ typedef struct wlc_cm_band {
44} wlc_cm_band_t; 44} wlc_cm_band_t;
45 45
46struct wlc_cm_info { 46struct wlc_cm_info {
47 wlc_pub_t *pub; 47 struct wlc_pub *pub;
48 struct wlc_info *wlc; 48 struct wlc_info *wlc;
49 char srom_ccode[WLC_CNTRY_BUF_SZ]; /* Country Code in SROM */ 49 char srom_ccode[WLC_CNTRY_BUF_SZ]; /* Country Code in SROM */
50 uint srom_regrev; /* Regulatory Rev for the SROM ccode */ 50 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)
611 wlc_cm_info_t *wlc_cm; 611 wlc_cm_info_t *wlc_cm;
612 char country_abbrev[WLC_CNTRY_BUF_SZ]; 612 char country_abbrev[WLC_CNTRY_BUF_SZ];
613 const country_info_t *country; 613 const country_info_t *country;
614 wlc_pub_t *pub = wlc->pub; 614 struct wlc_pub *pub = wlc->pub;
615 char *ccode; 615 char *ccode;
616 616
617 WL_TRACE(("wl%d: wlc_channel_mgr_attach\n", wlc->pub->unit)); 617 WL_TRACE(("wl%d: wlc_channel_mgr_attach\n", wlc->pub->unit));
diff --git a/drivers/staging/brcm80211/sys/wlc_event.c b/drivers/staging/brcm80211/sys/wlc_event.c
index e4ab077bf87f..9b503d839aae 100644
--- a/drivers/staging/brcm80211/sys/wlc_event.c
+++ b/drivers/staging/brcm80211/sys/wlc_event.c
@@ -47,7 +47,7 @@ struct wlc_eventq {
47 wlc_event_t *tail; 47 wlc_event_t *tail;
48 struct wlc_info *wlc; 48 struct wlc_info *wlc;
49 void *wl; 49 void *wl;
50 wlc_pub_t *pub; 50 struct wlc_pub *pub;
51 bool tpending; 51 bool tpending;
52 bool workpending; 52 bool workpending;
53 struct wl_timer *timer; 53 struct wl_timer *timer;
@@ -58,7 +58,8 @@ struct wlc_eventq {
58/* 58/*
59 * Export functions 59 * Export functions
60 */ 60 */
61wlc_eventq_t *wlc_eventq_attach(wlc_pub_t *pub, struct wlc_info *wlc, void *wl, 61wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub, struct wlc_info *wlc,
62 void *wl,
62 wlc_eventq_cb_t cb) 63 wlc_eventq_cb_t cb)
63{ 64{
64 wlc_eventq_t *eq; 65 wlc_eventq_t *eq;
diff --git a/drivers/staging/brcm80211/sys/wlc_event.h b/drivers/staging/brcm80211/sys/wlc_event.h
index 7c8e49550f2d..e75582dcdd93 100644
--- a/drivers/staging/brcm80211/sys/wlc_event.h
+++ b/drivers/staging/brcm80211/sys/wlc_event.h
@@ -21,7 +21,8 @@ typedef struct wlc_eventq wlc_eventq_t;
21 21
22typedef void (*wlc_eventq_cb_t) (void *arg); 22typedef void (*wlc_eventq_cb_t) (void *arg);
23 23
24extern wlc_eventq_t *wlc_eventq_attach(wlc_pub_t *pub, struct wlc_info *wlc, 24extern wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub,
25 struct wlc_info *wlc,
25 void *wl, wlc_eventq_cb_t cb); 26 void *wl, wlc_eventq_cb_t cb);
26extern int wlc_eventq_detach(wlc_eventq_t *eq); 27extern int wlc_eventq_detach(wlc_eventq_t *eq);
27extern int wlc_eventq_down(wlc_eventq_t *eq); 28extern int wlc_eventq_down(wlc_eventq_t *eq);
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c
index b25b5bd6a110..eb4013dab36c 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c
@@ -1697,7 +1697,7 @@ static uint wlc_attach_module(struct wlc_info *wlc)
1697 return err; 1697 return err;
1698} 1698}
1699 1699
1700wlc_pub_t *wlc_pub(void *wlc) 1700struct wlc_pub *wlc_pub(void *wlc)
1701{ 1701{
1702 return ((struct wlc_info *) wlc)->pub; 1702 return ((struct wlc_info *) wlc)->pub;
1703} 1703}
@@ -1714,7 +1714,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
1714 struct wlc_info *wlc; 1714 struct wlc_info *wlc;
1715 uint err = 0; 1715 uint err = 0;
1716 uint j; 1716 uint j;
1717 wlc_pub_t *pub; 1717 struct wlc_pub *pub;
1718 wlc_txq_info_t *qi; 1718 wlc_txq_info_t *qi;
1719 uint n_disabled; 1719 uint n_disabled;
1720 1720
@@ -4309,7 +4309,7 @@ int wlc_iovar_gets8(struct wlc_info *wlc, const char *name, s8 *arg)
4309 * calling function must keep 'iovars' until wlc_module_unregister is called. 4309 * calling function must keep 'iovars' until wlc_module_unregister is called.
4310 * 'iovar' must have the last entry's name field being NULL as terminator. 4310 * 'iovar' must have the last entry's name field being NULL as terminator.
4311 */ 4311 */
4312int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars, 4312int wlc_module_register(struct wlc_pub *pub, const bcm_iovar_t *iovars,
4313 const char *name, void *hdl, iovar_fn_t i_fn, 4313 const char *name, void *hdl, iovar_fn_t i_fn,
4314 watchdog_fn_t w_fn, down_fn_t d_fn) 4314 watchdog_fn_t w_fn, down_fn_t d_fn)
4315{ 4315{
@@ -4339,7 +4339,7 @@ int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
4339} 4339}
4340 4340
4341/* unregister module callbacks */ 4341/* unregister module callbacks */
4342int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl) 4342int wlc_module_unregister(struct wlc_pub *pub, const char *name, void *hdl)
4343{ 4343{
4344 struct wlc_info *wlc = (struct wlc_info *) pub->wlc; 4344 struct wlc_info *wlc = (struct wlc_info *) pub->wlc;
4345 int i; 4345 int i;
@@ -4455,7 +4455,7 @@ wlc_iovar_op(struct wlc_info *wlc, const char *name,
4455} 4455}
4456 4456
4457int 4457int
4458wlc_iovar_check(wlc_pub_t *pub, const bcm_iovar_t *vi, void *arg, int len, 4458wlc_iovar_check(struct wlc_pub *pub, const bcm_iovar_t *vi, void *arg, int len,
4459 bool set) 4459 bool set)
4460{ 4460{
4461 struct wlc_info *wlc = (struct wlc_info *) pub->wlc; 4461 struct wlc_info *wlc = (struct wlc_info *) pub->wlc;
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h
index ba2b953800e3..d3def7448bf7 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.h
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h
@@ -510,7 +510,7 @@ typedef struct wlc_txq_info {
510 * Principal common (os-independent) software data structure. 510 * Principal common (os-independent) software data structure.
511 */ 511 */
512struct wlc_info { 512struct wlc_info {
513 wlc_pub_t *pub; /* pointer to wlc public state */ 513 struct wlc_pub *pub; /* pointer to wlc public state */
514 struct osl_info *osh; /* pointer to os handle */ 514 struct osl_info *osh; /* pointer to os handle */
515 struct wl_info *wl; /* pointer to os-specific private state */ 515 struct wl_info *wl; /* pointer to os-specific private state */
516 d11regs_t *regs; /* pointer to device registers */ 516 d11regs_t *regs; /* pointer to device registers */
@@ -787,7 +787,7 @@ struct wlc_info {
787/* antsel module specific state */ 787/* antsel module specific state */
788struct antsel_info { 788struct antsel_info {
789 struct wlc_info *wlc; /* pointer to main wlc structure */ 789 struct wlc_info *wlc; /* pointer to main wlc structure */
790 wlc_pub_t *pub; /* pointer to public fn */ 790 struct wlc_pub *pub; /* pointer to public fn */
791 u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic 791 u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic
792 * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board 792 * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
793 */ 793 */
diff --git a/drivers/staging/brcm80211/sys/wlc_pub.h b/drivers/staging/brcm80211/sys/wlc_pub.h
index 80331e8a81ea..146a6904a39b 100644
--- a/drivers/staging/brcm80211/sys/wlc_pub.h
+++ b/drivers/staging/brcm80211/sys/wlc_pub.h
@@ -251,7 +251,7 @@ typedef int (*iovar_fn_t) (void *handle, const bcm_iovar_t *vi,
251 * Public portion of "common" os-independent state structure. 251 * Public portion of "common" os-independent state structure.
252 * The wlc handle points at this. 252 * The wlc handle points at this.
253 */ 253 */
254typedef struct wlc_pub { 254struct wlc_pub {
255 void *wlc; 255 void *wlc;
256 256
257 struct ieee80211_hw *ieee_hw; 257 struct ieee80211_hw *ieee_hw;
@@ -330,7 +330,7 @@ typedef struct wlc_pub {
330 bool _lmacproto; /* lmac protocol module included and enabled */ 330 bool _lmacproto; /* lmac protocol module included and enabled */
331 bool phy_11ncapable; /* the PHY/HW is capable of 802.11N */ 331 bool phy_11ncapable; /* the PHY/HW is capable of 802.11N */
332 bool _ampdumac; /* mac assist ampdu enabled or not */ 332 bool _ampdumac; /* mac assist ampdu enabled or not */
333} wlc_pub_t; 333};
334 334
335/* wl_monitor rx status per packet */ 335/* wl_monitor rx status per packet */
336typedef struct wl_rxsts { 336typedef struct wl_rxsts {
@@ -528,7 +528,7 @@ extern void wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
528extern void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg, 528extern void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg,
529 bool suspend); 529 bool suspend);
530 530
531extern wlc_pub_t *wlc_pub(void *wlc); 531extern struct wlc_pub *wlc_pub(void *wlc);
532 532
533/* common functions for every port */ 533/* common functions for every port */
534extern int wlc_bmac_up_prep(struct wlc_hw_info *wlc_hw); 534extern 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);
554/* ioctl */ 554/* ioctl */
555extern int wlc_iovar_gets8(struct wlc_info *wlc, const char *name, 555extern int wlc_iovar_gets8(struct wlc_info *wlc, const char *name,
556 s8 *arg); 556 s8 *arg);
557extern int wlc_iovar_check(wlc_pub_t *pub, const bcm_iovar_t *vi, void *arg, 557extern int wlc_iovar_check(struct wlc_pub *pub, const bcm_iovar_t *vi,
558 void *arg,
558 int len, bool set); 559 int len, bool set);
559 560
560extern int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars, 561extern int wlc_module_register(struct wlc_pub *pub, const bcm_iovar_t *iovars,
561 const char *name, void *hdl, iovar_fn_t iovar_fn, 562 const char *name, void *hdl, iovar_fn_t iovar_fn,
562 watchdog_fn_t watchdog_fn, down_fn_t down_fn); 563 watchdog_fn_t watchdog_fn, down_fn_t down_fn);
563extern int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl); 564extern int wlc_module_unregister(struct wlc_pub *pub, const char *name,
565 void *hdl);
564extern void wlc_event_if(struct wlc_info *wlc, struct wlc_bsscfg *cfg, 566extern void wlc_event_if(struct wlc_info *wlc, struct wlc_bsscfg *cfg,
565 wlc_event_t *e, const struct ether_addr *addr); 567 wlc_event_t *e, const struct ether_addr *addr);
566extern void wlc_suspend_mac_and_wait(struct wlc_info *wlc); 568extern void wlc_suspend_mac_and_wait(struct wlc_info *wlc);