Commit f077f718 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: replaced typedef wlcband_t by struct wlcband

Code cleanup.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 17d76651
...@@ -267,8 +267,8 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, ...@@ -267,8 +267,8 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
goto fail; goto fail;
} }
wlc->bandstate[0] = (wlcband_t *)wlc_calloc(osh, unit, wlc->bandstate[0] = (struct wlcband *)wlc_calloc(osh, unit,
(sizeof(wlcband_t) * MAXBANDS)); (sizeof(struct wlcband)*MAXBANDS));
if (wlc->bandstate[0] == NULL) { if (wlc->bandstate[0] == NULL) {
*err = 1025; *err = 1025;
goto fail; goto fail;
...@@ -277,8 +277,8 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, ...@@ -277,8 +277,8 @@ struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
for (i = 1; i < MAXBANDS; i++) { for (i = 1; i < MAXBANDS; i++) {
wlc->bandstate[i] = wlc->bandstate[i] =
(wlcband_t *) ((unsigned long)wlc->bandstate[0] + (struct wlcband *) ((unsigned long)wlc->bandstate[0]
(sizeof(wlcband_t) * i)); + (sizeof(struct wlcband)*i));
} }
} }
......
...@@ -905,7 +905,7 @@ wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country) ...@@ -905,7 +905,7 @@ wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country)
{ {
struct wlc_info *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
uint i, j; uint i, j;
wlcband_t *band; struct wlcband *band;
const locale_info_t *li; const locale_info_t *li;
chanvec_t sup_chan; chanvec_t sup_chan;
const locale_mimo_info_t *li_mimo; const locale_mimo_info_t *li_mimo;
...@@ -1005,7 +1005,7 @@ void wlc_quiet_channels_reset(wlc_cm_info_t *wlc_cm) ...@@ -1005,7 +1005,7 @@ void wlc_quiet_channels_reset(wlc_cm_info_t *wlc_cm)
{ {
struct wlc_info *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
uint i, j; uint i, j;
wlcband_t *band; struct wlcband *band;
const chanvec_t *chanvec; const chanvec_t *chanvec;
memset(&wlc_cm->quiet_channels, 0, sizeof(chanvec_t)); memset(&wlc_cm->quiet_channels, 0, sizeof(chanvec_t));
...@@ -1310,7 +1310,7 @@ wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec, ...@@ -1310,7 +1310,7 @@ wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
int maxpwr; int maxpwr;
int delta; int delta;
const country_info_t *country; const country_info_t *country;
wlcband_t *band; struct wlcband *band;
const locale_info_t *li; const locale_info_t *li;
int conducted_max; int conducted_max;
int conducted_ofdm_max; int conducted_ofdm_max;
......
...@@ -233,7 +233,7 @@ static u16 BCMFASTPATH wlc_d11hdrs_mac80211(struct wlc_info *wlc, ...@@ -233,7 +233,7 @@ static u16 BCMFASTPATH wlc_d11hdrs_mac80211(struct wlc_info *wlc,
static void wlc_bss_default_init(struct wlc_info *wlc); static void wlc_bss_default_init(struct wlc_info *wlc);
static void wlc_ucode_mac_upd(struct wlc_info *wlc); static void wlc_ucode_mac_upd(struct wlc_info *wlc);
static ratespec_t mac80211_wlc_set_nrate(struct wlc_info *wlc, static ratespec_t mac80211_wlc_set_nrate(struct wlc_info *wlc,
wlcband_t *cur_band, u32 int_val); struct wlcband *cur_band, u32 int_val);
static void wlc_tx_prec_map_init(struct wlc_info *wlc); static void wlc_tx_prec_map_init(struct wlc_info *wlc);
static void wlc_watchdog(void *arg); static void wlc_watchdog(void *arg);
static void wlc_watchdog_by_timer(void *arg); static void wlc_watchdog_by_timer(void *arg);
...@@ -2764,7 +2764,7 @@ int wlc_set_gmode(struct wlc_info *wlc, u8 gmode, bool config) ...@@ -2764,7 +2764,7 @@ int wlc_set_gmode(struct wlc_info *wlc, u8 gmode, bool config)
bool preamble_restrict = false; /* Restrict association to stations that support short bool preamble_restrict = false; /* Restrict association to stations that support short
* preambles * preambles
*/ */
wlcband_t *band; struct wlcband *band;
/* if N-support is enabled, allow Gmode set as long as requested /* if N-support is enabled, allow Gmode set as long as requested
* Gmode is not GMODE_LEGACY_B * Gmode is not GMODE_LEGACY_B
...@@ -7480,7 +7480,7 @@ bool wlc_valid_rate(struct wlc_info *wlc, ratespec_t rspec, int band, ...@@ -7480,7 +7480,7 @@ bool wlc_valid_rate(struct wlc_info *wlc, ratespec_t rspec, int band,
static void wlc_update_mimo_band_bwcap(struct wlc_info *wlc, u8 bwcap) static void wlc_update_mimo_band_bwcap(struct wlc_info *wlc, u8 bwcap)
{ {
uint i; uint i;
wlcband_t *band; struct wlcband *band;
for (i = 0; i < NBANDS(wlc); i++) { for (i = 0; i < NBANDS(wlc); i++) {
if (IS_SINGLEBAND_5G(wlc->deviceid)) if (IS_SINGLEBAND_5G(wlc->deviceid))
...@@ -7901,7 +7901,7 @@ void wlc_default_rateset(struct wlc_info *wlc, wlc_rateset_t *rs) ...@@ -7901,7 +7901,7 @@ void wlc_default_rateset(struct wlc_info *wlc, wlc_rateset_t *rs)
static void wlc_bss_default_init(struct wlc_info *wlc) static void wlc_bss_default_init(struct wlc_info *wlc)
{ {
chanspec_t chanspec; chanspec_t chanspec;
wlcband_t *band; struct wlcband *band;
wlc_bss_info_t *bi = wlc->default_bss; wlc_bss_info_t *bi = wlc->default_bss;
/* init default and target BSS with some sane initial values */ /* init default and target BSS with some sane initial values */
...@@ -7962,7 +7962,8 @@ wlc_uint64_sub(u32 *a_high, u32 *a_low, u32 b_high, u32 b_low) ...@@ -7962,7 +7962,8 @@ wlc_uint64_sub(u32 *a_high, u32 *a_low, u32 b_high, u32 b_low)
} }
static ratespec_t static ratespec_t
mac80211_wlc_set_nrate(struct wlc_info *wlc, wlcband_t *cur_band, u32 int_val) mac80211_wlc_set_nrate(struct wlc_info *wlc, struct wlcband *cur_band,
u32 int_val)
{ {
u8 stf = (int_val & NRATE_STF_MASK) >> NRATE_STF_SHIFT; u8 stf = (int_val & NRATE_STF_MASK) >> NRATE_STF_SHIFT;
u8 rate = int_val & NRATE_RATE_MASK; u8 rate = int_val & NRATE_RATE_MASK;
......
...@@ -315,7 +315,7 @@ typedef struct wlccore { ...@@ -315,7 +315,7 @@ typedef struct wlccore {
/* /*
* band state (phy+ana+radio) * band state (phy+ana+radio)
*/ */
typedef struct wlcband { struct wlcband {
int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */ int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */
uint bandunit; /* bandstate[] index */ uint bandunit; /* bandstate[] index */
...@@ -344,7 +344,7 @@ typedef struct wlcband { ...@@ -344,7 +344,7 @@ typedef struct wlcband {
u16 CWmin; /* The minimum size of contention window, in unit of aSlotTime */ u16 CWmin; /* The minimum size of contention window, in unit of aSlotTime */
u16 CWmax; /* The maximum size of contention window, in unit of aSlotTime */ u16 CWmax; /* The maximum size of contention window, in unit of aSlotTime */
u16 bcntsfoff; /* beacon tsf offset */ u16 bcntsfoff; /* beacon tsf offset */
} wlcband_t; };
/* generic function callback takes just one arg */ /* generic function callback takes just one arg */
typedef void (*cb_fn_t) (void *); typedef void (*cb_fn_t) (void *);
...@@ -533,9 +533,10 @@ struct wlc_info { ...@@ -533,9 +533,10 @@ struct wlc_info {
/* multiband */ /* multiband */
wlccore_t *core; /* pointer to active io core */ wlccore_t *core; /* pointer to active io core */
wlcband_t *band; /* pointer to active per-band state */ struct wlcband *band; /* pointer to active per-band state */
wlccore_t *corestate; /* per-core state (one per hw core) */ wlccore_t *corestate; /* per-core state (one per hw core) */
wlcband_t *bandstate[MAXBANDS]; /* per-band state (one per phy/radio) */ /* per-band state (one per phy/radio): */
struct wlcband *bandstate[MAXBANDS];
bool war16165; /* PCI slow clock 16165 war flag */ bool war16165; /* PCI slow clock 16165 war flag */
......
...@@ -371,7 +371,7 @@ int wlc_stf_rxchain_set(struct wlc_info *wlc, s32 int_val) ...@@ -371,7 +371,7 @@ int wlc_stf_rxchain_set(struct wlc_info *wlc, s32 int_val)
} }
/* update wlc->stf->ss_opmode which represents the operational stf_ss mode we're using */ /* update wlc->stf->ss_opmode which represents the operational stf_ss mode we're using */
int wlc_stf_ss_update(struct wlc_info *wlc, wlcband_t *band) int wlc_stf_ss_update(struct wlc_info *wlc, struct wlcband *band)
{ {
int ret_code = 0; int ret_code = 0;
u8 prev_stf_ss; u8 prev_stf_ss;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment