diff options
author | Roland Vossen <rvossen@broadcom.com> | 2010-12-07 11:45:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-08 17:27:47 -0500 |
commit | 299f8a4658e055d9f9713f7bed45860474544e68 (patch) | |
tree | 5d0f0108464f685e96c2671317e2037f919e4d57 | |
parent | 0e4934748948b5886c965fe56207b41d3abd58e7 (diff) |
staging: brcm80211: replaced typedef antsel_info_t by struct antsel_info
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/wlc_antsel.c | 32 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_antsel.h | 11 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_mac80211.h | 7 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_types.h | 2 |
4 files changed, 29 insertions, 23 deletions
diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.c b/drivers/staging/brcm80211/sys/wlc_antsel.c index 9533b5687302..aaf9985a1995 100644 --- a/drivers/staging/brcm80211/sys/wlc_antsel.c +++ b/drivers/staging/brcm80211/sys/wlc_antsel.c | |||
@@ -63,10 +63,11 @@ | |||
63 | #define ANT_SELCFG_DEF_2x4 0x02 /* default antenna configuration */ | 63 | #define ANT_SELCFG_DEF_2x4 0x02 /* default antenna configuration */ |
64 | 64 | ||
65 | /* static functions */ | 65 | /* static functions */ |
66 | static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel); | 66 | static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel); |
67 | static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id); | 67 | static u8 wlc_antsel_id2antcfg(struct antsel_info *asi, u8 id); |
68 | static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg); | 68 | static u16 wlc_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg); |
69 | static void wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel, | 69 | static void wlc_antsel_init_cfg(struct antsel_info *asi, |
70 | wlc_antselcfg_t *antsel, | ||
70 | bool auto_sel); | 71 | bool auto_sel); |
71 | 72 | ||
72 | const u16 mimo_2x4_div_antselpat_tbl[] = { | 73 | const u16 mimo_2x4_div_antselpat_tbl[] = { |
@@ -93,12 +94,13 @@ const u8 mimo_2x3_div_antselid_tbl[16] = { | |||
93 | 0, 0, 0, 0, 0, 0, 0, 0 /* pat to antselid */ | 94 | 0, 0, 0, 0, 0, 0, 0, 0 /* pat to antselid */ |
94 | }; | 95 | }; |
95 | 96 | ||
96 | antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc, struct osl_info *osh, | 97 | struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc, |
98 | struct osl_info *osh, | ||
97 | wlc_pub_t *pub, | 99 | wlc_pub_t *pub, |
98 | struct wlc_hw_info *wlc_hw) { | 100 | struct wlc_hw_info *wlc_hw) { |
99 | antsel_info_t *asi; | 101 | struct antsel_info *asi; |
100 | 102 | ||
101 | asi = kzalloc(sizeof(antsel_info_t), GFP_ATOMIC); | 103 | asi = kzalloc(sizeof(struct antsel_info), GFP_ATOMIC); |
102 | if (!asi) { | 104 | if (!asi) { |
103 | WL_ERROR(("wl%d: wlc_antsel_attach: out of mem\n", pub->unit)); | 105 | WL_ERROR(("wl%d: wlc_antsel_attach: out of mem\n", pub->unit)); |
104 | return NULL; | 106 | return NULL; |
@@ -157,7 +159,7 @@ antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc, struct osl_info *osh, | |||
157 | return asi; | 159 | return asi; |
158 | } | 160 | } |
159 | 161 | ||
160 | void wlc_antsel_detach(antsel_info_t *asi) | 162 | void wlc_antsel_detach(struct antsel_info *asi) |
161 | { | 163 | { |
162 | if (!asi) | 164 | if (!asi) |
163 | return; | 165 | return; |
@@ -165,7 +167,7 @@ void wlc_antsel_detach(antsel_info_t *asi) | |||
165 | kfree(asi); | 167 | kfree(asi); |
166 | } | 168 | } |
167 | 169 | ||
168 | void wlc_antsel_init(antsel_info_t *asi) | 170 | void wlc_antsel_init(struct antsel_info *asi) |
169 | { | 171 | { |
170 | if ((asi->antsel_type == ANTSEL_2x3) || | 172 | if ((asi->antsel_type == ANTSEL_2x3) || |
171 | (asi->antsel_type == ANTSEL_2x4)) | 173 | (asi->antsel_type == ANTSEL_2x4)) |
@@ -174,7 +176,7 @@ void wlc_antsel_init(antsel_info_t *asi) | |||
174 | 176 | ||
175 | /* boardlevel antenna selection: init antenna selection structure */ | 177 | /* boardlevel antenna selection: init antenna selection structure */ |
176 | static void | 178 | static void |
177 | wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel, | 179 | wlc_antsel_init_cfg(struct antsel_info *asi, wlc_antselcfg_t *antsel, |
178 | bool auto_sel) | 180 | bool auto_sel) |
179 | { | 181 | { |
180 | if (asi->antsel_type == ANTSEL_2x3) { | 182 | if (asi->antsel_type == ANTSEL_2x3) { |
@@ -205,7 +207,7 @@ wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel, | |||
205 | } | 207 | } |
206 | 208 | ||
207 | void BCMFASTPATH | 209 | void BCMFASTPATH |
208 | wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel, | 210 | wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef, bool sel, |
209 | u8 antselid, u8 fbantselid, u8 *antcfg, | 211 | u8 antselid, u8 fbantselid, u8 *antcfg, |
210 | u8 *fbantcfg) | 212 | u8 *fbantcfg) |
211 | { | 213 | { |
@@ -237,7 +239,7 @@ wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel, | |||
237 | } | 239 | } |
238 | 240 | ||
239 | /* boardlevel antenna selection: convert mimo_antsel (ucode interface) to id */ | 241 | /* boardlevel antenna selection: convert mimo_antsel (ucode interface) to id */ |
240 | u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel) | 242 | u8 wlc_antsel_antsel2id(struct antsel_info *asi, u16 antsel) |
241 | { | 243 | { |
242 | u8 antselid = 0; | 244 | u8 antselid = 0; |
243 | 245 | ||
@@ -256,7 +258,7 @@ u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel) | |||
256 | } | 258 | } |
257 | 259 | ||
258 | /* boardlevel antenna selection: convert id to ant_cfg */ | 260 | /* boardlevel antenna selection: convert id to ant_cfg */ |
259 | static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id) | 261 | static u8 wlc_antsel_id2antcfg(struct antsel_info *asi, u8 id) |
260 | { | 262 | { |
261 | u8 antcfg = ANT_SELCFG_DEF_2x2; | 263 | u8 antcfg = ANT_SELCFG_DEF_2x2; |
262 | 264 | ||
@@ -275,7 +277,7 @@ static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id) | |||
275 | } | 277 | } |
276 | 278 | ||
277 | /* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */ | 279 | /* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */ |
278 | static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg) | 280 | static u16 wlc_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg) |
279 | { | 281 | { |
280 | u8 idx = WLC_ANTIDX_11N(WLC_ANTSEL_11N(ant_cfg)); | 282 | u8 idx = WLC_ANTIDX_11N(WLC_ANTSEL_11N(ant_cfg)); |
281 | u16 mimo_antsel = 0; | 283 | u16 mimo_antsel = 0; |
@@ -295,7 +297,7 @@ static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg) | |||
295 | } | 297 | } |
296 | 298 | ||
297 | /* boardlevel antenna selection: ucode interface control */ | 299 | /* boardlevel antenna selection: ucode interface control */ |
298 | static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel) | 300 | static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel) |
299 | { | 301 | { |
300 | struct wlc_info *wlc = asi->wlc; | 302 | struct wlc_info *wlc = asi->wlc; |
301 | u8 ant_cfg; | 303 | u8 ant_cfg; |
diff --git a/drivers/staging/brcm80211/sys/wlc_antsel.h b/drivers/staging/brcm80211/sys/wlc_antsel.h index 763986dd226e..ba38a2aedbd9 100644 --- a/drivers/staging/brcm80211/sys/wlc_antsel.h +++ b/drivers/staging/brcm80211/sys/wlc_antsel.h | |||
@@ -16,14 +16,15 @@ | |||
16 | 16 | ||
17 | #ifndef _wlc_antsel_h_ | 17 | #ifndef _wlc_antsel_h_ |
18 | #define _wlc_antsel_h_ | 18 | #define _wlc_antsel_h_ |
19 | extern antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc, | 19 | extern 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 | wlc_pub_t *pub, |
22 | struct wlc_hw_info *wlc_hw); | 22 | struct wlc_hw_info *wlc_hw); |
23 | extern void wlc_antsel_detach(antsel_info_t *asi); | 23 | extern void wlc_antsel_detach(struct antsel_info *asi); |
24 | extern void wlc_antsel_init(antsel_info_t *asi); | 24 | extern void wlc_antsel_init(struct antsel_info *asi); |
25 | extern void wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel, | 25 | extern void wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef, |
26 | bool sel, | ||
26 | u8 id, u8 fbid, u8 *antcfg, | 27 | u8 id, u8 fbid, u8 *antcfg, |
27 | u8 *fbantcfg); | 28 | u8 *fbantcfg); |
28 | extern u8 wlc_antsel_antsel2id(antsel_info_t *asi, u16 antsel); | 29 | extern u8 wlc_antsel_antsel2id(struct antsel_info *asi, u16 antsel); |
29 | #endif /* _wlc_antsel_h_ */ | 30 | #endif /* _wlc_antsel_h_ */ |
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h index 1d5149ee1207..2ad37f612f00 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.h +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h | |||
@@ -487,7 +487,10 @@ struct wlc_hw_info { | |||
487 | u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic | 487 | u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic |
488 | * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board | 488 | * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board |
489 | */ | 489 | */ |
490 | u32 antsel_avail; /* put antsel_info_t here if more info is needed */ | 490 | u32 antsel_avail; /* |
491 | * put struct antsel_info here if more info is | ||
492 | * needed | ||
493 | */ | ||
491 | }; | 494 | }; |
492 | 495 | ||
493 | /* TX Queue information | 496 | /* TX Queue information |
@@ -549,7 +552,7 @@ struct wlc_info { | |||
549 | 552 | ||
550 | 553 | ||
551 | struct ampdu_info *ampdu; /* ampdu module handler */ | 554 | struct ampdu_info *ampdu; /* ampdu module handler */ |
552 | antsel_info_t *asi; /* antsel module handler */ | 555 | struct antsel_info *asi; /* antsel module handler */ |
553 | wlc_cm_info_t *cmi; /* channel manager module handler */ | 556 | wlc_cm_info_t *cmi; /* channel manager module handler */ |
554 | 557 | ||
555 | void *btparam; /* bus type specific cookie */ | 558 | void *btparam; /* bus type specific cookie */ |
diff --git a/drivers/staging/brcm80211/sys/wlc_types.h b/drivers/staging/brcm80211/sys/wlc_types.h index 9634a66582ac..284e7c350c81 100644 --- a/drivers/staging/brcm80211/sys/wlc_types.h +++ b/drivers/staging/brcm80211/sys/wlc_types.h | |||
@@ -25,7 +25,7 @@ struct wlc_if; | |||
25 | typedef struct wl_if wl_if_t; | 25 | typedef struct wl_if wl_if_t; |
26 | struct ampdu_info; | 26 | struct ampdu_info; |
27 | struct wlc_ap_info; | 27 | struct wlc_ap_info; |
28 | typedef struct antsel_info antsel_info_t; | 28 | struct antsel_info; |
29 | typedef struct bmac_pmq bmac_pmq_t; | 29 | typedef struct bmac_pmq bmac_pmq_t; |
30 | 30 | ||
31 | struct d11init; | 31 | struct d11init; |