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

staging: brcm80211: replaced wlc_info_t by struct wlc_info.

Part of code cleanup effort. Global replace of wlc_info_t with struct wlc_info.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e63449b7
...@@ -156,7 +156,7 @@ void wlc_bsscfg_mfree(struct osl_info *osh, wlc_bsscfg_t *cfg) ...@@ -156,7 +156,7 @@ void wlc_bsscfg_mfree(struct osl_info *osh, wlc_bsscfg_t *cfg)
kfree(cfg); kfree(cfg);
} }
void wlc_bsscfg_ID_assign(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg) void wlc_bsscfg_ID_assign(struct wlc_info *wlc, wlc_bsscfg_t *bsscfg)
{ {
bsscfg->ID = wlc->next_bsscfg_ID; bsscfg->ID = wlc->next_bsscfg_ID;
wlc->next_bsscfg_ID++; wlc->next_bsscfg_ID++;
...@@ -165,12 +165,13 @@ void wlc_bsscfg_ID_assign(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg) ...@@ -165,12 +165,13 @@ void wlc_bsscfg_ID_assign(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg)
/* /*
* The common driver entry routine. Error codes should be unique * The common driver entry routine. Error codes should be unique
*/ */
wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
uint devid) uint devid)
{ {
wlc_info_t *wlc; struct wlc_info *wlc;
wlc = (wlc_info_t *) wlc_calloc(osh, unit, sizeof(wlc_info_t)); wlc = (struct wlc_info *) wlc_calloc(osh, unit,
sizeof(struct wlc_info));
if (wlc == NULL) { if (wlc == NULL) {
*err = 1002; *err = 1002;
goto fail; goto fail;
...@@ -301,7 +302,7 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, ...@@ -301,7 +302,7 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
return NULL; return NULL;
} }
void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh) void wlc_detach_mfree(struct wlc_info *wlc, struct osl_info *osh)
{ {
if (wlc == NULL) if (wlc == NULL)
return; return;
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
extern void *wlc_calloc(struct osl_info *osh, uint unit, uint size); extern void *wlc_calloc(struct osl_info *osh, uint unit, uint size);
extern wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, extern struct wlc_info *wlc_attach_malloc(struct osl_info *osh, uint unit,
uint devid); uint *err, uint devid);
extern void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh); extern void wlc_detach_mfree(struct wlc_info *wlc, struct osl_info *osh);
struct wlc_bsscfg; struct wlc_bsscfg;
extern struct wlc_bsscfg *wlc_bsscfg_malloc(struct osl_info *osh, uint unit); extern struct wlc_bsscfg *wlc_bsscfg_malloc(struct osl_info *osh, uint unit);
......
...@@ -98,7 +98,7 @@ typedef struct wlc_fifo_info { ...@@ -98,7 +98,7 @@ typedef struct wlc_fifo_info {
/* AMPDU module specific state */ /* AMPDU module specific state */
struct ampdu_info { struct ampdu_info {
wlc_info_t *wlc; /* pointer to main wlc structure */ struct wlc_info *wlc; /* pointer to main wlc structure */
int scb_handle; /* scb cubby handle to retrieve data from scb */ int scb_handle; /* scb cubby handle to retrieve data from scb */
u8 ini_enable[AMPDU_MAX_SCB_TID]; /* per-tid initiator enable/disable of ampdu */ u8 ini_enable[AMPDU_MAX_SCB_TID]; /* per-tid initiator enable/disable of ampdu */
u8 ba_tx_wsize; /* Tx ba window size (in pdu) */ u8 ba_tx_wsize; /* Tx ba window size (in pdu) */
...@@ -131,7 +131,7 @@ struct ampdu_info { ...@@ -131,7 +131,7 @@ struct ampdu_info {
#define SCB_AMPDU_INI(scb_ampdu, tid) (&(scb_ampdu->ini[tid])) #define SCB_AMPDU_INI(scb_ampdu, tid) (&(scb_ampdu->ini[tid]))
static void wlc_ffpld_init(ampdu_info_t *ampdu); static void wlc_ffpld_init(ampdu_info_t *ampdu);
static int wlc_ffpld_check_txfunfl(wlc_info_t *wlc, int f); static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int f);
static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f); static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f);
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu, static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
...@@ -149,7 +149,7 @@ static void wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, ...@@ -149,7 +149,7 @@ static void wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs, struct sk_buff *p, tx_status_t *txs,
u32 frmtxstatus, u32 frmtxstatus2); u32 frmtxstatus, u32 frmtxstatus2);
static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, struct sk_buff *p) static inline u16 pkt_txh_seqnum(struct wlc_info *wlc, struct sk_buff *p)
{ {
d11txh_t *txh; d11txh_t *txh;
struct dot11_header *h; struct dot11_header *h;
...@@ -158,7 +158,7 @@ static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, struct sk_buff *p) ...@@ -158,7 +158,7 @@ static inline u16 pkt_txh_seqnum(wlc_info_t *wlc, struct sk_buff *p)
return ltoh16(h->seq) >> SEQNUM_SHIFT; return ltoh16(h->seq) >> SEQNUM_SHIFT;
} }
ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc) ampdu_info_t *wlc_ampdu_attach(struct wlc_info *wlc)
{ {
ampdu_info_t *ampdu; ampdu_info_t *ampdu;
int i; int i;
...@@ -317,7 +317,7 @@ static void wlc_ffpld_init(ampdu_info_t *ampdu) ...@@ -317,7 +317,7 @@ static void wlc_ffpld_init(ampdu_info_t *ampdu)
* Return 1 if pre-loading not active, -1 if not an underflow event, * Return 1 if pre-loading not active, -1 if not an underflow event,
* 0 if pre-loading module took care of the event. * 0 if pre-loading module took care of the event.
*/ */
static int wlc_ffpld_check_txfunfl(wlc_info_t *wlc, int fid) static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
{ {
ampdu_info_t *ampdu = wlc->ampdu; ampdu_info_t *ampdu = wlc->ampdu;
u32 phy_rate = MCS_RATE(FFPLD_MAX_MCS, true, false); u32 phy_rate = MCS_RATE(FFPLD_MAX_MCS, true, false);
...@@ -491,7 +491,7 @@ int BCMFASTPATH ...@@ -491,7 +491,7 @@ int BCMFASTPATH
wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, struct sk_buff **pdu, wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, struct sk_buff **pdu,
int prec) int prec)
{ {
wlc_info_t *wlc; struct wlc_info *wlc;
struct osl_info *osh; struct osl_info *osh;
struct sk_buff *p, *pkt[AMPDU_MAX_MPDU]; struct sk_buff *p, *pkt[AMPDU_MAX_MPDU];
u8 tid, ndelim; u8 tid, ndelim;
...@@ -889,7 +889,7 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p, ...@@ -889,7 +889,7 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p,
tx_status_t *txs) tx_status_t *txs)
{ {
scb_ampdu_t *scb_ampdu; scb_ampdu_t *scb_ampdu;
wlc_info_t *wlc = ampdu->wlc; struct wlc_info *wlc = ampdu->wlc;
scb_ampdu_tid_ini_t *ini; scb_ampdu_tid_ini_t *ini;
u32 s1 = 0, s2 = 0; u32 s1 = 0, s2 = 0;
struct ieee80211_tx_info *tx_info; struct ieee80211_tx_info *tx_info;
...@@ -932,11 +932,8 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p, ...@@ -932,11 +932,8 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, struct sk_buff *p,
wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini); wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini);
} }
void rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
tx_status_t *txs, u8 mcs);
void void
rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info, rate_status(struct wlc_info *wlc, struct ieee80211_tx_info *tx_info,
tx_status_t *txs, u8 mcs) tx_status_t *txs, u8 mcs)
{ {
struct ieee80211_tx_rate *txrate = tx_info->status.rates; struct ieee80211_tx_rate *txrate = tx_info->status.rates;
...@@ -957,7 +954,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, ...@@ -957,7 +954,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb,
u32 s1, u32 s2) u32 s1, u32 s2)
{ {
scb_ampdu_t *scb_ampdu; scb_ampdu_t *scb_ampdu;
wlc_info_t *wlc = ampdu->wlc; struct wlc_info *wlc = ampdu->wlc;
scb_ampdu_tid_ini_t *ini; scb_ampdu_tid_ini_t *ini;
u8 bitmap[8], queue, tid; u8 bitmap[8], queue, tid;
d11txh_t *txh; d11txh_t *txh;
...@@ -1226,7 +1223,7 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu, ...@@ -1226,7 +1223,7 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
int wlc_ampdu_set(ampdu_info_t *ampdu, bool on) int wlc_ampdu_set(ampdu_info_t *ampdu, bool on)
{ {
wlc_info_t *wlc = ampdu->wlc; struct wlc_info *wlc = ampdu->wlc;
wlc->pub->_ampdu = false; wlc->pub->_ampdu = false;
...@@ -1313,7 +1310,7 @@ wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb, ...@@ -1313,7 +1310,7 @@ wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
return 0; return 0;
} }
void wlc_ampdu_macaddr_upd(wlc_info_t *wlc) void wlc_ampdu_macaddr_upd(struct wlc_info *wlc)
{ {
char template[T_RAM_ACCESS_SZ * 2]; char template[T_RAM_ACCESS_SZ * 2];
...@@ -1324,14 +1321,14 @@ void wlc_ampdu_macaddr_upd(wlc_info_t *wlc) ...@@ -1324,14 +1321,14 @@ void wlc_ampdu_macaddr_upd(wlc_info_t *wlc)
template); template);
} }
bool wlc_aggregatable(wlc_info_t *wlc, u8 tid) bool wlc_aggregatable(struct wlc_info *wlc, u8 tid)
{ {
return wlc->ampdu->ini_enable[tid]; return wlc->ampdu->ini_enable[tid];
} }
void wlc_ampdu_shm_upd(ampdu_info_t *ampdu) void wlc_ampdu_shm_upd(ampdu_info_t *ampdu)
{ {
wlc_info_t *wlc = ampdu->wlc; struct wlc_info *wlc = ampdu->wlc;
/* Extend ucode internal watchdog timer to match larger received frames */ /* Extend ucode internal watchdog timer to match larger received frames */
if ((ampdu->rx_factor & HT_PARAMS_RX_FACTOR_MASK) == if ((ampdu->rx_factor & HT_PARAMS_RX_FACTOR_MASK) ==
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#ifndef _wlc_ampdu_h_ #ifndef _wlc_ampdu_h_
#define _wlc_ampdu_h_ #define _wlc_ampdu_h_
extern ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc); extern ampdu_info_t *wlc_ampdu_attach(struct wlc_info *wlc);
extern void wlc_ampdu_detach(ampdu_info_t *ampdu); extern void wlc_ampdu_detach(ampdu_info_t *ampdu);
extern bool wlc_ampdu_cap(ampdu_info_t *ampdu); extern bool wlc_ampdu_cap(ampdu_info_t *ampdu);
extern int wlc_ampdu_set(ampdu_info_t *ampdu, bool on); extern int wlc_ampdu_set(ampdu_info_t *ampdu, bool on);
...@@ -26,7 +26,7 @@ extern int wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, ...@@ -26,7 +26,7 @@ extern int wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi,
extern void wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, extern void wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs); struct sk_buff *p, tx_status_t *txs);
extern void wlc_ampdu_reset(ampdu_info_t *ampdu); extern void wlc_ampdu_reset(ampdu_info_t *ampdu);
extern void wlc_ampdu_macaddr_upd(wlc_info_t *wlc); extern void wlc_ampdu_macaddr_upd(struct wlc_info *wlc);
extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu); extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu);
extern u8 wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb, extern u8 wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
......
...@@ -93,7 +93,7 @@ const u8 mimo_2x3_div_antselid_tbl[16] = { ...@@ -93,7 +93,7 @@ const u8 mimo_2x3_div_antselid_tbl[16] = {
0, 0, 0, 0, 0, 0, 0, 0 /* pat to antselid */ 0, 0, 0, 0, 0, 0, 0, 0 /* pat to antselid */
}; };
antsel_info_t *wlc_antsel_attach(wlc_info_t *wlc, struct osl_info *osh, antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc, struct osl_info *osh,
wlc_pub_t *pub, wlc_pub_t *pub,
wlc_hw_info_t *wlc_hw) { wlc_hw_info_t *wlc_hw) {
antsel_info_t *asi; antsel_info_t *asi;
...@@ -297,7 +297,7 @@ static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg) ...@@ -297,7 +297,7 @@ static u16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg)
/* boardlevel antenna selection: ucode interface control */ /* boardlevel antenna selection: ucode interface control */
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel) static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel)
{ {
wlc_info_t *wlc = asi->wlc; struct wlc_info *wlc = asi->wlc;
u8 ant_cfg; u8 ant_cfg;
u16 mimo_antsel; u16 mimo_antsel;
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
#ifndef _wlc_antsel_h_ #ifndef _wlc_antsel_h_
#define _wlc_antsel_h_ #define _wlc_antsel_h_
extern antsel_info_t *wlc_antsel_attach(wlc_info_t *wlc, struct osl_info *osh, extern antsel_info_t *wlc_antsel_attach(struct wlc_info *wlc,
struct osl_info *osh,
wlc_pub_t *pub, wlc_pub_t *pub,
wlc_hw_info_t *wlc_hw); wlc_hw_info_t *wlc_hw);
extern void wlc_antsel_detach(antsel_info_t *asi); extern void wlc_antsel_detach(antsel_info_t *asi);
......
...@@ -113,7 +113,7 @@ static u16 xmtfifo_sz[][NFIFO] = { ...@@ -113,7 +113,7 @@ static u16 xmtfifo_sz[][NFIFO] = {
}; };
static void wlc_clkctl_clk(wlc_hw_info_t *wlc, uint mode); static void wlc_clkctl_clk(wlc_hw_info_t *wlc, uint mode);
static void wlc_coreinit(wlc_info_t *wlc); static void wlc_coreinit(struct wlc_info *wlc);
/* used by wlc_wakeucode_init() */ /* used by wlc_wakeucode_init() */
static void wlc_write_inits(wlc_hw_info_t *wlc_hw, const d11init_t *inits); static void wlc_write_inits(wlc_hw_info_t *wlc_hw, const d11init_t *inits);
...@@ -130,7 +130,7 @@ static bool wlc_bmac_txstatus(wlc_hw_info_t *wlc, bool bound, bool *fatal); ...@@ -130,7 +130,7 @@ static bool wlc_bmac_txstatus(wlc_hw_info_t *wlc, bool bound, bool *fatal);
static bool wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound); static bool wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound);
/* used by wlc_down() */ /* used by wlc_down() */
static void wlc_flushqueues(wlc_info_t *wlc); static void wlc_flushqueues(struct wlc_info *wlc);
static void wlc_write_mhf(wlc_hw_info_t *wlc_hw, u16 *mhfs); static void wlc_write_mhf(wlc_hw_info_t *wlc_hw, u16 *mhfs);
static void wlc_mctrl_reset(wlc_hw_info_t *wlc_hw); static void wlc_mctrl_reset(wlc_hw_info_t *wlc_hw);
...@@ -141,25 +141,25 @@ static u16 wlc_bmac_read_objmem(wlc_hw_info_t *wlc_hw, uint offset, ...@@ -141,25 +141,25 @@ static u16 wlc_bmac_read_objmem(wlc_hw_info_t *wlc_hw, uint offset,
u32 sel); u32 sel);
static void wlc_bmac_write_objmem(wlc_hw_info_t *wlc_hw, uint offset, u16 v, static void wlc_bmac_write_objmem(wlc_hw_info_t *wlc_hw, uint offset, u16 v,
u32 sel); u32 sel);
static bool wlc_bmac_attach_dmapio(wlc_info_t *wlc, uint j, bool wme); static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme);
static void wlc_bmac_detach_dmapio(wlc_hw_info_t *wlc_hw); static void wlc_bmac_detach_dmapio(wlc_hw_info_t *wlc_hw);
static void wlc_ucode_bsinit(wlc_hw_info_t *wlc_hw); static void wlc_ucode_bsinit(wlc_hw_info_t *wlc_hw);
static bool wlc_validboardtype(wlc_hw_info_t *wlc); static bool wlc_validboardtype(wlc_hw_info_t *wlc);
static bool wlc_isgoodchip(wlc_hw_info_t *wlc_hw); static bool wlc_isgoodchip(wlc_hw_info_t *wlc_hw);
static char *wlc_get_macaddr(wlc_hw_info_t *wlc_hw); static char *wlc_get_macaddr(wlc_hw_info_t *wlc_hw);
static void wlc_mhfdef(wlc_info_t *wlc, u16 *mhfs, u16 mhf2_init); static void wlc_mhfdef(struct wlc_info *wlc, u16 *mhfs, u16 mhf2_init);
static void wlc_mctrl_write(wlc_hw_info_t *wlc_hw); static void wlc_mctrl_write(wlc_hw_info_t *wlc_hw);
static void wlc_ucode_mute_override_set(wlc_hw_info_t *wlc_hw); static void wlc_ucode_mute_override_set(wlc_hw_info_t *wlc_hw);
static void wlc_ucode_mute_override_clear(wlc_hw_info_t *wlc_hw); static void wlc_ucode_mute_override_clear(wlc_hw_info_t *wlc_hw);
static u32 wlc_wlintrsoff(wlc_info_t *wlc); static u32 wlc_wlintrsoff(struct wlc_info *wlc);
static void wlc_wlintrsrestore(wlc_info_t *wlc, u32 macintmask); static void wlc_wlintrsrestore(struct wlc_info *wlc, u32 macintmask);
static void wlc_gpio_init(wlc_info_t *wlc); static void wlc_gpio_init(struct wlc_info *wlc);
static void wlc_write_hw_bcntemplate0(wlc_hw_info_t *wlc_hw, void *bcn, static void wlc_write_hw_bcntemplate0(wlc_hw_info_t *wlc_hw, void *bcn,
int len); int len);
static void wlc_write_hw_bcntemplate1(wlc_hw_info_t *wlc_hw, void *bcn, static void wlc_write_hw_bcntemplate1(wlc_hw_info_t *wlc_hw, void *bcn,
int len); int len);
static void wlc_bmac_bsinit(wlc_info_t *wlc, chanspec_t chanspec); static void wlc_bmac_bsinit(struct wlc_info *wlc, chanspec_t chanspec);
static u32 wlc_setband_inact(wlc_info_t *wlc, uint bandunit); static u32 wlc_setband_inact(struct wlc_info *wlc, uint bandunit);
static void wlc_bmac_setband(wlc_hw_info_t *wlc_hw, uint bandunit, static void wlc_bmac_setband(wlc_hw_info_t *wlc_hw, uint bandunit,
chanspec_t chanspec); chanspec_t chanspec);
static void wlc_bmac_update_slot_timing(wlc_hw_info_t *wlc_hw, bool shortslot); static void wlc_bmac_update_slot_timing(wlc_hw_info_t *wlc_hw, bool shortslot);
...@@ -231,7 +231,7 @@ static void WLBANDINITFN(wlc_ucode_bsinit) (wlc_hw_info_t *wlc_hw) ...@@ -231,7 +231,7 @@ static void WLBANDINITFN(wlc_ucode_bsinit) (wlc_hw_info_t *wlc_hw)
} }
/* switch to new band but leave it inactive */ /* switch to new band but leave it inactive */
static u32 WLBANDINITFN(wlc_setband_inact) (wlc_info_t *wlc, uint bandunit) static u32 WLBANDINITFN(wlc_setband_inact) (struct wlc_info *wlc, uint bandunit)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
u32 macintmask; u32 macintmask;
...@@ -322,7 +322,7 @@ wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound) ...@@ -322,7 +322,7 @@ wlc_bmac_recv(wlc_hw_info_t *wlc_hw, uint fifo, bool bound)
* Return true if another dpc needs to be re-scheduled. false otherwise. * Return true if another dpc needs to be re-scheduled. false otherwise.
* Param 'bounded' indicates if applicable loops should be bounded. * Param 'bounded' indicates if applicable loops should be bounded.
*/ */
bool BCMFASTPATH wlc_dpc(wlc_info_t *wlc, bool bounded) bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
{ {
u32 macintstatus; u32 macintstatus;
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
...@@ -451,7 +451,7 @@ bool BCMFASTPATH wlc_dpc(wlc_info_t *wlc, bool bounded) ...@@ -451,7 +451,7 @@ bool BCMFASTPATH wlc_dpc(wlc_info_t *wlc, bool bounded)
/* common low-level watchdog code */ /* common low-level watchdog code */
void wlc_bmac_watchdog(void *arg) void wlc_bmac_watchdog(void *arg)
{ {
wlc_info_t *wlc = (wlc_info_t *) arg; struct wlc_info *wlc = (struct wlc_info *) arg;
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
WL_TRACE(("wl%d: wlc_bmac_watchdog\n", wlc_hw->unit)); WL_TRACE(("wl%d: wlc_bmac_watchdog\n", wlc_hw->unit));
...@@ -564,7 +564,7 @@ int wlc_bmac_state_get(wlc_hw_info_t *wlc_hw, wlc_bmac_state_t *state) ...@@ -564,7 +564,7 @@ int wlc_bmac_state_get(wlc_hw_info_t *wlc_hw, wlc_bmac_state_t *state)
return 0; return 0;
} }
static bool wlc_bmac_attach_dmapio(wlc_info_t *wlc, uint j, bool wme) static bool wlc_bmac_attach_dmapio(struct wlc_info *wlc, uint j, bool wme)
{ {
uint i; uint i;
char name[8]; char name[8];
...@@ -700,7 +700,7 @@ static void wlc_bmac_detach_dmapio(wlc_hw_info_t *wlc_hw) ...@@ -700,7 +700,7 @@ static void wlc_bmac_detach_dmapio(wlc_hw_info_t *wlc_hw)
* initialize software state for each core and band * initialize software state for each core and band
* put the whole chip in reset(driver down state), no clock * put the whole chip in reset(driver down state), no clock
*/ */
int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit, int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device, uint unit,
bool piomode, struct osl_info *osh, void *regsva, bool piomode, struct osl_info *osh, void *regsva,
uint bustype, void *btparam) uint bustype, void *btparam)
{ {
...@@ -1045,7 +1045,7 @@ int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit, ...@@ -1045,7 +1045,7 @@ int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit,
*/ */
void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw) void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw)
{ {
wlc_info_t *wlc = wlc_hw->wlc; struct wlc_info *wlc = wlc_hw->wlc;
/* set default sw macintmask value */ /* set default sw macintmask value */
wlc->defmacintmask = DEF_MACINTMASK; wlc->defmacintmask = DEF_MACINTMASK;
...@@ -1065,7 +1065,7 @@ void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw) ...@@ -1065,7 +1065,7 @@ void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw)
/* /*
* low level detach * low level detach
*/ */
int wlc_bmac_detach(wlc_info_t *wlc) int wlc_bmac_detach(struct wlc_info *wlc)
{ {
uint i; uint i;
wlc_hwband_t *band; wlc_hwband_t *band;
...@@ -1137,7 +1137,7 @@ wlc_bmac_init(wlc_hw_info_t *wlc_hw, chanspec_t chanspec, ...@@ -1137,7 +1137,7 @@ wlc_bmac_init(wlc_hw_info_t *wlc_hw, chanspec_t chanspec,
bool mute) { bool mute) {
u32 macintmask; u32 macintmask;
bool fastclk; bool fastclk;
wlc_info_t *wlc = wlc_hw->wlc; struct wlc_info *wlc = wlc_hw->wlc;
WL_TRACE(("wl%d: wlc_bmac_init\n", wlc_hw->unit)); WL_TRACE(("wl%d: wlc_bmac_init\n", wlc_hw->unit));
...@@ -1349,7 +1349,7 @@ int wlc_bmac_bandtype(wlc_hw_info_t *wlc_hw) ...@@ -1349,7 +1349,7 @@ int wlc_bmac_bandtype(wlc_hw_info_t *wlc_hw)
return wlc_hw->band->bandtype; return wlc_hw->band->bandtype;
} }
void *wlc_cur_phy(wlc_info_t *wlc) void *wlc_cur_phy(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
return (void *)wlc_hw->band->pi; return (void *)wlc_hw->band->pi;
...@@ -1453,7 +1453,7 @@ static void wlc_clkctl_clk(wlc_hw_info_t *wlc_hw, uint mode) ...@@ -1453,7 +1453,7 @@ static void wlc_clkctl_clk(wlc_hw_info_t *wlc_hw, uint mode)
/* set initial host flags value */ /* set initial host flags value */
static void static void
wlc_mhfdef(wlc_info_t *wlc, u16 *mhfs, u16 mhf2_init) wlc_mhfdef(struct wlc_info *wlc, u16 *mhfs, u16 mhf2_init)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
...@@ -1912,7 +1912,7 @@ wlc_bmac_write_hw_bcntemplates(wlc_hw_info_t *wlc_hw, void *bcn, int len, ...@@ -1912,7 +1912,7 @@ wlc_bmac_write_hw_bcntemplates(wlc_hw_info_t *wlc_hw, void *bcn, int len,
static void WLBANDINITFN(wlc_bmac_upd_synthpu) (wlc_hw_info_t *wlc_hw) static void WLBANDINITFN(wlc_bmac_upd_synthpu) (wlc_hw_info_t *wlc_hw)
{ {
u16 v; u16 v;
wlc_info_t *wlc = wlc_hw->wlc; struct wlc_info *wlc = wlc_hw->wlc;
/* update SYNTHPU_DLY */ /* update SYNTHPU_DLY */
if (WLCISLCNPHY(wlc->band)) { if (WLCISLCNPHY(wlc->band)) {
...@@ -1928,7 +1928,7 @@ static void WLBANDINITFN(wlc_bmac_upd_synthpu) (wlc_hw_info_t *wlc_hw) ...@@ -1928,7 +1928,7 @@ static void WLBANDINITFN(wlc_bmac_upd_synthpu) (wlc_hw_info_t *wlc_hw)
/* band-specific init */ /* band-specific init */
static void static void
WLBANDINITFN(wlc_bmac_bsinit) (wlc_info_t *wlc, chanspec_t chanspec) WLBANDINITFN(wlc_bmac_bsinit) (struct wlc_info *wlc, chanspec_t chanspec)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
...@@ -2080,7 +2080,7 @@ void wlc_bmac_phy_reset(wlc_hw_info_t *wlc_hw) ...@@ -2080,7 +2080,7 @@ void wlc_bmac_phy_reset(wlc_hw_info_t *wlc_hw)
static void static void
WLBANDINITFN(wlc_bmac_setband) (wlc_hw_info_t *wlc_hw, uint bandunit, WLBANDINITFN(wlc_bmac_setband) (wlc_hw_info_t *wlc_hw, uint bandunit,
chanspec_t chanspec) { chanspec_t chanspec) {
wlc_info_t *wlc = wlc_hw->wlc; struct wlc_info *wlc = wlc_hw->wlc;
u32 macintmask; u32 macintmask;
ASSERT(NBANDS_HW(wlc_hw) > 1); ASSERT(NBANDS_HW(wlc_hw) > 1);
...@@ -2471,7 +2471,7 @@ static void wlc_corerev_fifofixup(wlc_hw_info_t *wlc_hw) ...@@ -2471,7 +2471,7 @@ static void wlc_corerev_fifofixup(wlc_hw_info_t *wlc_hw)
* config other core registers * config other core registers
* init dma * init dma
*/ */
static void wlc_coreinit(wlc_info_t *wlc) static void wlc_coreinit(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs; d11regs_t *regs;
...@@ -2713,7 +2713,7 @@ void wlc_bmac_switch_macfreq(wlc_hw_info_t *wlc_hw, u8 spurmode) ...@@ -2713,7 +2713,7 @@ void wlc_bmac_switch_macfreq(wlc_hw_info_t *wlc_hw, u8 spurmode)
} }
/* Initialize GPIOs that are controlled by D11 core */ /* Initialize GPIOs that are controlled by D11 core */
static void wlc_gpio_init(wlc_info_t *wlc) static void wlc_gpio_init(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs; d11regs_t *regs;
...@@ -2780,7 +2780,7 @@ static void wlc_gpio_init(wlc_info_t *wlc) ...@@ -2780,7 +2780,7 @@ static void wlc_gpio_init(wlc_info_t *wlc)
static void wlc_ucode_download(wlc_hw_info_t *wlc_hw) static void wlc_ucode_download(wlc_hw_info_t *wlc_hw)
{ {
wlc_info_t *wlc; struct wlc_info *wlc;
wlc = wlc_hw->wlc; wlc = wlc_hw->wlc;
if (wlc_hw->ucode_loaded) if (wlc_hw->ucode_loaded)
...@@ -2960,7 +2960,7 @@ void wlc_bmac_fifoerrors(wlc_hw_info_t *wlc_hw) ...@@ -2960,7 +2960,7 @@ void wlc_bmac_fifoerrors(wlc_hw_info_t *wlc_hw)
} }
} }
void wlc_intrson(wlc_info_t *wlc) void wlc_intrson(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
ASSERT(wlc->defmacintmask); ASSERT(wlc->defmacintmask);
...@@ -2973,7 +2973,7 @@ void wlc_intrson(wlc_info_t *wlc) ...@@ -2973,7 +2973,7 @@ void wlc_intrson(wlc_info_t *wlc)
* but also because per-port code may require sync with valid interrupt. * but also because per-port code may require sync with valid interrupt.
*/ */
static u32 wlc_wlintrsoff(wlc_info_t *wlc) static u32 wlc_wlintrsoff(struct wlc_info *wlc)
{ {
if (!wlc->hw->up) if (!wlc->hw->up)
return 0; return 0;
...@@ -2981,7 +2981,7 @@ static u32 wlc_wlintrsoff(wlc_info_t *wlc) ...@@ -2981,7 +2981,7 @@ static u32 wlc_wlintrsoff(wlc_info_t *wlc)
return wl_intrsoff(wlc->wl); return wl_intrsoff(wlc->wl);
} }
static void wlc_wlintrsrestore(wlc_info_t *wlc, u32 macintmask) static void wlc_wlintrsrestore(struct wlc_info *wlc, u32 macintmask)
{ {
if (!wlc->hw->up) if (!wlc->hw->up)
return; return;
...@@ -2989,7 +2989,7 @@ static void wlc_wlintrsrestore(wlc_info_t *wlc, u32 macintmask) ...@@ -2989,7 +2989,7 @@ static void wlc_wlintrsrestore(wlc_info_t *wlc, u32 macintmask)
wl_intrsrestore(wlc->wl, macintmask); wl_intrsrestore(wlc->wl, macintmask);
} }
u32 wlc_intrsoff(wlc_info_t *wlc) u32 wlc_intrsoff(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
u32 macintmask; u32 macintmask;
...@@ -3008,7 +3008,7 @@ u32 wlc_intrsoff(wlc_info_t *wlc) ...@@ -3008,7 +3008,7 @@ u32 wlc_intrsoff(wlc_info_t *wlc)
return wlc->macintstatus ? 0 : macintmask; return wlc->macintstatus ? 0 : macintmask;
} }
void wlc_intrsrestore(wlc_info_t *wlc, u32 macintmask) void wlc_intrsrestore(struct wlc_info *wlc, u32 macintmask)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
if (!wlc_hw->clk) if (!wlc_hw->clk)
...@@ -3167,7 +3167,7 @@ void wlc_bmac_tx_fifo_resume(wlc_hw_info_t *wlc_hw, uint tx_fifo) ...@@ -3167,7 +3167,7 @@ void wlc_bmac_tx_fifo_resume(wlc_hw_info_t *wlc_hw, uint tx_fifo)
* 0 if the interrupt is not for us, or we are in some special cases; * 0 if the interrupt is not for us, or we are in some special cases;
* device interrupt status bits otherwise. * device interrupt status bits otherwise.
*/ */
static inline u32 wlc_intstatus(wlc_info_t *wlc, bool in_isr) static inline u32 wlc_intstatus(struct wlc_info *wlc, bool in_isr)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs = wlc_hw->regs; d11regs_t *regs = wlc_hw->regs;
...@@ -3257,7 +3257,7 @@ static inline u32 wlc_intstatus(wlc_info_t *wlc, bool in_isr) ...@@ -3257,7 +3257,7 @@ static inline u32 wlc_intstatus(wlc_info_t *wlc, bool in_isr)
/* Update wlc->macintstatus and wlc->intstatus[]. */ /* Update wlc->macintstatus and wlc->intstatus[]. */
/* Return true if they are updated successfully. false otherwise */ /* Return true if they are updated successfully. false otherwise */
bool wlc_intrsupd(wlc_info_t *wlc) bool wlc_intrsupd(struct wlc_info *wlc)
{ {
u32 macintstatus; u32 macintstatus;
...@@ -3282,7 +3282,7 @@ bool wlc_intrsupd(wlc_info_t *wlc) ...@@ -3282,7 +3282,7 @@ bool wlc_intrsupd(wlc_info_t *wlc)
* *wantdpc will be set to true if further wlc_dpc() processing is required, * *wantdpc will be set to true if further wlc_dpc() processing is required,
* false otherwise. * false otherwise.
*/ */
bool BCMFASTPATH wlc_isr(wlc_info_t *wlc, bool *wantdpc) bool BCMFASTPATH wlc_isr(struct wlc_info *wlc, bool *wantdpc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
u32 macintstatus; u32 macintstatus;
...@@ -3371,7 +3371,7 @@ static bool BCMFASTPATH ...@@ -3371,7 +3371,7 @@ static bool BCMFASTPATH
wlc_bmac_txstatus(wlc_hw_info_t *wlc_hw, bool bound, bool *fatal) wlc_bmac_txstatus(wlc_hw_info_t *wlc_hw, bool bound, bool *fatal)
{ {
bool morepending = false; bool morepending = false;
wlc_info_t *wlc = wlc_hw->wlc; struct wlc_info *wlc = wlc_hw->wlc;
WL_TRACE(("wl%d: wlc_bmac_txstatus\n", wlc_hw->unit)); WL_TRACE(("wl%d: wlc_bmac_txstatus\n", wlc_hw->unit));
...@@ -3432,7 +3432,7 @@ wlc_bmac_txstatus(wlc_hw_info_t *wlc_hw, bool bound, bool *fatal) ...@@ -3432,7 +3432,7 @@ wlc_bmac_txstatus(wlc_hw_info_t *wlc_hw, bool bound, bool *fatal)
return morepending; return morepending;
} }
void wlc_suspend_mac_and_wait(wlc_info_t *wlc) void wlc_suspend_mac_and_wait(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs = wlc_hw->regs; d11regs_t *regs = wlc_hw->regs;
...@@ -3496,7 +3496,7 @@ void wlc_suspend_mac_and_wait(wlc_info_t *wlc) ...@@ -3496,7 +3496,7 @@ void wlc_suspend_mac_and_wait(wlc_info_t *wlc)
ASSERT(!(mc & MCTL_EN_MAC)); ASSERT(!(mc & MCTL_EN_MAC));
} }
void wlc_enable_mac(wlc_info_t *wlc) void wlc_enable_mac(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
d11regs_t *regs = wlc_hw->regs; d11regs_t *regs = wlc_hw->regs;
...@@ -3872,7 +3872,7 @@ void wlc_bmac_xtal(wlc_hw_info_t *wlc_hw, bool want) ...@@ -3872,7 +3872,7 @@ void wlc_bmac_xtal(wlc_hw_info_t *wlc_hw, bool want)
} }
} }
static void wlc_flushqueues(wlc_info_t *wlc) static void wlc_flushqueues(struct wlc_info *wlc)
{ {
wlc_hw_info_t *wlc_hw = wlc->hw; wlc_hw_info_t *wlc_hw = wlc->hw;
uint i; uint i;
......
...@@ -57,7 +57,7 @@ typedef struct wlc_bmac_revinfo { ...@@ -57,7 +57,7 @@ typedef struct wlc_bmac_revinfo {
} band[MAXBANDS]; } band[MAXBANDS];
} wlc_bmac_revinfo_t; } wlc_bmac_revinfo_t;
/* dup state between BMAC(wlc_hw_info_t) and HIGH(wlc_info_t) driver */ /* dup state between BMAC(wlc_hw_info_t) and HIGH(struct wlc_info) driver */
typedef struct wlc_bmac_state { typedef struct wlc_bmac_state {
u32 machwcap; /* mac hw capibility */ u32 machwcap; /* mac hw capibility */
u32 preamble_ovr; /* preamble override */ u32 preamble_ovr; /* preamble override */
...@@ -130,10 +130,10 @@ typedef enum { ...@@ -130,10 +130,10 @@ typedef enum {
WLCHW_STATE_LAST WLCHW_STATE_LAST
} wlc_bmac_state_id_t; } wlc_bmac_state_id_t;
extern int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, extern int wlc_bmac_attach(struct wlc_info *wlc, u16 vendor, u16 device,
uint unit, bool piomode, struct osl_info *osh, uint unit, bool piomode, struct osl_info *osh,
void *regsva, uint bustype, void *btparam); void *regsva, uint bustype, void *btparam);
extern int wlc_bmac_detach(wlc_info_t *wlc); extern int wlc_bmac_detach(struct wlc_info *wlc);
extern void wlc_bmac_watchdog(void *arg); extern void wlc_bmac_watchdog(void *arg);
extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw); extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw);
......
...@@ -34,7 +34,8 @@ typedef struct wlc_bsscfg wlc_bsscfg_t; ...@@ -34,7 +34,8 @@ typedef struct wlc_bsscfg wlc_bsscfg_t;
#define MAXMACLIST 64 /* max # source MAC matches */ #define MAXMACLIST 64 /* max # source MAC matches */
#define BCN_TEMPLATE_COUNT 2 #define BCN_TEMPLATE_COUNT 2
/* Iterator for "associated" STA bss configs: (wlc_info_t *wlc, int idx, wlc_bsscfg_t *cfg) */ /* Iterator for "associated" STA bss configs:
(struct wlc_info *wlc, int idx, wlc_bsscfg_t *cfg) */
#define FOREACH_AS_STA(wlc, idx, cfg) \ #define FOREACH_AS_STA(wlc, idx, cfg) \
for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \ for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \
if ((cfg = (wlc)->bsscfg[idx]) && BSSCFG_STA(cfg) && cfg->associated) if ((cfg = (wlc)->bsscfg[idx]) && BSSCFG_STA(cfg) && cfg->associated)
......
...@@ -45,7 +45,7 @@ typedef struct wlc_cm_band { ...@@ -45,7 +45,7 @@ typedef struct wlc_cm_band {
struct wlc_cm_info { struct wlc_cm_info {
wlc_pub_t *pub; wlc_pub_t *pub;
wlc_info_t *wlc; struct wlc_info *wlc;
char srom_ccode[WLC_CNTRY_BUF_SZ]; /* Country Code in SROM */ char srom_ccode[WLC_CNTRY_BUF_SZ]; /* Country Code in SROM */
uint srom_regrev; /* Regulatory Rev for the SROM ccode */ uint srom_regrev; /* Regulatory Rev for the SROM ccode */
const country_info_t *country; /* current country def */ const country_info_t *country; /* current country def */
...@@ -606,7 +606,7 @@ const locale_mimo_info_t *wlc_get_mimo_5g(u8 locale_idx) ...@@ -606,7 +606,7 @@ const locale_mimo_info_t *wlc_get_mimo_5g(u8 locale_idx)
return g_mimo_5g_table[locale_idx]; return g_mimo_5g_table[locale_idx];
} }
wlc_cm_info_t *wlc_channel_mgr_attach(wlc_info_t *wlc) wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc)
{ {
wlc_cm_info_t *wlc_cm; wlc_cm_info_t *wlc_cm;
char country_abbrev[WLC_CNTRY_BUF_SZ]; char country_abbrev[WLC_CNTRY_BUF_SZ];
...@@ -664,7 +664,7 @@ const char *wlc_channel_country_abbrev(wlc_cm_info_t *wlc_cm) ...@@ -664,7 +664,7 @@ const char *wlc_channel_country_abbrev(wlc_cm_info_t *wlc_cm)
u8 wlc_channel_locale_flags(wlc_cm_info_t *wlc_cm) u8 wlc_channel_locale_flags(wlc_cm_info_t *wlc_cm)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
return wlc_cm->bandstate[wlc->band->bandunit].locale_flags; return wlc_cm->bandstate[wlc->band->bandunit].locale_flags;
} }
...@@ -755,7 +755,7 @@ wlc_set_country_common(wlc_cm_info_t *wlc_cm, ...@@ -755,7 +755,7 @@ wlc_set_country_common(wlc_cm_info_t *wlc_cm,
{ {
const locale_mimo_info_t *li_mimo; const locale_mimo_info_t *li_mimo;
const locale_info_t *locale; const locale_info_t *locale;
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
char prev_country_abbrev[WLC_CNTRY_BUF_SZ]; char prev_country_abbrev[WLC_CNTRY_BUF_SZ];
ASSERT(country != NULL); ASSERT(country != NULL);
...@@ -819,7 +819,7 @@ static const country_info_t *wlc_countrycode_map(wlc_cm_info_t *wlc_cm, ...@@ -819,7 +819,7 @@ static const country_info_t *wlc_countrycode_map(wlc_cm_info_t *wlc_cm,
char *mapped_ccode, char *mapped_ccode,
uint *mapped_regrev) uint *mapped_regrev)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
const country_info_t *country; const country_info_t *country;
uint srom_regrev = wlc_cm->srom_regrev; uint srom_regrev = wlc_cm->srom_regrev;
const char *srom_ccode = wlc_cm->srom_ccode; const char *srom_ccode = wlc_cm->srom_ccode;
...@@ -903,7 +903,7 @@ static const country_info_t *wlc_country_lookup_direct(const char *ccode, ...@@ -903,7 +903,7 @@ static const country_info_t *wlc_country_lookup_direct(const char *ccode,
static int static int
wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country) wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
uint i, j; uint i, j;
wlcband_t *band; wlcband_t *band;
const locale_info_t *li; const locale_info_t *li;
...@@ -957,7 +957,7 @@ wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country) ...@@ -957,7 +957,7 @@ wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country)
*/ */
static void wlc_channels_commit(wlc_cm_info_t *wlc_cm) static void wlc_channels_commit(wlc_cm_info_t *wlc_cm)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
uint chan; uint chan;
struct txpwr_limits txpwr; struct txpwr_limits txpwr;
...@@ -1003,7 +1003,7 @@ static void wlc_channels_commit(wlc_cm_info_t *wlc_cm) ...@@ -1003,7 +1003,7 @@ static void wlc_channels_commit(wlc_cm_info_t *wlc_cm)
/* reset the quiet channels vector to the union of the restricted and radar channel sets */ /* reset the quiet channels vector to the union of the restricted and radar channel sets */
void wlc_quiet_channels_reset(wlc_cm_info_t *wlc_cm) void wlc_quiet_channels_reset(wlc_cm_info_t *wlc_cm)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
uint i, j; uint i, j;
wlcband_t *band; wlcband_t *band;
const chanvec_t *chanvec; const chanvec_t *chanvec;
...@@ -1041,7 +1041,7 @@ bool wlc_quiet_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chspec) ...@@ -1041,7 +1041,7 @@ bool wlc_quiet_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chspec)
*/ */
bool wlc_valid_channel20_db(wlc_cm_info_t *wlc_cm, uint val) bool wlc_valid_channel20_db(wlc_cm_info_t *wlc_cm, uint val)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
return VALID_CHANNEL20(wlc, val) || return VALID_CHANNEL20(wlc, val) ||
(!wlc->bandlocked (!wlc->bandlocked
...@@ -1059,7 +1059,7 @@ wlc_valid_channel20_in_band(wlc_cm_info_t *wlc_cm, uint bandunit, uint val) ...@@ -1059,7 +1059,7 @@ wlc_valid_channel20_in_band(wlc_cm_info_t *wlc_cm, uint bandunit, uint val)
/* Is the channel valid for the current locale and current band? */ /* Is the channel valid for the current locale and current band? */
bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val) bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
return ((val < MAXCHANNEL) && return ((val < MAXCHANNEL) &&
isset(wlc_cm->bandstate[wlc->band->bandunit].valid_channels.vec, isset(wlc_cm->bandstate[wlc->band->bandunit].valid_channels.vec,
...@@ -1069,7 +1069,7 @@ bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val) ...@@ -1069,7 +1069,7 @@ bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val)
/* Is the 40 MHz allowed for the current locale and specified band? */ /* Is the 40 MHz allowed for the current locale and specified band? */
bool wlc_valid_40chanspec_in_band(wlc_cm_info_t *wlc_cm, uint bandunit) bool wlc_valid_40chanspec_in_band(wlc_cm_info_t *wlc_cm, uint bandunit)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
return (((wlc_cm->bandstate[bandunit]. return (((wlc_cm->bandstate[bandunit].
locale_flags & (WLC_NO_MIMO | WLC_NO_40MHZ)) == 0) locale_flags & (WLC_NO_MIMO | WLC_NO_40MHZ)) == 0)
...@@ -1167,7 +1167,7 @@ void ...@@ -1167,7 +1167,7 @@ void
wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec, wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
u8 local_constraint_qdbm) u8 local_constraint_qdbm)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
struct txpwr_limits txpwr; struct txpwr_limits txpwr;
wlc_channel_reg_limits(wlc_cm, chanspec, &txpwr); wlc_channel_reg_limits(wlc_cm, chanspec, &txpwr);
...@@ -1184,7 +1184,7 @@ int ...@@ -1184,7 +1184,7 @@ int
wlc_channel_set_txpower_limit(wlc_cm_info_t *wlc_cm, wlc_channel_set_txpower_limit(wlc_cm_info_t *wlc_cm,
u8 local_constraint_qdbm) u8 local_constraint_qdbm)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
struct txpwr_limits txpwr; struct txpwr_limits txpwr;
wlc_channel_reg_limits(wlc_cm, wlc->chanspec, &txpwr); wlc_channel_reg_limits(wlc_cm, wlc->chanspec, &txpwr);
...@@ -1304,7 +1304,7 @@ void ...@@ -1304,7 +1304,7 @@ void
wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec, wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
txpwr_limits_t *txpwr) txpwr_limits_t *txpwr)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
uint i; uint i;
uint chan; uint chan;
int maxpwr; int maxpwr;
...@@ -1533,7 +1533,7 @@ static bool wlc_japan_ccode(const char *ccode) ...@@ -1533,7 +1533,7 @@ static bool wlc_japan_ccode(const char *ccode)
static bool static bool
wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband) wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband)
{ {
wlc_info_t *wlc = wlc_cm->wlc; struct wlc_info *wlc = wlc_cm->wlc;
u8 channel = CHSPEC_CHANNEL(chspec); u8 channel = CHSPEC_CHANNEL(chspec);
/* check the chanspec */ /* check the chanspec */
......
...@@ -38,7 +38,7 @@ extern int wlc_eventq_query_ind(wlc_eventq_t *eq, void *bitvect); ...@@ -38,7 +38,7 @@ extern int wlc_eventq_query_ind(wlc_eventq_t *eq, void *bitvect);
extern int wlc_eventq_test_ind(wlc_eventq_t *eq, int et); extern int wlc_eventq_test_ind(wlc_eventq_t *eq, int et);
extern int wlc_eventq_set_ind(wlc_eventq_t *eq, uint et, bool on); extern int wlc_eventq_set_ind(wlc_eventq_t *eq, uint et, bool on);
extern void wlc_eventq_flush(wlc_eventq_t *eq); extern void wlc_eventq_flush(wlc_eventq_t *eq);
extern void wlc_assign_event_msg(wlc_info_t *wlc, wl_event_msg_t *msg, extern void wlc_assign_event_msg(struct wlc_info *wlc, wl_event_msg_t *msg,
const wlc_event_t *e, u8 *data, const wlc_event_t *e, u8 *data,
u32 len); u32 len);
......
...@@ -120,7 +120,7 @@ uint wl_msg_level = ...@@ -120,7 +120,7 @@ uint wl_msg_level =
#ifdef BCMDBG #ifdef BCMDBG
/* pointer to most recently allocated wl/wlc */ /* pointer to most recently allocated wl/wlc */
static wlc_info_t *wlc_info_dbg = (wlc_info_t *) (NULL); static struct wlc_info *wlc_info_dbg = (struct wlc_info *) (NULL);
#endif #endif
/* IOVar table */ /* IOVar table */
...@@ -221,7 +221,7 @@ static const u8 acbitmap2maxprio[] = { ...@@ -221,7 +221,7 @@ static const u8 acbitmap2maxprio[] = {
#define WLC_REPLAY_CNTRS_VALUE WPA_CAP_16_REPLAY_CNTRS #define WLC_REPLAY_CNTRS_VALUE WPA_CAP_16_REPLAY_CNTRS
/* local prototypes */ /* local prototypes */
static u16 BCMFASTPATH wlc_d11hdrs_mac80211(wlc_info_t *wlc, static u16 BCMFASTPATH wlc_d11hdrs_mac80211(struct wlc_info *wlc,
struct ieee80211_hw *hw, struct ieee80211_hw *hw,
struct sk_buff *p, struct sk_buff *p,
struct scb *scb, uint frag, struct scb *scb, uint frag,
...@@ -230,76 +230,76 @@ static u16 BCMFASTPATH wlc_d11hdrs_mac80211(wlc_info_t *wlc, ...@@ -230,76 +230,76 @@ static u16 BCMFASTPATH wlc_d11hdrs_mac80211(wlc_info_t *wlc,
wsec_key_t *key, wsec_key_t *key,
ratespec_t rspec_override); ratespec_t rspec_override);
static void wlc_bss_default_init(wlc_info_t *wlc); static void wlc_bss_default_init(struct wlc_info *wlc);
static void wlc_ucode_mac_upd(wlc_info_t *wlc); static void wlc_ucode_mac_upd(struct wlc_info *wlc);
static ratespec_t mac80211_wlc_set_nrate(wlc_info_t *wlc, wlcband_t *cur_band, static ratespec_t mac80211_wlc_set_nrate(struct wlc_info *wlc,
u32 int_val); wlcband_t *cur_band, u32 int_val);
static void wlc_tx_prec_map_init(wlc_info_t *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);
static int wlc_set_rateset(wlc_info_t *wlc, wlc_rateset_t *rs_arg); static int wlc_set_rateset(struct wlc_info *wlc, wlc_rateset_t *rs_arg);
static int wlc_iovar_rangecheck(wlc_info_t *wlc, u32 val, static int wlc_iovar_rangecheck(struct wlc_info *wlc, u32 val,
const bcm_iovar_t *vi); const bcm_iovar_t *vi);
static u8 wlc_local_constraint_qdbm(wlc_info_t *wlc); static u8 wlc_local_constraint_qdbm(struct wlc_info *wlc);
/* send and receive */ /* send and receive */
static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, struct osl_info *osh); static wlc_txq_info_t *wlc_txq_alloc(struct wlc_info *wlc,
static void wlc_txq_free(wlc_info_t *wlc, struct osl_info *osh, struct osl_info *osh);
static void wlc_txq_free(struct wlc_info *wlc, struct osl_info *osh,
wlc_txq_info_t *qi); wlc_txq_info_t *qi);
static void wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi, static void wlc_txflowcontrol_signal(struct wlc_info *wlc, wlc_txq_info_t *qi,
bool on, int prio); bool on, int prio);
static void wlc_txflowcontrol_reset(wlc_info_t *wlc); static void wlc_txflowcontrol_reset(struct wlc_info *wlc);
static u16 wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, static u16 wlc_compute_airtime(struct wlc_info *wlc, ratespec_t rspec,
uint length); uint length);
static void wlc_compute_cck_plcp(ratespec_t rate, uint length, u8 *plcp); static void wlc_compute_cck_plcp(ratespec_t rate, uint length, u8 *plcp);
static void wlc_compute_ofdm_plcp(ratespec_t rate, uint length, u8 *plcp); static void wlc_compute_ofdm_plcp(ratespec_t rate, uint length, u8 *plcp);
static void wlc_compute_mimo_plcp(ratespec_t rate, uint length, u8 *plcp); static void wlc_compute_mimo_plcp(ratespec_t rate, uint length, u8 *plcp);
static u16 wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, static u16 wlc_compute_frame_dur(struct wlc_info *wlc, ratespec_t rate,
u8 preamble_type, uint next_frag_len); u8 preamble_type, uint next_frag_len);
static void wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh, static void wlc_recvctl(struct wlc_info *wlc, struct osl_info *osh,
struct sk_buff *p); d11rxhdr_t *rxh, struct sk_buff *p);
static uint wlc_calc_frame_len(wlc_info_t *wlc, ratespec_t rate, static uint wlc_calc_frame_len(struct wlc_info *wlc, ratespec_t rate,
u8 preamble_type, uint dur); u8 preamble_type, uint dur);
static uint wlc_calc_ack_time(wlc_info_t *wlc, ratespec_t rate, static uint wlc_calc_ack_time(struct wlc_info *wlc, ratespec_t rate,
u8 preamble_type); u8 preamble_type);
static uint wlc_calc_cts_time(wlc_info_t *wlc, ratespec_t rate, static uint wlc_calc_cts_time(struct wlc_info *wlc, ratespec_t rate,
u8 preamble_type); u8 preamble_type);
/* interrupt, up/down, band */ /* interrupt, up/down, band */
static void wlc_setband(wlc_info_t *wlc, uint bandunit); static void wlc_setband(struct wlc_info *wlc, uint bandunit);
static chanspec_t wlc_init_chanspec(wlc_info_t *wlc); static chanspec_t wlc_init_chanspec(struct wlc_info *wlc);
static void wlc_bandinit_ordered(wlc_info_t *wlc, chanspec_t chanspec); static void wlc_bandinit_ordered(struct wlc_info *wlc, chanspec_t chanspec);
static void wlc_bsinit(wlc_info_t *wlc); static void wlc_bsinit(struct wlc_info *wlc);
static int wlc_duty_cycle_set(wlc_info_t *wlc, int duty_cycle, bool isOFDM, static int wlc_duty_cycle_set(struct wlc_info *wlc, int duty_cycle, bool isOFDM,
bool writeToShm); bool writeToShm);
static void wlc_radio_hwdisable_upd(wlc_info_t *wlc); static void wlc_radio_hwdisable_upd(struct wlc_info *wlc);
static bool wlc_radio_monitor_start(wlc_info_t *wlc); static bool wlc_radio_monitor_start(struct wlc_info *wlc);
static void wlc_radio_timer(void *arg); static void wlc_radio_timer(void *arg);
static void wlc_radio_enable(wlc_info_t *wlc); static void wlc_radio_enable(struct wlc_info *wlc);
static void wlc_radio_upd(wlc_info_t *wlc); static void wlc_radio_upd(struct wlc_info *wlc);
/* scan, association, BSS */ /* scan, association, BSS */
static uint wlc_calc_ba_time(wlc_info_t *wlc, ratespec_t rate, static uint wlc_calc_ba_time(struct wlc_info *wlc, ratespec_t rate,
u8 preamble_type); u8 preamble_type);
static void wlc_update_mimo_band_bwcap(wlc_info_t *wlc, u8 bwcap); static void wlc_update_mimo_band_bwcap(struct wlc_info *wlc, u8 bwcap);
static void wlc_ht_update_sgi_rx(wlc_info_t *wlc, int val); static void wlc_ht_update_sgi_rx(struct wlc_info *wlc, int val);
void wlc_ht_mimops_cap_update(wlc_info_t *wlc, u8 mimops_mode); static void wlc_ht_update_ldpc(struct wlc_info *wlc, s8 val);
static void wlc_ht_update_ldpc(wlc_info_t *wlc, s8 val); static void wlc_war16165(struct wlc_info *wlc, bool tx);
static void wlc_war16165(wlc_info_t *wlc, bool tx);
static void wlc_process_eventq(void *arg); static void wlc_process_eventq(void *arg);
static void wlc_wme_retries_write(wlc_info_t *wlc); static void wlc_wme_retries_write(struct wlc_info *wlc);
static bool wlc_attach_stf_ant_init(wlc_info_t *wlc); static bool wlc_attach_stf_ant_init(struct wlc_info *wlc);
static uint wlc_attach_module(wlc_info_t *wlc); static uint wlc_attach_module(struct wlc_info *wlc);
static void wlc_detach_module(wlc_info_t *wlc); static void wlc_detach_module(struct wlc_info *wlc);
static void wlc_timers_deinit(wlc_info_t *wlc); static void wlc_timers_deinit(struct wlc_info *wlc);
static void wlc_down_led_upd(wlc_info_t *wlc); static void wlc_down_led_upd(struct wlc_info *wlc);
static uint wlc_down_del_timer(wlc_info_t *wlc); static uint wlc_down_del_timer(struct wlc_info *wlc);
static void wlc_ofdm_rateset_war(wlc_info_t *wlc); static void wlc_ofdm_rateset_war(struct wlc_info *wlc);
static int _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, static int _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
struct wlc_if *wlcif); struct wlc_if *wlcif);
#if defined(BCMDBG) #if defined(BCMDBG)
void wlc_get_rcmta(wlc_info_t *wlc, int idx, struct ether_addr *addr) void wlc_get_rcmta(struct wlc_info *wlc, int idx, struct ether_addr *addr)
{ {
d11regs_t *regs = wlc->regs; d11regs_t *regs = wlc->regs;
u32 v32; u32 v32;
...@@ -327,14 +327,14 @@ void wlc_get_rcmta(wlc_info_t *wlc, int idx, struct ether_addr *addr) ...@@ -327,14 +327,14 @@ void wlc_get_rcmta(wlc_info_t *wlc, int idx, struct ether_addr *addr)
#endif /* defined(BCMDBG) */ #endif /* defined(BCMDBG) */
/* keep the chip awake if needed */ /* keep the chip awake if needed */
bool wlc_stay_awake(wlc_info_t *wlc) bool wlc_stay_awake(struct wlc_info *wlc)
{ {
return true; return true;
} }
/* conditions under which the PM bit should be set in outgoing frames and STAY_AWAKE is meaningful /* conditions under which the PM bit should be set in outgoing frames and STAY_AWAKE is meaningful
*/ */
bool wlc_ps_allowed(wlc_info_t *wlc) bool wlc_ps_allowed(struct wlc_info *wlc)
{ {
int idx; int idx;
wlc_bsscfg_t *cfg; wlc_bsscfg_t *cfg;
...@@ -361,7 +361,7 @@ bool wlc_ps_allowed(wlc_info_t *wlc) ...@@ -361,7 +361,7 @@ bool wlc_ps_allowed(wlc_info_t *wlc)
return true; return true;
} }
void wlc_reset(wlc_info_t *wlc) void wlc_reset(struct wlc_info *wlc)
{ {
WL_TRACE(("wl%d: wlc_reset\n", wlc->pub->unit)); WL_TRACE(("wl%d: wlc_reset\n", wlc->pub->unit));
...@@ -382,7 +382,7 @@ void wlc_reset(wlc_info_t *wlc) ...@@ -382,7 +382,7 @@ void wlc_reset(wlc_info_t *wlc)
} }
void wlc_fatal_error(wlc_info_t *wlc) void wlc_fatal_error(struct wlc_info *wlc)
{ {
WL_ERROR(("wl%d: fatal error, reinitializing\n", wlc->pub->unit)); WL_ERROR(("wl%d: fatal error, reinitializing\n", wlc->pub->unit));
wl_init(wlc->wl); wl_init(wlc->wl);
...@@ -393,7 +393,7 @@ void wlc_fatal_error(wlc_info_t *wlc) ...@@ -393,7 +393,7 @@ void wlc_fatal_error(wlc_info_t *wlc)
* if other configurations are in conflict (bandlocked, 11n mode disabled, * if other configurations are in conflict (bandlocked, 11n mode disabled,
* invalid channel for current country, etc.) * invalid channel for current country, etc.)
*/ */
static chanspec_t wlc_init_chanspec(wlc_info_t *wlc) static chanspec_t wlc_init_chanspec(struct wlc_info *wlc)
{ {
chanspec_t chanspec = chanspec_t chanspec =
1 | WL_CHANSPEC_BW_20 | WL_CHANSPEC_CTL_SB_NONE | 1 | WL_CHANSPEC_BW_20 | WL_CHANSPEC_CTL_SB_NONE |
...@@ -409,7 +409,7 @@ static chanspec_t wlc_init_chanspec(wlc_info_t *wlc) ...@@ -409,7 +409,7 @@ static chanspec_t wlc_init_chanspec(wlc_info_t *wlc)
struct scb global_scb; struct scb global_scb;
static void wlc_init_scb(wlc_info_t *wlc, struct scb *scb) static void wlc_init_scb(struct wlc_info *wlc, struct scb *scb)
{ {
int i; int i;
scb->flags = SCB_WMECAP | SCB_HTCAP; scb->flags = SCB_WMECAP | SCB_HTCAP;
...@@ -417,7 +417,7 @@ static void wlc_init_scb(wlc_info_t *wlc, struct scb *scb) ...@@ -417,7 +417,7 @@ static void wlc_init_scb(wlc_info_t *wlc, struct scb *scb)
scb->seqnum[i] = 0; scb->seqnum[i] = 0;
} }
void wlc_init(wlc_info_t *wlc) void wlc_init(struct wlc_info *wlc)
{ {
d11regs_t *regs; d11regs_t *regs;
chanspec_t chanspec; chanspec_t chanspec;
...@@ -551,13 +551,13 @@ void wlc_init(wlc_info_t *wlc) ...@@ -551,13 +551,13 @@ void wlc_init(wlc_info_t *wlc)
} }
} }
void wlc_mac_bcn_promisc_change(wlc_info_t *wlc, bool promisc) void wlc_mac_bcn_promisc_change(struct wlc_info *wlc, bool promisc)
{ {
wlc->bcnmisc_monitor = promisc; wlc->bcnmisc_monitor = promisc;
wlc_mac_bcn_promisc(wlc); wlc_mac_bcn_promisc(wlc);
} }
void wlc_mac_bcn_promisc(wlc_info_t *wlc) void wlc_mac_bcn_promisc(struct wlc_info *wlc)
{ {
if ((AP_ENAB(wlc->pub) && (N_ENAB(wlc->pub) || wlc->band->gmode)) || if ((AP_ENAB(wlc->pub) && (N_ENAB(wlc->pub) || wlc->band->gmode)) ||
wlc->bcnmisc_ibss || wlc->bcnmisc_scan || wlc->bcnmisc_monitor) wlc->bcnmisc_ibss || wlc->bcnmisc_scan || wlc->bcnmisc_monitor)
...@@ -567,7 +567,7 @@ void wlc_mac_bcn_promisc(wlc_info_t *wlc) ...@@ -567,7 +567,7 @@ void wlc_mac_bcn_promisc(wlc_info_t *wlc)
} }
/* set or clear maccontrol bits MCTL_PROMISC and MCTL_KEEPCONTROL */ /* set or clear maccontrol bits MCTL_PROMISC and MCTL_KEEPCONTROL */
void wlc_mac_promisc(wlc_info_t *wlc) void wlc_mac_promisc(struct wlc_info *wlc)
{ {
u32 promisc_bits = 0; u32 promisc_bits = 0;
...@@ -589,7 +589,7 @@ void wlc_mac_promisc(wlc_info_t *wlc) ...@@ -589,7 +589,7 @@ void wlc_mac_promisc(wlc_info_t *wlc)
} }
/* check if hps and wake states of sw and hw are in sync */ /* check if hps and wake states of sw and hw are in sync */
bool wlc_ps_check(wlc_info_t *wlc) bool wlc_ps_check(struct wlc_info *wlc)
{ {
bool res = true; bool res = true;
bool hps, wake; bool hps, wake;
...@@ -637,7 +637,7 @@ bool wlc_ps_check(wlc_info_t *wlc) ...@@ -637,7 +637,7 @@ bool wlc_ps_check(wlc_info_t *wlc)
} }
/* push sw hps and wake state through hardware */ /* push sw hps and wake state through hardware */
void wlc_set_ps_ctrl(wlc_info_t *wlc) void wlc_set_ps_ctrl(struct wlc_info *wlc)
{ {
u32 v1, v2; u32 v1, v2;
bool hps, wake; bool hps, wake;
...@@ -672,7 +672,7 @@ void wlc_set_ps_ctrl(wlc_info_t *wlc) ...@@ -672,7 +672,7 @@ void wlc_set_ps_ctrl(wlc_info_t *wlc)
int wlc_set_mac(wlc_bsscfg_t *cfg) int wlc_set_mac(wlc_bsscfg_t *cfg)
{ {
int err = 0; int err = 0;
wlc_info_t *wlc = cfg->wlc; struct wlc_info *wlc = cfg->wlc;
if (cfg == wlc->cfg) { if (cfg == wlc->cfg) {
/* enter the MAC addr into the RXE match registers */ /* enter the MAC addr into the RXE match registers */
...@@ -689,7 +689,7 @@ int wlc_set_mac(wlc_bsscfg_t *cfg) ...@@ -689,7 +689,7 @@ int wlc_set_mac(wlc_bsscfg_t *cfg)
*/ */
void wlc_set_bssid(wlc_bsscfg_t *cfg) void wlc_set_bssid(wlc_bsscfg_t *cfg)
{ {
wlc_info_t *wlc = cfg->wlc; struct wlc_info *wlc = cfg->wlc;
/* if primary config, we need to update BSSID in RXE match registers */ /* if primary config, we need to update BSSID in RXE match registers */
if (cfg == wlc->cfg) { if (cfg == wlc->cfg) {
...@@ -706,7 +706,7 @@ void wlc_set_bssid(wlc_bsscfg_t *cfg) ...@@ -706,7 +706,7 @@ void wlc_set_bssid(wlc_bsscfg_t *cfg)
* Suspend the the MAC and update the slot timing * Suspend the the MAC and update the slot timing
* for standard 11b/g (20us slots) or shortslot 11g (9us slots). * for standard 11b/g (20us slots) or shortslot 11g (9us slots).
*/ */
void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot) void wlc_switch_shortslot(struct wlc_info *wlc, bool shortslot)
{ {
int idx; int idx;
wlc_bsscfg_t *cfg; wlc_bsscfg_t *cfg;
...@@ -734,7 +734,7 @@ void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot) ...@@ -734,7 +734,7 @@ void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot)
wlc_bmac_set_shortslot(wlc->hw, shortslot); wlc_bmac_set_shortslot(wlc->hw, shortslot);
} }
static u8 wlc_local_constraint_qdbm(wlc_info_t *wlc) static u8 wlc_local_constraint_qdbm(struct wlc_info *wlc)
{ {
u8 local; u8 local;
s16 local_max; s16 local_max;
...@@ -761,7 +761,7 @@ static u8 wlc_local_constraint_qdbm(wlc_info_t *wlc) ...@@ -761,7 +761,7 @@ static u8 wlc_local_constraint_qdbm(wlc_info_t *wlc)
} }
/* propagate home chanspec to all bsscfgs in case bsscfg->current_bss->chanspec is referenced */ /* propagate home chanspec to all bsscfgs in case bsscfg->current_bss->chanspec is referenced */
void wlc_set_home_chanspec(wlc_info_t *wlc, chanspec_t chanspec) void wlc_set_home_chanspec(struct wlc_info *wlc, chanspec_t chanspec)
{ {
if (wlc->home_chanspec != chanspec) { if (wlc->home_chanspec != chanspec) {
int idx; int idx;
...@@ -779,7 +779,7 @@ void wlc_set_home_chanspec(wlc_info_t *wlc, chanspec_t chanspec) ...@@ -779,7 +779,7 @@ void wlc_set_home_chanspec(wlc_info_t *wlc, chanspec_t chanspec)
} }
} }
static void wlc_set_phy_chanspec(wlc_info_t *wlc, chanspec_t chanspec) static void wlc_set_phy_chanspec(struct wlc_info *wlc, chanspec_t chanspec)
{ {
/* Save our copy of the chanspec */ /* Save our copy of the chanspec */
wlc->chanspec = chanspec; wlc->chanspec = chanspec;
...@@ -798,7 +798,7 @@ static void wlc_set_phy_chanspec(wlc_info_t *wlc, chanspec_t chanspec) ...@@ -798,7 +798,7 @@ static void wlc_set_phy_chanspec(wlc_info_t *wlc, chanspec_t chanspec)
} }
void wlc_set_chanspec(wlc_info_t *wlc, chanspec_t chanspec) void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec)
{ {
uint bandunit; uint bandunit;
bool switchband = false; bool switchband = false;
...@@ -853,7 +853,7 @@ void wlc_set_chanspec(wlc_info_t *wlc, chanspec_t chanspec) ...@@ -853,7 +853,7 @@ void wlc_set_chanspec(wlc_info_t *wlc, chanspec_t chanspec)
} }
#if defined(BCMDBG) #if defined(BCMDBG)
static int wlc_get_current_txpwr(wlc_info_t *wlc, void *pwr, uint len) static int wlc_get_current_txpwr(struct wlc_info *wlc, void *pwr, uint len)
{ {
txpwr_limits_t txpwr; txpwr_limits_t txpwr;
tx_power_t power; tx_power_t power;
...@@ -1022,7 +1022,7 @@ static int wlc_get_current_txpwr(wlc_info_t *wlc, void *pwr, uint len) ...@@ -1022,7 +1022,7 @@ static int wlc_get_current_txpwr(wlc_info_t *wlc, void *pwr, uint len)
} }
#endif /* defined(BCMDBG) */ #endif /* defined(BCMDBG) */
static u32 wlc_watchdog_backup_bi(wlc_info_t *wlc) static u32 wlc_watchdog_backup_bi(struct wlc_info *wlc)
{ {
u32 bi; u32 bi;
bi = 2 * wlc->cfg->current_bss->dtim_period * bi = 2 * wlc->cfg->current_bss->dtim_period *
...@@ -1041,7 +1041,7 @@ static u32 wlc_watchdog_backup_bi(wlc_info_t *wlc) ...@@ -1041,7 +1041,7 @@ static u32 wlc_watchdog_backup_bi(wlc_info_t *wlc)
/* Change to run the watchdog either from a periodic timer or from tbtt handler. /* Change to run the watchdog either from a periodic timer or from tbtt handler.
* Call watchdog from tbtt handler if tbtt is true, watchdog timer otherwise. * Call watchdog from tbtt handler if tbtt is true, watchdog timer otherwise.
*/ */
void wlc_watchdog_upd(wlc_info_t *wlc, bool tbtt) void wlc_watchdog_upd(struct wlc_info *wlc, bool tbtt)
{ {
/* make sure changing watchdog driver is allowed */ /* make sure changing watchdog driver is allowed */
if (!wlc->pub->up || !wlc->pub->align_wd_tbtt) if (!wlc->pub->up || !wlc->pub->align_wd_tbtt)
...@@ -1070,7 +1070,7 @@ void wlc_watchdog_upd(wlc_info_t *wlc, bool tbtt) ...@@ -1070,7 +1070,7 @@ void wlc_watchdog_upd(wlc_info_t *wlc, bool tbtt)
} }
} }
ratespec_t wlc_lowest_basic_rspec(wlc_info_t *wlc, wlc_rateset_t *rs) ratespec_t wlc_lowest_basic_rspec(struct wlc_info *wlc, wlc_rateset_t *rs)
{ {
ratespec_t lowest_basic_rspec; ratespec_t lowest_basic_rspec;
uint i; uint i;
...@@ -1098,7 +1098,7 @@ ratespec_t wlc_lowest_basic_rspec(wlc_info_t *wlc, wlc_rateset_t *rs) ...@@ -1098,7 +1098,7 @@ ratespec_t wlc_lowest_basic_rspec(wlc_info_t *wlc, wlc_rateset_t *rs)
* ratespec CCK ant = wlc->stf->txant * ratespec CCK ant = wlc->stf->txant
* OFDM ant = 3 * OFDM ant = 3
*/ */
void wlc_beacon_phytxctl_txant_upd(wlc_info_t *wlc, ratespec_t bcn_rspec) void wlc_beacon_phytxctl_txant_upd(struct wlc_info *wlc, ratespec_t bcn_rspec)
{ {
u16 phyctl; u16 phyctl;
u16 phytxant = wlc->stf->phytxant; u16 phytxant = wlc->stf->phytxant;
...@@ -1117,7 +1117,7 @@ void wlc_beacon_phytxctl_txant_upd(wlc_info_t *wlc, ratespec_t bcn_rspec) ...@@ -1117,7 +1117,7 @@ void wlc_beacon_phytxctl_txant_upd(wlc_info_t *wlc, ratespec_t bcn_rspec)
/* centralized protection config change function to simplify debugging, no consistency checking /* centralized protection config change function to simplify debugging, no consistency checking
* this should be called only on changes to avoid overhead in periodic function * this should be called only on changes to avoid overhead in periodic function
*/ */
void wlc_protection_upd(wlc_info_t *wlc, uint idx, int val) void wlc_protection_upd(struct wlc_info *wlc, uint idx, int val)
{ {
WL_TRACE(("wlc_protection_upd: idx %d, val %d\n", idx, val)); WL_TRACE(("wlc_protection_upd: idx %d, val %d\n", idx, val));
...@@ -1163,7 +1163,7 @@ void wlc_protection_upd(wlc_info_t *wlc, uint idx, int val) ...@@ -1163,7 +1163,7 @@ void wlc_protection_upd(wlc_info_t *wlc, uint idx, int val)
} }
static void wlc_ht_update_sgi_rx(wlc_info_t *wlc, int val) static void wlc_ht_update_sgi_rx(struct wlc_info *wlc, int val)
{ {
wlc->ht_cap.cap &= ~(HT_CAP_SHORT_GI_20 | HT_CAP_SHORT_GI_40); wlc->ht_cap.cap &= ~(HT_CAP_SHORT_GI_20 | HT_CAP_SHORT_GI_40);
wlc->ht_cap.cap |= (val & WLC_N_SGI_20) ? HT_CAP_SHORT_GI_20 : 0; wlc->ht_cap.cap |= (val & WLC_N_SGI_20) ? HT_CAP_SHORT_GI_20 : 0;
...@@ -1175,7 +1175,7 @@ static void wlc_ht_update_sgi_rx(wlc_info_t *wlc, int val) ...@@ -1175,7 +1175,7 @@ static void wlc_ht_update_sgi_rx(wlc_info_t *wlc, int val)
} }
} }
static void wlc_ht_update_ldpc(wlc_info_t *wlc, s8 val) static void wlc_ht_update_ldpc(struct wlc_info *wlc, s8 val)
{ {
wlc->stf->ldpc = val; wlc->stf->ldpc = val;
...@@ -1194,7 +1194,7 @@ static void wlc_ht_update_ldpc(wlc_info_t *wlc, s8 val) ...@@ -1194,7 +1194,7 @@ static void wlc_ht_update_ldpc(wlc_info_t *wlc, s8 val)
* ucode, hwmac update * ucode, hwmac update
* Channel dependent updates for ucode and hw * Channel dependent updates for ucode and hw
*/ */
static void wlc_ucode_mac_upd(wlc_info_t *wlc) static void wlc_ucode_mac_upd(struct wlc_info *wlc)
{ {
/* enable or disable any active IBSSs depending on whether or not /* enable or disable any active IBSSs depending on whether or not
* we are on the home channel * we are on the home channel
...@@ -1221,7 +1221,7 @@ static void wlc_ucode_mac_upd(wlc_info_t *wlc) ...@@ -1221,7 +1221,7 @@ static void wlc_ucode_mac_upd(wlc_info_t *wlc)
wlc_mac_promisc(wlc); wlc_mac_promisc(wlc);
} }
static void wlc_bandinit_ordered(wlc_info_t *wlc, chanspec_t chanspec) static void wlc_bandinit_ordered(struct wlc_info *wlc, chanspec_t chanspec)
{ {
wlc_rateset_t default_rateset; wlc_rateset_t default_rateset;
uint parkband; uint parkband;
...@@ -1268,7 +1268,7 @@ static void wlc_bandinit_ordered(wlc_info_t *wlc, chanspec_t chanspec) ...@@ -1268,7 +1268,7 @@ static void wlc_bandinit_ordered(wlc_info_t *wlc, chanspec_t chanspec)
} }
/* band-specific init */ /* band-specific init */
static void WLBANDINITFN(wlc_bsinit) (wlc_info_t *wlc) static void WLBANDINITFN(wlc_bsinit) (struct wlc_info *wlc)
{ {
WL_TRACE(("wl%d: wlc_bsinit: bandunit %d\n", wlc->pub->unit, WL_TRACE(("wl%d: wlc_bsinit: bandunit %d\n", wlc->pub->unit,
wlc->band->bandunit)); wlc->band->bandunit));
...@@ -1286,7 +1286,7 @@ static void WLBANDINITFN(wlc_bsinit) (wlc_info_t *wlc) ...@@ -1286,7 +1286,7 @@ static void WLBANDINITFN(wlc_bsinit) (wlc_info_t *wlc)
} }
/* switch to and initialize new band */ /* switch to and initialize new band */
static void WLBANDINITFN(wlc_setband) (wlc_info_t *wlc, uint bandunit) static void WLBANDINITFN(wlc_setband) (struct wlc_info *wlc, uint bandunit)
{ {
int idx; int idx;
wlc_bsscfg_t *cfg; wlc_bsscfg_t *cfg;
...@@ -1311,7 +1311,7 @@ static void WLBANDINITFN(wlc_setband) (wlc_info_t *wlc, uint bandunit) ...@@ -1311,7 +1311,7 @@ static void WLBANDINITFN(wlc_setband) (wlc_info_t *wlc, uint bandunit)
} }
/* Initialize a WME Parameter Info Element with default STA parameters from WMM Spec, Table 12 */ /* Initialize a WME Parameter Info Element with default STA parameters from WMM Spec, Table 12 */
void wlc_wme_initparams_sta(wlc_info_t *wlc, wme_param_ie_t *pe) void wlc_wme_initparams_sta(struct wlc_info *wlc, wme_param_ie_t *pe)
{ {
static const wme_param_ie_t stadef = { static const wme_param_ie_t stadef = {
WME_OUI, WME_OUI,
...@@ -1336,7 +1336,7 @@ void wlc_wme_initparams_sta(wlc_info_t *wlc, wme_param_ie_t *pe) ...@@ -1336,7 +1336,7 @@ void wlc_wme_initparams_sta(wlc_info_t *wlc, wme_param_ie_t *pe)
memcpy(pe, &stadef, sizeof(*pe)); memcpy(pe, &stadef, sizeof(*pe));
} }
void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg, bool suspend) void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg, bool suspend)
{ {
int i; int i;
shm_acparams_t acp_shm; shm_acparams_t acp_shm;
...@@ -1417,7 +1417,7 @@ void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg, bool suspend) ...@@ -1417,7 +1417,7 @@ void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg, bool suspend)
void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend) void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend)
{ {
wlc_info_t *wlc = cfg->wlc; struct wlc_info *wlc = cfg->wlc;
uint aci, i, j; uint aci, i, j;
edcf_acparam_t *edcf_acp; edcf_acparam_t *edcf_acp;
shm_acparams_t acp_shm; shm_acparams_t acp_shm;
...@@ -1506,7 +1506,7 @@ void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend) ...@@ -1506,7 +1506,7 @@ void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend)
} }
bool wlc_timers_init(wlc_info_t *wlc, int unit) bool wlc_timers_init(struct wlc_info *wlc, int unit)
{ {
wlc->wdtimer = wl_init_timer(wlc->wl, wlc_watchdog_by_timer, wlc->wdtimer = wl_init_timer(wlc->wl, wlc_watchdog_by_timer,
wlc, "watchdog"); wlc, "watchdog");
...@@ -1533,7 +1533,7 @@ bool wlc_timers_init(wlc_info_t *wlc, int unit) ...@@ -1533,7 +1533,7 @@ bool wlc_timers_init(wlc_info_t *wlc, int unit)
* Initialize wlc_info default values ... * Initialize wlc_info default values ...
* may get overrides later in this function * may get overrides later in this function
*/ */
void wlc_info_init(wlc_info_t *wlc, int unit) void wlc_info_init(struct wlc_info *wlc, int unit)
{ {
int i; int i;
/* Assume the device is there until proven otherwise */ /* Assume the device is there until proven otherwise */
...@@ -1644,7 +1644,7 @@ void wlc_info_init(wlc_info_t *wlc, int unit) ...@@ -1644,7 +1644,7 @@ void wlc_info_init(wlc_info_t *wlc, int unit)
wlc->pr80838_war = true; wlc->pr80838_war = true;
} }
static bool wlc_state_bmac_sync(wlc_info_t *wlc) static bool wlc_state_bmac_sync(struct wlc_info *wlc)
{ {
wlc_bmac_state_t state_bmac; wlc_bmac_state_t state_bmac;
...@@ -1658,7 +1658,7 @@ static bool wlc_state_bmac_sync(wlc_info_t *wlc) ...@@ -1658,7 +1658,7 @@ static bool wlc_state_bmac_sync(wlc_info_t *wlc)
return true; return true;
} }
static uint wlc_attach_module(wlc_info_t *wlc) static uint wlc_attach_module(struct wlc_info *wlc)
{ {
uint err = 0; uint err = 0;
uint unit; uint unit;
...@@ -1699,7 +1699,7 @@ static uint wlc_attach_module(wlc_info_t *wlc) ...@@ -1699,7 +1699,7 @@ static uint wlc_attach_module(wlc_info_t *wlc)
wlc_pub_t *wlc_pub(void *wlc) wlc_pub_t *wlc_pub(void *wlc)
{ {
return ((wlc_info_t *) wlc)->pub; return ((struct wlc_info *) wlc)->pub;
} }
#define CHIP_SUPPORTS_11N(wlc) 1 #define CHIP_SUPPORTS_11N(wlc) 1
...@@ -1711,7 +1711,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, ...@@ -1711,7 +1711,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
struct osl_info *osh, void *regsva, uint bustype, struct osl_info *osh, void *regsva, uint bustype,
void *btparam, uint *perr) void *btparam, uint *perr)
{ {
wlc_info_t *wlc; struct wlc_info *wlc;
uint err = 0; uint err = 0;
uint j; uint j;
wlc_pub_t *pub; wlc_pub_t *pub;
...@@ -1757,8 +1757,8 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, ...@@ -1757,8 +1757,8 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
|| (WPA_CAP_4_REPLAY_CNTRS == WLC_REPLAY_CNTRS_VALUE || (WPA_CAP_4_REPLAY_CNTRS == WLC_REPLAY_CNTRS_VALUE
&& 4 == WLC_NUMRXIVS)); && 4 == WLC_NUMRXIVS));
/* allocate wlc_info_t state and its substructures */ /* allocate struct wlc_info state and its substructures */
wlc = (wlc_info_t *) wlc_attach_malloc(osh, unit, &err, device); wlc = (struct wlc_info *) wlc_attach_malloc(osh, unit, &err, device);
if (wlc == NULL) if (wlc == NULL)
goto fail; goto fail;
wlc->osh = osh; wlc->osh = osh;
...@@ -1779,7 +1779,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, ...@@ -1779,7 +1779,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
/* By default restrict TKIP associations from 11n STA's */ /* By default restrict TKIP associations from 11n STA's */
wlc->ht_wsec_restriction = WLC_HT_TKIP_RESTRICT; wlc->ht_wsec_restriction = WLC_HT_TKIP_RESTRICT;
/* populate wlc_info_t with default values */ /* populate struct wlc_info with default values */
wlc_info_init(wlc, unit); wlc_info_init(wlc, unit);
/* update sta/ap related parameters */ /* update sta/ap related parameters */
...@@ -2016,7 +2016,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, ...@@ -2016,7 +2016,7 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
return NULL; return NULL;
} }
static void wlc_attach_antgain_init(wlc_info_t *wlc) static void wlc_attach_antgain_init(struct wlc_info *wlc)
{ {
uint unit; uint unit;
unit = wlc->pub->unit; unit = wlc->pub->unit;
...@@ -2047,7 +2047,7 @@ static void wlc_attach_antgain_init(wlc_info_t *wlc) ...@@ -2047,7 +2047,7 @@ static void wlc_attach_antgain_init(wlc_info_t *wlc)
} }
} }
static bool wlc_attach_stf_ant_init(wlc_info_t *wlc) static bool wlc_attach_stf_ant_init(struct wlc_info *wlc)
{ {
int aa; int aa;
uint unit; uint unit;
...@@ -2087,7 +2087,7 @@ static bool wlc_attach_stf_ant_init(wlc_info_t *wlc) ...@@ -2087,7 +2087,7 @@ static bool wlc_attach_stf_ant_init(wlc_info_t *wlc)
} }
static void wlc_timers_deinit(wlc_info_t *wlc) static void wlc_timers_deinit(struct wlc_info *wlc)
{ {
/* free timer state */ /* free timer state */
if (wlc->wdtimer) { if (wlc->wdtimer) {
...@@ -2100,7 +2100,7 @@ static void wlc_timers_deinit(wlc_info_t *wlc) ...@@ -2100,7 +2100,7 @@ static void wlc_timers_deinit(wlc_info_t *wlc)
} }
} }
static void wlc_detach_module(wlc_info_t *wlc) static void wlc_detach_module(struct wlc_info *wlc)
{ {
if (wlc->asi) { if (wlc->asi) {
wlc_antsel_detach(wlc->asi); wlc_antsel_detach(wlc->asi);
...@@ -2123,7 +2123,7 @@ static void wlc_detach_module(wlc_info_t *wlc) ...@@ -2123,7 +2123,7 @@ static void wlc_detach_module(wlc_info_t *wlc)
* One exception is sb register access, which is possible if crystal is turned on * One exception is sb register access, which is possible if crystal is turned on
* After "down" state, driver should avoid software timer with the exception of radio_monitor. * After "down" state, driver should avoid software timer with the exception of radio_monitor.
*/ */
uint wlc_detach(wlc_info_t *wlc) uint wlc_detach(struct wlc_info *wlc)
{ {
uint i; uint i;
uint callbacks = 0; uint callbacks = 0;
...@@ -2200,7 +2200,7 @@ uint wlc_detach(wlc_info_t *wlc) ...@@ -2200,7 +2200,7 @@ uint wlc_detach(wlc_info_t *wlc)
} }
/* update state that depends on the current value of "ap" */ /* update state that depends on the current value of "ap" */
void wlc_ap_upd(wlc_info_t *wlc) void wlc_ap_upd(struct wlc_info *wlc)
{ {
if (AP_ENAB(wlc->pub)) if (AP_ENAB(wlc->pub))
wlc->PLCPHdr_override = WLC_PLCP_AUTO; /* AP: short not allowed, but not enforced */ wlc->PLCPHdr_override = WLC_PLCP_AUTO; /* AP: short not allowed, but not enforced */
...@@ -2215,7 +2215,7 @@ void wlc_ap_upd(wlc_info_t *wlc) ...@@ -2215,7 +2215,7 @@ void wlc_ap_upd(wlc_info_t *wlc)
} }
/* read hwdisable state and propagate to wlc flag */ /* read hwdisable state and propagate to wlc flag */
static void wlc_radio_hwdisable_upd(wlc_info_t *wlc) static void wlc_radio_hwdisable_upd(struct wlc_info *wlc)
{ {
if (wlc->pub->wlfeatureflag & WL_SWFL_NOHWRADIO || wlc->pub->hw_off) if (wlc->pub->wlfeatureflag & WL_SWFL_NOHWRADIO || wlc->pub->hw_off)
return; return;
...@@ -2228,17 +2228,17 @@ static void wlc_radio_hwdisable_upd(wlc_info_t *wlc) ...@@ -2228,17 +2228,17 @@ static void wlc_radio_hwdisable_upd(wlc_info_t *wlc)
} }
/* return true if Minimum Power Consumption should be entered, false otherwise */ /* return true if Minimum Power Consumption should be entered, false otherwise */
bool wlc_is_non_delay_mpc(wlc_info_t *wlc) bool wlc_is_non_delay_mpc(struct wlc_info *wlc)
{ {
return false; return false;
} }
bool wlc_ismpc(wlc_info_t *wlc) bool wlc_ismpc(struct wlc_info *wlc)
{ {
return (wlc->mpc_delay_off == 0) && (wlc_is_non_delay_mpc(wlc)); return (wlc->mpc_delay_off == 0) && (wlc_is_non_delay_mpc(wlc));
} }
void wlc_radio_mpc_upd(wlc_info_t *wlc) void wlc_radio_mpc_upd(struct wlc_info *wlc)
{ {
bool mpc_radio, radio_state; bool mpc_radio, radio_state;
...@@ -2294,7 +2294,7 @@ void wlc_radio_mpc_upd(wlc_info_t *wlc) ...@@ -2294,7 +2294,7 @@ void wlc_radio_mpc_upd(wlc_info_t *wlc)
* centralized radio disable/enable function, * centralized radio disable/enable function,
* invoke radio enable/disable after updating hwradio status * invoke radio enable/disable after updating hwradio status
*/ */
static void wlc_radio_upd(wlc_info_t *wlc) static void wlc_radio_upd(struct wlc_info *wlc)
{ {
if (wlc->pub->radio_disabled) if (wlc->pub->radio_disabled)
wlc_radio_disable(wlc); wlc_radio_disable(wlc);
...@@ -2303,7 +2303,7 @@ static void wlc_radio_upd(wlc_info_t *wlc) ...@@ -2303,7 +2303,7 @@ static void wlc_radio_upd(wlc_info_t *wlc)
} }
/* maintain LED behavior in down state */ /* maintain LED behavior in down state */
static void wlc_down_led_upd(wlc_info_t *wlc) static void wlc_down_led_upd(struct wlc_info *wlc)
{ {
ASSERT(!wlc->pub->up); ASSERT(!wlc->pub->up);
...@@ -2316,7 +2316,7 @@ static void wlc_down_led_upd(wlc_info_t *wlc) ...@@ -2316,7 +2316,7 @@ static void wlc_down_led_upd(wlc_info_t *wlc)
} }
} }
void wlc_radio_disable(wlc_info_t *wlc) void wlc_radio_disable(struct wlc_info *wlc)
{ {
if (!wlc->pub->up) { if (!wlc->pub->up) {
wlc_down_led_upd(wlc); wlc_down_led_upd(wlc);
...@@ -2327,7 +2327,7 @@ void wlc_radio_disable(wlc_info_t *wlc) ...@@ -2327,7 +2327,7 @@ void wlc_radio_disable(wlc_info_t *wlc)
wl_down(wlc->wl); wl_down(wlc->wl);
} }
static void wlc_radio_enable(wlc_info_t *wlc) static void wlc_radio_enable(struct wlc_info *wlc)
{ {
if (wlc->pub->up) if (wlc->pub->up)
return; return;
...@@ -2343,7 +2343,7 @@ static void wlc_radio_enable(wlc_info_t *wlc) ...@@ -2343,7 +2343,7 @@ static void wlc_radio_enable(wlc_info_t *wlc)
/* periodical query hw radio button while driver is "down" */ /* periodical query hw radio button while driver is "down" */
static void wlc_radio_timer(void *arg) static void wlc_radio_timer(void *arg)
{ {
wlc_info_t *wlc = (wlc_info_t *) arg; struct wlc_info *wlc = (struct wlc_info *) arg;
if (DEVICEREMOVED(wlc)) { if (DEVICEREMOVED(wlc)) {
WL_ERROR(("wl%d: %s: dead chip\n", wlc->pub->unit, __func__)); WL_ERROR(("wl%d: %s: dead chip\n", wlc->pub->unit, __func__));
...@@ -2361,7 +2361,7 @@ static void wlc_radio_timer(void *arg) ...@@ -2361,7 +2361,7 @@ static void wlc_radio_timer(void *arg)
wlc_radio_upd(wlc); wlc_radio_upd(wlc);
} }
static bool wlc_radio_monitor_start(wlc_info_t *wlc) static bool wlc_radio_monitor_start(struct wlc_info *wlc)
{ {
/* Don't start the timer if HWRADIO feature is disabled */ /* Don't start the timer if HWRADIO feature is disabled */
if (wlc->radio_monitor || (wlc->pub->wlfeatureflag & WL_SWFL_NOHWRADIO)) if (wlc->radio_monitor || (wlc->pub->wlfeatureflag & WL_SWFL_NOHWRADIO))
...@@ -2373,7 +2373,7 @@ static bool wlc_radio_monitor_start(wlc_info_t *wlc) ...@@ -2373,7 +2373,7 @@ static bool wlc_radio_monitor_start(wlc_info_t *wlc)
return true; return true;
} }
bool wlc_radio_monitor_stop(wlc_info_t *wlc) bool wlc_radio_monitor_stop(struct wlc_info *wlc)
{ {
if (!wlc->radio_monitor) if (!wlc->radio_monitor)
return true; return true;
...@@ -2387,7 +2387,7 @@ bool wlc_radio_monitor_stop(wlc_info_t *wlc) ...@@ -2387,7 +2387,7 @@ bool wlc_radio_monitor_stop(wlc_info_t *wlc)
} }
/* bring the driver down, but don't reset hardware */ /* bring the driver down, but don't reset hardware */
void wlc_out(wlc_info_t *wlc) void wlc_out(struct wlc_info *wlc)
{ {
wlc_bmac_set_noreset(wlc->hw, true); wlc_bmac_set_noreset(wlc->hw, true);
wlc_radio_upd(wlc); wlc_radio_upd(wlc);
...@@ -2408,7 +2408,7 @@ void wlc_out(wlc_info_t *wlc) ...@@ -2408,7 +2408,7 @@ void wlc_out(wlc_info_t *wlc)
* if there is no packet pending for the FIFO, then the corresponding prec bits should be set * if there is no packet pending for the FIFO, then the corresponding prec bits should be set
* in prec_map. Of course, ignore this rule when block_datafifo is set * in prec_map. Of course, ignore this rule when block_datafifo is set
*/ */
static bool wlc_tx_prec_map_verify(wlc_info_t *wlc) static bool wlc_tx_prec_map_verify(struct wlc_info *wlc)
{ {
/* For non-WME, both fifos have overlapping prec_map. So it's an error only if both /* For non-WME, both fifos have overlapping prec_map. So it's an error only if both
* fail the check. * fail the check.
...@@ -2430,7 +2430,7 @@ static bool wlc_tx_prec_map_verify(wlc_info_t *wlc) ...@@ -2430,7 +2430,7 @@ static bool wlc_tx_prec_map_verify(wlc_info_t *wlc)
static void wlc_watchdog_by_timer(void *arg) static void wlc_watchdog_by_timer(void *arg)
{ {
wlc_info_t *wlc = (wlc_info_t *) arg; struct wlc_info *wlc = (struct wlc_info *) arg;
wlc_watchdog(arg); wlc_watchdog(arg);
if (WLC_WATCHDOG_TBTT(wlc)) { if (WLC_WATCHDOG_TBTT(wlc)) {
/* set to normal osl watchdog period */ /* set to normal osl watchdog period */
...@@ -2443,7 +2443,7 @@ static void wlc_watchdog_by_timer(void *arg) ...@@ -2443,7 +2443,7 @@ static void wlc_watchdog_by_timer(void *arg)
/* common watchdog code */ /* common watchdog code */
static void wlc_watchdog(void *arg) static void wlc_watchdog(void *arg)
{ {
wlc_info_t *wlc = (wlc_info_t *) arg; struct wlc_info *wlc = (struct wlc_info *) arg;
int i; int i;
wlc_bsscfg_t *cfg; wlc_bsscfg_t *cfg;
...@@ -2523,7 +2523,7 @@ static void wlc_watchdog(void *arg) ...@@ -2523,7 +2523,7 @@ static void wlc_watchdog(void *arg)
} }
/* make interface operational */ /* make interface operational */
int wlc_up(wlc_info_t *wlc) int wlc_up(struct wlc_info *wlc)
{ {
WL_TRACE(("wl%d: %s:\n", wlc->pub->unit, __func__)); WL_TRACE(("wl%d: %s:\n", wlc->pub->unit, __func__));
...@@ -2631,7 +2631,7 @@ int wlc_up(wlc_info_t *wlc) ...@@ -2631,7 +2631,7 @@ int wlc_up(wlc_info_t *wlc)
} }
/* Initialize the base precedence map for dequeueing from txq based on WME settings */ /* Initialize the base precedence map for dequeueing from txq based on WME settings */
static void wlc_tx_prec_map_init(wlc_info_t *wlc) static void wlc_tx_prec_map_init(struct wlc_info *wlc)
{ {
wlc->tx_prec_map = WLC_PREC_BMP_ALL; wlc->tx_prec_map = WLC_PREC_BMP_ALL;
memset(wlc->fifo2prec_map, 0, NFIFO * sizeof(u16)); memset(wlc->fifo2prec_map, 0, NFIFO * sizeof(u16));
...@@ -2650,7 +2650,7 @@ static void wlc_tx_prec_map_init(wlc_info_t *wlc) ...@@ -2650,7 +2650,7 @@ static void wlc_tx_prec_map_init(wlc_info_t *wlc)
} }
} }
static uint wlc_down_del_timer(wlc_info_t *wlc) static uint wlc_down_del_timer(struct wlc_info *wlc)
{ {
uint callbacks = 0; uint callbacks = 0;
...@@ -2662,7 +2662,7 @@ static uint wlc_down_del_timer(wlc_info_t *wlc) ...@@ -2662,7 +2662,7 @@ static uint wlc_down_del_timer(wlc_info_t *wlc)
* disable the hardware, free any transient buffer state. * disable the hardware, free any transient buffer state.
* Return a count of the number of driver callbacks still pending. * Return a count of the number of driver callbacks still pending.
*/ */
uint wlc_down(wlc_info_t *wlc) uint wlc_down(struct wlc_info *wlc)
{ {
uint callbacks = 0; uint callbacks = 0;
...@@ -2749,7 +2749,7 @@ uint wlc_down(wlc_info_t *wlc) ...@@ -2749,7 +2749,7 @@ uint wlc_down(wlc_info_t *wlc)
} }
/* Set the current gmode configuration */ /* Set the current gmode configuration */
int wlc_set_gmode(wlc_info_t *wlc, u8 gmode, bool config) int wlc_set_gmode(struct wlc_info *wlc, u8 gmode, bool config)
{ {
int ret = 0; int ret = 0;
uint i; uint i;
...@@ -2899,7 +2899,7 @@ int wlc_set_gmode(wlc_info_t *wlc, u8 gmode, bool config) ...@@ -2899,7 +2899,7 @@ int wlc_set_gmode(wlc_info_t *wlc, u8 gmode, bool config)
return ret; return ret;
} }
static int wlc_nmode_validate(wlc_info_t *wlc, s32 nmode) static int wlc_nmode_validate(struct wlc_info *wlc, s32 nmode)
{ {
int err = 0; int err = 0;
...@@ -2923,7 +2923,7 @@ static int wlc_nmode_validate(wlc_info_t *wlc, s32 nmode) ...@@ -2923,7 +2923,7 @@ static int wlc_nmode_validate(wlc_info_t *wlc, s32 nmode)
return err; return err;
} }
int wlc_set_nmode(wlc_info_t *wlc, s32 nmode) int wlc_set_nmode(struct wlc_info *wlc, s32 nmode)
{ {
uint i; uint i;
int err; int err;
...@@ -2982,7 +2982,7 @@ int wlc_set_nmode(wlc_info_t *wlc, s32 nmode) ...@@ -2982,7 +2982,7 @@ int wlc_set_nmode(wlc_info_t *wlc, s32 nmode)
return err; return err;
} }
static int wlc_set_rateset(wlc_info_t *wlc, wlc_rateset_t *rs_arg) static int wlc_set_rateset(struct wlc_info *wlc, wlc_rateset_t *rs_arg)
{ {
wlc_rateset_t rs, new; wlc_rateset_t rs, new;
uint bandunit; uint bandunit;
...@@ -3025,18 +3025,18 @@ static int wlc_set_rateset(wlc_info_t *wlc, wlc_rateset_t *rs_arg) ...@@ -3025,18 +3025,18 @@ static int wlc_set_rateset(wlc_info_t *wlc, wlc_rateset_t *rs_arg)
} }
/* simplified integer set interface for common ioctl handler */ /* simplified integer set interface for common ioctl handler */
int wlc_set(wlc_info_t *wlc, int cmd, int arg) int wlc_set(struct wlc_info *wlc, int cmd, int arg)
{ {
return wlc_ioctl(wlc, cmd, (void *)&arg, sizeof(arg), NULL); return wlc_ioctl(wlc, cmd, (void *)&arg, sizeof(arg), NULL);
} }
/* simplified integer get interface for common ioctl handler */ /* simplified integer get interface for common ioctl handler */
int wlc_get(wlc_info_t *wlc, int cmd, int *arg) int wlc_get(struct wlc_info *wlc, int cmd, int *arg)
{ {
return wlc_ioctl(wlc, cmd, arg, sizeof(int), NULL); return wlc_ioctl(wlc, cmd, arg, sizeof(int), NULL);
} }
static void wlc_ofdm_rateset_war(wlc_info_t *wlc) static void wlc_ofdm_rateset_war(struct wlc_info *wlc)
{ {
u8 r; u8 r;
bool war = false; bool war = false;
...@@ -3052,14 +3052,16 @@ static void wlc_ofdm_rateset_war(wlc_info_t *wlc) ...@@ -3052,14 +3052,16 @@ static void wlc_ofdm_rateset_war(wlc_info_t *wlc)
} }
int int
wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
struct wlc_if *wlcif)
{ {
return _wlc_ioctl(wlc, cmd, arg, len, wlcif); return _wlc_ioctl(wlc, cmd, arg, len, wlcif);
} }
/* common ioctl handler. return: 0=ok, -1=error, positive=particular error */ /* common ioctl handler. return: 0=ok, -1=error, positive=particular error */
static int static int
_wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) _wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
struct wlc_if *wlcif)
{ {
int val, *pval; int val, *pval;
bool bool_val; bool bool_val;
...@@ -4220,7 +4222,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) ...@@ -4220,7 +4222,7 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif)
#if defined(BCMDBG) #if defined(BCMDBG)
/* consolidated register access ioctl error checking */ /* consolidated register access ioctl error checking */
int wlc_iocregchk(wlc_info_t *wlc, uint band) int wlc_iocregchk(struct wlc_info *wlc, uint band)
{ {
/* if band is specified, it must be the current band */ /* if band is specified, it must be the current band */
if ((band != WLC_BAND_AUTO) && (band != (uint) wlc->band->bandtype)) if ((band != WLC_BAND_AUTO) && (band != (uint) wlc->band->bandtype))
...@@ -4240,7 +4242,7 @@ int wlc_iocregchk(wlc_info_t *wlc, uint band) ...@@ -4240,7 +4242,7 @@ int wlc_iocregchk(wlc_info_t *wlc, uint band)
#if defined(BCMDBG) #if defined(BCMDBG)
/* For some ioctls, make sure that the pi pointer matches the current phy */ /* For some ioctls, make sure that the pi pointer matches the current phy */
int wlc_iocpichk(wlc_info_t *wlc, uint phytype) int wlc_iocpichk(struct wlc_info *wlc, uint phytype)
{ {
if (wlc->band->phytype != phytype) if (wlc->band->phytype != phytype)
return BCME_BADBAND; return BCME_BADBAND;
...@@ -4274,21 +4276,21 @@ static const bcm_iovar_t *wlc_iovar_lookup(const bcm_iovar_t *table, ...@@ -4274,21 +4276,21 @@ static const bcm_iovar_t *wlc_iovar_lookup(const bcm_iovar_t *table,
} }
/* simplified integer get interface for common WLC_GET_VAR ioctl handler */ /* simplified integer get interface for common WLC_GET_VAR ioctl handler */
int wlc_iovar_getint(wlc_info_t *wlc, const char *name, int *arg) int wlc_iovar_getint(struct wlc_info *wlc, const char *name, int *arg)
{ {
return wlc_iovar_op(wlc, name, NULL, 0, arg, sizeof(s32), IOV_GET, return wlc_iovar_op(wlc, name, NULL, 0, arg, sizeof(s32), IOV_GET,
NULL); NULL);
} }
/* simplified integer set interface for common WLC_SET_VAR ioctl handler */ /* simplified integer set interface for common WLC_SET_VAR ioctl handler */
int wlc_iovar_setint(wlc_info_t *wlc, const char *name, int arg) int wlc_iovar_setint(struct wlc_info *wlc, const char *name, int arg)
{ {
return wlc_iovar_op(wlc, name, NULL, 0, (void *)&arg, sizeof(arg), return wlc_iovar_op(wlc, name, NULL, 0, (void *)&arg, sizeof(arg),
IOV_SET, NULL); IOV_SET, NULL);
} }
/* simplified s8 get interface for common WLC_GET_VAR ioctl handler */ /* simplified s8 get interface for common WLC_GET_VAR ioctl handler */
int wlc_iovar_gets8(wlc_info_t *wlc, const char *name, s8 *arg) int wlc_iovar_gets8(struct wlc_info *wlc, const char *name, s8 *arg)
{ {
int iovar_int; int iovar_int;
int err; int err;
...@@ -4311,7 +4313,7 @@ int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars, ...@@ -4311,7 +4313,7 @@ int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
const char *name, void *hdl, iovar_fn_t i_fn, const char *name, void *hdl, iovar_fn_t i_fn,
watchdog_fn_t w_fn, down_fn_t d_fn) watchdog_fn_t w_fn, down_fn_t d_fn)
{ {
wlc_info_t *wlc = (wlc_info_t *) pub->wlc; struct wlc_info *wlc = (struct wlc_info *) pub->wlc;
int i; int i;
ASSERT(name != NULL); ASSERT(name != NULL);
...@@ -4339,7 +4341,7 @@ int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars, ...@@ -4339,7 +4341,7 @@ int wlc_module_register(wlc_pub_t *pub, const bcm_iovar_t *iovars,
/* unregister module callbacks */ /* unregister module callbacks */
int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl) int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl)
{ {
wlc_info_t *wlc = (wlc_info_t *) pub->wlc; struct wlc_info *wlc = (struct wlc_info *) pub->wlc;
int i; int i;
if (wlc == NULL) if (wlc == NULL)
...@@ -4360,7 +4362,7 @@ int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl) ...@@ -4360,7 +4362,7 @@ int wlc_module_unregister(wlc_pub_t *pub, const char *name, void *hdl)
} }
/* Write WME tunable parameters for retransmit/max rate from wlc struct to ucode */ /* Write WME tunable parameters for retransmit/max rate from wlc struct to ucode */
static void wlc_wme_retries_write(wlc_info_t *wlc) static void wlc_wme_retries_write(struct wlc_info *wlc)
{ {
int ac; int ac;
...@@ -4382,7 +4384,7 @@ static void wlc_wme_retries_write(wlc_info_t *wlc) ...@@ -4382,7 +4384,7 @@ static void wlc_wme_retries_write(wlc_info_t *wlc)
* All pointers may point into the same buffer. * All pointers may point into the same buffer.
*/ */
int int
wlc_iovar_op(wlc_info_t *wlc, const char *name, wlc_iovar_op(struct wlc_info *wlc, const char *name,
void *params, int p_len, void *arg, int len, void *params, int p_len, void *arg, int len,
bool set, struct wlc_if *wlcif) bool set, struct wlc_if *wlcif)
{ {
...@@ -4456,7 +4458,7 @@ int ...@@ -4456,7 +4458,7 @@ int
wlc_iovar_check(wlc_pub_t *pub, const bcm_iovar_t *vi, void *arg, int len, wlc_iovar_check(wlc_pub_t *pub, const bcm_iovar_t *vi, void *arg, int len,
bool set) bool set)
{ {
wlc_info_t *wlc = (wlc_info_t *) pub->wlc; struct wlc_info *wlc = (struct wlc_info *) pub->wlc;
int err = 0; int err = 0;
s32 int_val = 0; s32 int_val = 0;
...@@ -4524,7 +4526,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid, ...@@ -4524,7 +4526,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
const char *name, void *params, uint p_len, void *arg, int len, const char *name, void *params, uint p_len, void *arg, int len,
int val_size, struct wlc_if *wlcif) int val_size, struct wlc_if *wlcif)
{ {
wlc_info_t *wlc = hdl; struct wlc_info *wlc = hdl;
wlc_bsscfg_t *bsscfg; wlc_bsscfg_t *bsscfg;
int err = 0; int err = 0;
s32 int_val = 0; s32 int_val = 0;
...@@ -4628,7 +4630,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid, ...@@ -4628,7 +4630,7 @@ wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
} }
static int static int
wlc_iovar_rangecheck(wlc_info_t *wlc, u32 val, const bcm_iovar_t *vi) wlc_iovar_rangecheck(struct wlc_info *wlc, u32 val, const bcm_iovar_t *vi)
{ {
int err = 0; int err = 0;
u32 min_val = 0; u32 min_val = 0;
...@@ -4725,7 +4727,7 @@ void wlc_print_txstatus(tx_status_t *txs) ...@@ -4725,7 +4727,7 @@ void wlc_print_txstatus(tx_status_t *txs)
#define MACSTATUPD(name) \ #define MACSTATUPD(name) \
wlc_ctrupd_cache(macstats.name, &wlc->core->macstat_snapshot->name, &wlc->pub->_cnt->name) wlc_ctrupd_cache(macstats.name, &wlc->core->macstat_snapshot->name, &wlc->pub->_cnt->name)
void wlc_statsupd(wlc_info_t *wlc) void wlc_statsupd(struct wlc_info *wlc)
{ {
int i; int i;
#ifdef BCMDBG #ifdef BCMDBG
...@@ -4977,7 +4979,7 @@ int wlc_format_ssid(char *buf, const unsigned char ssid[], uint ssid_len) ...@@ -4977,7 +4979,7 @@ int wlc_format_ssid(char *buf, const unsigned char ssid[], uint ssid_len)
} }
#endif /* defined(BCMDBG) */ #endif /* defined(BCMDBG) */
u16 wlc_rate_shm_offset(wlc_info_t *wlc, u8 rate) u16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate)
{ {
return wlc_bmac_rate_shm_offset(wlc->hw, rate); return wlc_bmac_rate_shm_offset(wlc->hw, rate);
} }
...@@ -4994,13 +4996,13 @@ u16 wlc_rate_shm_offset(wlc_info_t *wlc, u8 rate) ...@@ -4994,13 +4996,13 @@ u16 wlc_rate_shm_offset(wlc_info_t *wlc, u8 rate)
* Returns true if packet consumed (queued), false if not. * Returns true if packet consumed (queued), false if not.
*/ */
bool BCMFASTPATH bool BCMFASTPATH
wlc_prec_enq(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec) wlc_prec_enq(struct wlc_info *wlc, struct pktq *q, void *pkt, int prec)
{ {
return wlc_prec_enq_head(wlc, q, pkt, prec, false); return wlc_prec_enq_head(wlc, q, pkt, prec, false);
} }
bool BCMFASTPATH bool BCMFASTPATH
wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, struct sk_buff *pkt, wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
int prec, bool head) int prec, bool head)
{ {
struct sk_buff *p; struct sk_buff *p;
...@@ -5067,7 +5069,7 @@ wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, struct sk_buff *pkt, ...@@ -5067,7 +5069,7 @@ wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, struct sk_buff *pkt,
void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu, void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
uint prec) uint prec)
{ {
wlc_info_t *wlc = (wlc_info_t *) ctx; struct wlc_info *wlc = (struct wlc_info *) ctx;
wlc_txq_info_t *qi = wlc->active_queue; /* Check me */ wlc_txq_info_t *qi = wlc->active_queue; /* Check me */
struct pktq *q = &qi->q; struct pktq *q = &qi->q;
int prio; int prio;
...@@ -5105,7 +5107,7 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu, ...@@ -5105,7 +5107,7 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
} }
bool BCMFASTPATH bool BCMFASTPATH
wlc_sendpkt_mac80211(wlc_info_t *wlc, struct sk_buff *sdu, wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
struct ieee80211_hw *hw) struct ieee80211_hw *hw)
{ {
u8 prio; u8 prio;
...@@ -5141,7 +5143,7 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, struct sk_buff *sdu, ...@@ -5141,7 +5143,7 @@ wlc_sendpkt_mac80211(wlc_info_t *wlc, struct sk_buff *sdu,
return 0; return 0;
} }
void BCMFASTPATH wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi) void BCMFASTPATH wlc_send_q(struct wlc_info *wlc, wlc_txq_info_t *qi)
{ {
struct sk_buff *pkt[DOT11_MAXNUMFRAGS]; struct sk_buff *pkt[DOT11_MAXNUMFRAGS];
int prec; int prec;
...@@ -5216,7 +5218,7 @@ void BCMFASTPATH wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi) ...@@ -5216,7 +5218,7 @@ void BCMFASTPATH wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi)
* for MC frames so is used as part of the sequence number. * for MC frames so is used as part of the sequence number.
*/ */
static inline u16 static inline u16
bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh) bcmc_fid_generate(struct wlc_info *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh)
{ {
u16 frameid; u16 frameid;
...@@ -5230,7 +5232,7 @@ bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh) ...@@ -5230,7 +5232,7 @@ bcmc_fid_generate(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, d11txh_t *txh)
} }
void BCMFASTPATH void BCMFASTPATH
wlc_txfifo(wlc_info_t *wlc, uint fifo, struct sk_buff *p, bool commit, wlc_txfifo(struct wlc_info *wlc, uint fifo, struct sk_buff *p, bool commit,
s8 txpktpend) s8 txpktpend)
{ {
u16 frameid = INVALIDFID; u16 frameid = INVALIDFID;
...@@ -5270,7 +5272,7 @@ wlc_txfifo(wlc_info_t *wlc, uint fifo, struct sk_buff *p, bool commit, ...@@ -5270,7 +5272,7 @@ wlc_txfifo(wlc_info_t *wlc, uint fifo, struct sk_buff *p, bool commit,
} }
static u16 static u16
wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, uint length) wlc_compute_airtime(struct wlc_info *wlc, ratespec_t rspec, uint length)
{ {
u16 usec = 0; u16 usec = 0;
uint mac_rate = RSPEC2RATE(rspec); uint mac_rate = RSPEC2RATE(rspec);
...@@ -5315,7 +5317,7 @@ wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, uint length) ...@@ -5315,7 +5317,7 @@ wlc_compute_airtime(wlc_info_t *wlc, ratespec_t rspec, uint length)
} }
void BCMFASTPATH void BCMFASTPATH
wlc_compute_plcp(wlc_info_t *wlc, ratespec_t rspec, uint length, u8 *plcp) wlc_compute_plcp(struct wlc_info *wlc, ratespec_t rspec, uint length, u8 *plcp)
{ {
if (IS_MCS(rspec)) { if (IS_MCS(rspec)) {
wlc_compute_mimo_plcp(rspec, length, plcp); wlc_compute_mimo_plcp(rspec, length, plcp);
...@@ -5439,7 +5441,7 @@ static void wlc_compute_cck_plcp(ratespec_t rspec, uint length, u8 *plcp) ...@@ -5439,7 +5441,7 @@ static void wlc_compute_cck_plcp(ratespec_t rspec, uint length, u8 *plcp)
* preamble_type use short/GF or long/MM PLCP header * preamble_type use short/GF or long/MM PLCP header
*/ */
static u16 BCMFASTPATH static u16 BCMFASTPATH
wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, wlc_compute_frame_dur(struct wlc_info *wlc, ratespec_t rate, u8 preamble_type,
uint next_frag_len) uint next_frag_len)
{ {
u16 dur, sifs; u16 dur, sifs;
...@@ -5473,7 +5475,7 @@ wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type, ...@@ -5473,7 +5475,7 @@ wlc_compute_frame_dur(wlc_info_t *wlc, ratespec_t rate, u8 preamble_type,
* frame_len next MPDU frame length in bytes * frame_len next MPDU frame length in bytes
*/ */
u16 BCMFASTPATH u16 BCMFASTPATH
wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only, ratespec_t rts_rate, wlc_compute_rtscts_dur(struct wlc_info *wlc, bool cts_only, ratespec_t rts_rate,
ratespec_t frame_rate, u8 rts_preamble_type, ratespec_t frame_rate, u8 rts_preamble_type,
u8 frame_preamble_type, uint frame_len, bool ba) u8 frame_preamble_type, uint frame_len, bool ba)
{ {
...@@ -5504,7 +5506,7 @@ wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only, ratespec_t rts_rate, ...@@ -5504,7 +5506,7 @@ wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only, ratespec_t rts_rate,
return dur; return dur;
} }
static bool wlc_phy_rspec_check(wlc_info_t *wlc, u16 bw, ratespec_t rspec) static bool wlc_phy_rspec_check(struct wlc_info *wlc, u16 bw, ratespec_t rspec)
{ {
if (IS_MCS(rspec)) { if (IS_MCS(rspec)) {
uint mcs = rspec & RSPEC_RATE_MASK; uint mcs = rspec & RSPEC_RATE_MASK;
...@@ -5530,7 +5532,7 @@ static bool wlc_phy_rspec_check(wlc_info_t *wlc, u16 bw, ratespec_t rspec) ...@@ -5530,7 +5532,7 @@ static bool wlc_phy_rspec_check(wlc_info_t *wlc, u16 bw, ratespec_t rspec)
return true; return true;
} }
u16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec) u16 BCMFASTPATH wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec)
{ {
u16 phyctl1 = 0; u16 phyctl1 = 0;
u16 bw; u16 bw;
...@@ -5587,7 +5589,7 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec) ...@@ -5587,7 +5589,7 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec)
} }
ratespec_t BCMFASTPATH ratespec_t BCMFASTPATH
wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec, wlc_rspec_to_rts_rspec(struct wlc_info *wlc, ratespec_t rspec, bool use_rspec,
u16 mimo_ctlchbw) u16 mimo_ctlchbw)
{ {
ratespec_t rts_rspec = 0; ratespec_t rts_rspec = 0;
...@@ -5643,7 +5645,7 @@ wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec, ...@@ -5643,7 +5645,7 @@ wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, bool use_rspec,
* *
*/ */
static u16 BCMFASTPATH static u16 BCMFASTPATH
wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
struct sk_buff *p, struct scb *scb, uint frag, struct sk_buff *p, struct scb *scb, uint frag,
uint nfrags, uint queue, uint next_frag_len, uint nfrags, uint queue, uint next_frag_len,
wsec_key_t *key, ratespec_t rspec_override) wsec_key_t *key, ratespec_t rspec_override)
...@@ -6309,7 +6311,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw, ...@@ -6309,7 +6311,7 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw,
return 0; return 0;
} }
void wlc_tbtt(wlc_info_t *wlc, d11regs_t *regs) void wlc_tbtt(struct wlc_info *wlc, d11regs_t *regs)
{ {
wlc_bsscfg_t *cfg = wlc->cfg; wlc_bsscfg_t *cfg = wlc->cfg;
...@@ -6345,19 +6347,19 @@ void wlc_tbtt(wlc_info_t *wlc, d11regs_t *regs) ...@@ -6345,19 +6347,19 @@ void wlc_tbtt(wlc_info_t *wlc, d11regs_t *regs)
} }
/* GP timer is a freerunning 32 bit counter, decrements at 1 us rate */ /* GP timer is a freerunning 32 bit counter, decrements at 1 us rate */
void wlc_hwtimer_gptimer_set(wlc_info_t *wlc, uint us) void wlc_hwtimer_gptimer_set(struct wlc_info *wlc, uint us)
{ {
ASSERT(wlc->pub->corerev >= 3); /* no gptimer in earlier revs */ ASSERT(wlc->pub->corerev >= 3); /* no gptimer in earlier revs */
W_REG(wlc->osh, &wlc->regs->gptimer, us); W_REG(wlc->osh, &wlc->regs->gptimer, us);
} }
void wlc_hwtimer_gptimer_abort(wlc_info_t *wlc) void wlc_hwtimer_gptimer_abort(struct wlc_info *wlc)
{ {
ASSERT(wlc->pub->corerev >= 3); ASSERT(wlc->pub->corerev >= 3);
W_REG(wlc->osh, &wlc->regs->gptimer, 0); W_REG(wlc->osh, &wlc->regs->gptimer, 0);
} }
static void wlc_hwtimer_gptimer_cb(wlc_info_t *wlc) static void wlc_hwtimer_gptimer_cb(struct wlc_info *wlc)
{ {
/* when interrupt is generated, the counter is loaded with last value /* when interrupt is generated, the counter is loaded with last value
* written and continue to decrement. So it has to be cleaned first * written and continue to decrement. So it has to be cleaned first
...@@ -6370,7 +6372,7 @@ static void wlc_hwtimer_gptimer_cb(wlc_info_t *wlc) ...@@ -6370,7 +6372,7 @@ static void wlc_hwtimer_gptimer_cb(wlc_info_t *wlc)
* POLICY: no macinstatus change, no bounding loop. * POLICY: no macinstatus change, no bounding loop.
* All dpc bounding should be handled in BMAC dpc, like txstatus and rxint * All dpc bounding should be handled in BMAC dpc, like txstatus and rxint
*/ */
void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus) void wlc_high_dpc(struct wlc_info *wlc, u32 macintstatus)
{ {
d11regs_t *regs = wlc->regs; d11regs_t *regs = wlc->regs;
#ifdef BCMDBG #ifdef BCMDBG
...@@ -6463,7 +6465,7 @@ void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus) ...@@ -6463,7 +6465,7 @@ void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus)
ASSERT(wlc_ps_check(wlc)); ASSERT(wlc_ps_check(wlc));
} }
static void *wlc_15420war(wlc_info_t *wlc, uint queue) static void *wlc_15420war(struct wlc_info *wlc, uint queue)
{ {
hnddma_t *di; hnddma_t *di;
void *p; void *p;
...@@ -6493,7 +6495,7 @@ static void *wlc_15420war(wlc_info_t *wlc, uint queue) ...@@ -6493,7 +6495,7 @@ static void *wlc_15420war(wlc_info_t *wlc, uint queue)
return p; return p;
} }
static void wlc_war16165(wlc_info_t *wlc, bool tx) static void wlc_war16165(struct wlc_info *wlc, bool tx)
{ {
if (tx) { if (tx) {
/* the post-increment is used in STAY_AWAKE macro */ /* the post-increment is used in STAY_AWAKE macro */
...@@ -6509,7 +6511,7 @@ static void wlc_war16165(wlc_info_t *wlc, bool tx) ...@@ -6509,7 +6511,7 @@ static void wlc_war16165(wlc_info_t *wlc, bool tx)
/* process an individual tx_status_t */ /* process an individual tx_status_t */
/* WLC_HIGH_API */ /* WLC_HIGH_API */
bool BCMFASTPATH bool BCMFASTPATH
wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2) wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
{ {
struct sk_buff *p; struct sk_buff *p;
uint queue; uint queue;
...@@ -6676,7 +6678,7 @@ wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2) ...@@ -6676,7 +6678,7 @@ wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2)
} }
void BCMFASTPATH void BCMFASTPATH
wlc_txfifo_complete(wlc_info_t *wlc, uint fifo, s8 txpktpend) wlc_txfifo_complete(struct wlc_info *wlc, uint fifo, s8 txpktpend)
{ {
TXPKTPENDDEC(wlc, fifo, txpktpend); TXPKTPENDDEC(wlc, fifo, txpktpend);
WL_TRACE(("wlc_txfifo_complete, pktpend dec %d to %d\n", txpktpend, WL_TRACE(("wlc_txfifo_complete, pktpend dec %d to %d\n", txpktpend,
...@@ -6780,7 +6782,7 @@ u32 wlc_calc_tbtt_offset(u32 bp, u32 tsf_h, u32 tsf_l) ...@@ -6780,7 +6782,7 @@ u32 wlc_calc_tbtt_offset(u32 bp, u32 tsf_h, u32 tsf_l)
} }
/* Update beacon listen interval in shared memory */ /* Update beacon listen interval in shared memory */
void wlc_bcn_li_upd(wlc_info_t *wlc) void wlc_bcn_li_upd(struct wlc_info *wlc)
{ {
if (AP_ENAB(wlc->pub)) if (AP_ENAB(wlc->pub))
return; return;
...@@ -6794,7 +6796,7 @@ void wlc_bcn_li_upd(wlc_info_t *wlc) ...@@ -6794,7 +6796,7 @@ void wlc_bcn_li_upd(wlc_info_t *wlc)
} }
static void static void
prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, struct sk_buff *p, prep_mac80211_status(struct wlc_info *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
struct ieee80211_rx_status *rx_status) struct ieee80211_rx_status *rx_status)
{ {
u32 tsf_l, tsf_h; u32 tsf_l, tsf_h;
...@@ -6904,7 +6906,7 @@ prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, struct sk_buff *p, ...@@ -6904,7 +6906,7 @@ prep_mac80211_status(wlc_info_t *wlc, d11rxhdr_t *rxh, struct sk_buff *p,
} }
static void static void
wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh, wlc_recvctl(struct wlc_info *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
struct sk_buff *p) struct sk_buff *p)
{ {
int len_mpdu; int len_mpdu;
...@@ -6939,7 +6941,7 @@ wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh, ...@@ -6939,7 +6941,7 @@ wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
return; return;
} }
void wlc_bss_list_free(wlc_info_t *wlc, wlc_bss_list_t *bss_list) void wlc_bss_list_free(struct wlc_info *wlc, wlc_bss_list_t *bss_list)
{ {
uint index; uint index;
wlc_bss_info_t *bi; wlc_bss_info_t *bi;
...@@ -6968,7 +6970,7 @@ void wlc_bss_list_free(wlc_info_t *wlc, wlc_bss_list_t *bss_list) ...@@ -6968,7 +6970,7 @@ void wlc_bss_list_free(wlc_info_t *wlc, wlc_bss_list_t *bss_list)
* Param 'bound' indicates max. # frames to process before break out. * Param 'bound' indicates max. # frames to process before break out.
*/ */
/* WLC_HIGH_API */ /* WLC_HIGH_API */
void BCMFASTPATH wlc_recv(wlc_info_t *wlc, struct sk_buff *p) void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
{ {
d11rxhdr_t *rxh; d11rxhdr_t *rxh;
struct dot11_header *h; struct dot11_header *h;
...@@ -7064,7 +7066,7 @@ void BCMFASTPATH wlc_recv(wlc_info_t *wlc, struct sk_buff *p) ...@@ -7064,7 +7066,7 @@ void BCMFASTPATH wlc_recv(wlc_info_t *wlc, struct sk_buff *p)
* len = 3(nsyms + nstream + 3) - 3 * len = 3(nsyms + nstream + 3) - 3
*/ */
u16 BCMFASTPATH u16 BCMFASTPATH
wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, uint mac_len) wlc_calc_lsig_len(struct wlc_info *wlc, ratespec_t ratespec, uint mac_len)
{ {
uint nsyms, len = 0, kNdps; uint nsyms, len = 0, kNdps;
...@@ -7105,7 +7107,7 @@ wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, uint mac_len) ...@@ -7105,7 +7107,7 @@ wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, uint mac_len)
/* calculate frame duration of a given rate and length, return time in usec unit */ /* calculate frame duration of a given rate and length, return time in usec unit */
uint BCMFASTPATH uint BCMFASTPATH
wlc_calc_frame_time(wlc_info_t *wlc, ratespec_t ratespec, u8 preamble_type, wlc_calc_frame_time(struct wlc_info *wlc, ratespec_t ratespec, u8 preamble_type,
uint mac_len) uint mac_len)
{ {
uint nsyms, dur = 0, Ndps, kNdps; uint nsyms, dur = 0, Ndps, kNdps;
...@@ -7175,7 +7177,7 @@ wlc_calc_frame_time(wlc_info_t *wlc, ratespec_t ratespec, u8 preamble_type, ...@@ -7175,7 +7177,7 @@ wlc_calc_frame_time(wlc_info_t *wlc, ratespec_t ratespec, u8 preamble_type,
/* The opposite of wlc_calc_frame_time */ /* The opposite of wlc_calc_frame_time */
static uint static uint
wlc_calc_frame_len(wlc_info_t *wlc, ratespec_t ratespec, u8 preamble_type, wlc_calc_frame_len(struct wlc_info *wlc, ratespec_t ratespec, u8 preamble_type,
uint dur) uint dur)
{ {
uint nsyms, mac_len, Ndps, kNdps; uint nsyms, mac_len, Ndps, kNdps;
...@@ -7221,7 +7223,7 @@ wlc_calc_frame_len(wlc_info_t *wlc, ratespec_t ratespec, u8 preamble_type, ...@@ -7221,7 +7223,7 @@ wlc_calc_frame_len(wlc_info_t *wlc, ratespec_t ratespec, u8 preamble_type,
} }
static uint static uint
wlc_calc_ba_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type) wlc_calc_ba_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
{ {
WL_TRACE(("wl%d: wlc_calc_ba_time: rspec 0x%x, preamble_type %d\n", WL_TRACE(("wl%d: wlc_calc_ba_time: rspec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type)); wlc->pub->unit, rspec, preamble_type));
...@@ -7238,7 +7240,7 @@ wlc_calc_ba_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type) ...@@ -7238,7 +7240,7 @@ wlc_calc_ba_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type)
} }
static uint BCMFASTPATH static uint BCMFASTPATH
wlc_calc_ack_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type) wlc_calc_ack_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
{ {
uint dur = 0; uint dur = 0;
...@@ -7258,7 +7260,7 @@ wlc_calc_ack_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type) ...@@ -7258,7 +7260,7 @@ wlc_calc_ack_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type)
} }
static uint static uint
wlc_calc_cts_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type) wlc_calc_cts_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
{ {
WL_TRACE(("wl%d: wlc_calc_cts_time: ratespec 0x%x, preamble_type %d\n", WL_TRACE(("wl%d: wlc_calc_cts_time: ratespec 0x%x, preamble_type %d\n",
wlc->pub->unit, rspec, preamble_type)); wlc->pub->unit, rspec, preamble_type));
...@@ -7266,7 +7268,7 @@ wlc_calc_cts_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type) ...@@ -7266,7 +7268,7 @@ wlc_calc_cts_time(wlc_info_t *wlc, ratespec_t rspec, u8 preamble_type)
} }
/* derive wlc->band->basic_rate[] table from 'rateset' */ /* derive wlc->band->basic_rate[] table from 'rateset' */
void wlc_rate_lookup_init(wlc_info_t *wlc, wlc_rateset_t *rateset) void wlc_rate_lookup_init(struct wlc_info *wlc, wlc_rateset_t *rateset)
{ {
u8 rate; u8 rate;
u8 mandatory; u8 mandatory;
...@@ -7355,7 +7357,7 @@ void wlc_rate_lookup_init(wlc_info_t *wlc, wlc_rateset_t *rateset) ...@@ -7355,7 +7357,7 @@ void wlc_rate_lookup_init(wlc_info_t *wlc, wlc_rateset_t *rateset)
} }
} }
static void wlc_write_rate_shm(wlc_info_t *wlc, u8 rate, u8 basic_rate) static void wlc_write_rate_shm(struct wlc_info *wlc, u8 rate, u8 basic_rate)
{ {
u8 phy_rate, index; u8 phy_rate, index;
u8 basic_phy_rate, basic_index; u8 basic_phy_rate, basic_index;
...@@ -7388,7 +7390,7 @@ static void wlc_write_rate_shm(wlc_info_t *wlc, u8 rate, u8 basic_rate) ...@@ -7388,7 +7390,7 @@ static void wlc_write_rate_shm(wlc_info_t *wlc, u8 rate, u8 basic_rate)
wlc_write_shm(wlc, (basic_table + index * 2), basic_ptr); wlc_write_shm(wlc, (basic_table + index * 2), basic_ptr);
} }
static const wlc_rateset_t *wlc_rateset_get_hwrs(wlc_info_t *wlc) static const wlc_rateset_t *wlc_rateset_get_hwrs(struct wlc_info *wlc)
{ {
const wlc_rateset_t *rs_dflt; const wlc_rateset_t *rs_dflt;
...@@ -7405,7 +7407,7 @@ static const wlc_rateset_t *wlc_rateset_get_hwrs(wlc_info_t *wlc) ...@@ -7405,7 +7407,7 @@ static const wlc_rateset_t *wlc_rateset_get_hwrs(wlc_info_t *wlc)
return rs_dflt; return rs_dflt;
} }
void wlc_set_ratetable(wlc_info_t *wlc) void wlc_set_ratetable(struct wlc_info *wlc)
{ {
const wlc_rateset_t *rs_dflt; const wlc_rateset_t *rs_dflt;
wlc_rateset_t rs; wlc_rateset_t rs;
...@@ -7441,7 +7443,8 @@ void wlc_set_ratetable(wlc_info_t *wlc) ...@@ -7441,7 +7443,8 @@ void wlc_set_ratetable(wlc_info_t *wlc)
* Return true if the specified rate is supported by the specified band. * Return true if the specified rate is supported by the specified band.
* WLC_BAND_AUTO indicates the current band. * WLC_BAND_AUTO indicates the current band.
*/ */
bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rspec, int band, bool verbose) bool wlc_valid_rate(struct wlc_info *wlc, ratespec_t rspec, int band,
bool verbose)
{ {
wlc_rateset_t *hw_rateset; wlc_rateset_t *hw_rateset;
uint i; uint i;
...@@ -7474,7 +7477,7 @@ bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rspec, int band, bool verbose) ...@@ -7474,7 +7477,7 @@ bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rspec, int band, bool verbose)
return false; return false;
} }
static void wlc_update_mimo_band_bwcap(wlc_info_t *wlc, u8 bwcap) static void wlc_update_mimo_band_bwcap(struct wlc_info *wlc, u8 bwcap)
{ {
uint i; uint i;
wlcband_t *band; wlcband_t *band;
...@@ -7501,7 +7504,7 @@ static void wlc_update_mimo_band_bwcap(wlc_info_t *wlc, u8 bwcap) ...@@ -7501,7 +7504,7 @@ static void wlc_update_mimo_band_bwcap(wlc_info_t *wlc, u8 bwcap)
wlc->mimo_band_bwcap = bwcap; wlc->mimo_band_bwcap = bwcap;
} }
void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len) void wlc_mod_prb_rsp_rate_table(struct wlc_info *wlc, uint frame_len)
{ {
const wlc_rateset_t *rs_dflt; const wlc_rateset_t *rs_dflt;
wlc_rateset_t rs; wlc_rateset_t rs;
...@@ -7544,8 +7547,8 @@ void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len) ...@@ -7544,8 +7547,8 @@ void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len)
} }
u16 u16
wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, bool short_preamble, wlc_compute_bcntsfoff(struct wlc_info *wlc, ratespec_t rspec,
bool phydelay) bool short_preamble, bool phydelay)
{ {
uint bcntsfoff = 0; uint bcntsfoff = 0;
...@@ -7591,7 +7594,7 @@ wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, bool short_preamble, ...@@ -7591,7 +7594,7 @@ wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, bool short_preamble,
* and included up to, but not including, the 4 byte FCS. * and included up to, but not including, the 4 byte FCS.
*/ */
static void static void
wlc_bcn_prb_template(wlc_info_t *wlc, uint type, ratespec_t bcn_rspec, wlc_bcn_prb_template(struct wlc_info *wlc, uint type, ratespec_t bcn_rspec,
wlc_bsscfg_t *cfg, u16 *buf, int *len) wlc_bsscfg_t *cfg, u16 *buf, int *len)
{ {
cck_phy_hdr_t *plcp; cck_phy_hdr_t *plcp;
...@@ -7658,7 +7661,7 @@ int wlc_get_header_len() ...@@ -7658,7 +7661,7 @@ int wlc_get_header_len()
* template updated. * template updated.
* Otherwise, it updates the hardware template. * Otherwise, it updates the hardware template.
*/ */
void wlc_bss_update_beacon(wlc_info_t *wlc, wlc_bsscfg_t *cfg) void wlc_bss_update_beacon(struct wlc_info *wlc, wlc_bsscfg_t *cfg)
{ {
int len = BCN_TMPL_LEN; int len = BCN_TMPL_LEN;
...@@ -7711,7 +7714,7 @@ void wlc_bss_update_beacon(wlc_info_t *wlc, wlc_bsscfg_t *cfg) ...@@ -7711,7 +7714,7 @@ void wlc_bss_update_beacon(wlc_info_t *wlc, wlc_bsscfg_t *cfg)
/* /*
* Update all beacons for the system. * Update all beacons for the system.
*/ */
void wlc_update_beacon(wlc_info_t *wlc) void wlc_update_beacon(struct wlc_info *wlc)
{ {
int idx; int idx;
wlc_bsscfg_t *bsscfg; wlc_bsscfg_t *bsscfg;
...@@ -7724,7 +7727,7 @@ void wlc_update_beacon(wlc_info_t *wlc) ...@@ -7724,7 +7727,7 @@ void wlc_update_beacon(wlc_info_t *wlc)
} }
/* Write ssid into shared memory */ /* Write ssid into shared memory */
void wlc_shm_ssid_upd(wlc_info_t *wlc, wlc_bsscfg_t *cfg) void wlc_shm_ssid_upd(struct wlc_info *wlc, wlc_bsscfg_t *cfg)
{ {
u8 *ssidptr = cfg->SSID; u8 *ssidptr = cfg->SSID;
u16 base = M_SSID; u16 base = M_SSID;
...@@ -7740,7 +7743,7 @@ void wlc_shm_ssid_upd(wlc_info_t *wlc, wlc_bsscfg_t *cfg) ...@@ -7740,7 +7743,7 @@ void wlc_shm_ssid_upd(wlc_info_t *wlc, wlc_bsscfg_t *cfg)
wlc_write_shm(wlc, M_SSIDLEN, (u16) cfg->SSID_len); wlc_write_shm(wlc, M_SSIDLEN, (u16) cfg->SSID_len);
} }
void wlc_update_probe_resp(wlc_info_t *wlc, bool suspend) void wlc_update_probe_resp(struct wlc_info *wlc, bool suspend)
{ {
int idx; int idx;
wlc_bsscfg_t *bsscfg; wlc_bsscfg_t *bsscfg;
...@@ -7753,7 +7756,7 @@ void wlc_update_probe_resp(wlc_info_t *wlc, bool suspend) ...@@ -7753,7 +7756,7 @@ void wlc_update_probe_resp(wlc_info_t *wlc, bool suspend)
} }
void void
wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend) wlc_bss_update_probe_resp(struct wlc_info *wlc, wlc_bsscfg_t *cfg, bool suspend)
{ {
u16 prb_resp[BCN_TMPL_LEN / 2]; u16 prb_resp[BCN_TMPL_LEN / 2];
int len = BCN_TMPL_LEN; int len = BCN_TMPL_LEN;
...@@ -7794,7 +7797,7 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend) ...@@ -7794,7 +7797,7 @@ wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, bool suspend)
} }
/* prepares pdu for transmission. returns BCM error codes */ /* prepares pdu for transmission. returns BCM error codes */
int wlc_prep_pdu(wlc_info_t *wlc, struct sk_buff *pdu, uint *fifop) int wlc_prep_pdu(struct wlc_info *wlc, struct sk_buff *pdu, uint *fifop)
{ {
struct osl_info *osh; struct osl_info *osh;
uint fifo; uint fifo;
...@@ -7833,7 +7836,7 @@ int wlc_prep_pdu(wlc_info_t *wlc, struct sk_buff *pdu, uint *fifop) ...@@ -7833,7 +7836,7 @@ int wlc_prep_pdu(wlc_info_t *wlc, struct sk_buff *pdu, uint *fifop)
} }
/* init tx reported rate mechanism */ /* init tx reported rate mechanism */
void wlc_reprate_init(wlc_info_t *wlc) void wlc_reprate_init(struct wlc_info *wlc)
{ {
int i; int i;
wlc_bsscfg_t *bsscfg; wlc_bsscfg_t *bsscfg;
...@@ -7853,7 +7856,7 @@ void wlc_bsscfg_reprate_init(wlc_bsscfg_t *bsscfg) ...@@ -7853,7 +7856,7 @@ void wlc_bsscfg_reprate_init(wlc_bsscfg_t *bsscfg)
/* Retrieve a consolidated set of revision information, /* Retrieve a consolidated set of revision information,
* typically for the WLC_GET_REVINFO ioctl * typically for the WLC_GET_REVINFO ioctl
*/ */
int wlc_get_revision_info(wlc_info_t *wlc, void *buf, uint len) int wlc_get_revision_info(struct wlc_info *wlc, void *buf, uint len)
{ {
wlc_rev_info_t *rinfo = (wlc_rev_info_t *) buf; wlc_rev_info_t *rinfo = (wlc_rev_info_t *) buf;
...@@ -7887,7 +7890,7 @@ int wlc_get_revision_info(wlc_info_t *wlc, void *buf, uint len) ...@@ -7887,7 +7890,7 @@ int wlc_get_revision_info(wlc_info_t *wlc, void *buf, uint len)
return BCME_OK; return BCME_OK;
} }
void wlc_default_rateset(wlc_info_t *wlc, wlc_rateset_t *rs) void wlc_default_rateset(struct wlc_info *wlc, wlc_rateset_t *rs)
{ {
wlc_rateset_default(rs, NULL, wlc->band->phytype, wlc->band->bandtype, wlc_rateset_default(rs, NULL, wlc->band->phytype, wlc->band->bandtype,
false, RATE_MASK_FULL, (bool) N_ENAB(wlc->pub), false, RATE_MASK_FULL, (bool) N_ENAB(wlc->pub),
...@@ -7895,7 +7898,7 @@ void wlc_default_rateset(wlc_info_t *wlc, wlc_rateset_t *rs) ...@@ -7895,7 +7898,7 @@ void wlc_default_rateset(wlc_info_t *wlc, wlc_rateset_t *rs)
wlc->stf->txstreams); wlc->stf->txstreams);
} }
static void wlc_bss_default_init(wlc_info_t *wlc) static void wlc_bss_default_init(struct wlc_info *wlc)
{ {
chanspec_t chanspec; chanspec_t chanspec;
wlcband_t *band; wlcband_t *band;
...@@ -7933,7 +7936,7 @@ static void wlc_bss_default_init(wlc_info_t *wlc) ...@@ -7933,7 +7936,7 @@ static void wlc_bss_default_init(wlc_info_t *wlc)
/* Deferred event processing */ /* Deferred event processing */
static void wlc_process_eventq(void *arg) static void wlc_process_eventq(void *arg)
{ {
wlc_info_t *wlc = (wlc_info_t *) arg; struct wlc_info *wlc = (struct wlc_info *) arg;
wlc_event_t *etmp; wlc_event_t *etmp;
while ((etmp = wlc_eventq_deq(wlc->eventq))) { while ((etmp = wlc_eventq_deq(wlc->eventq))) {
...@@ -7959,7 +7962,7 @@ wlc_uint64_sub(u32 *a_high, u32 *a_low, u32 b_high, u32 b_low) ...@@ -7959,7 +7962,7 @@ 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(wlc_info_t *wlc, wlcband_t *cur_band, u32 int_val) mac80211_wlc_set_nrate(struct wlc_info *wlc, wlcband_t *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;
...@@ -8073,7 +8076,7 @@ mac80211_wlc_set_nrate(wlc_info_t *wlc, wlcband_t *cur_band, u32 int_val) ...@@ -8073,7 +8076,7 @@ mac80211_wlc_set_nrate(wlc_info_t *wlc, wlcband_t *cur_band, u32 int_val)
/* formula: IDLE_BUSY_RATIO_X_16 = (100-duty_cycle)/duty_cycle*16 */ /* formula: IDLE_BUSY_RATIO_X_16 = (100-duty_cycle)/duty_cycle*16 */
static int static int
wlc_duty_cycle_set(wlc_info_t *wlc, int duty_cycle, bool isOFDM, wlc_duty_cycle_set(struct wlc_info *wlc, int duty_cycle, bool isOFDM,
bool writeToShm) bool writeToShm)
{ {
int idle_busy_ratio_x_16 = 0; int idle_busy_ratio_x_16 = 0;
...@@ -8102,7 +8105,7 @@ wlc_duty_cycle_set(wlc_info_t *wlc, int duty_cycle, bool isOFDM, ...@@ -8102,7 +8105,7 @@ wlc_duty_cycle_set(wlc_info_t *wlc, int duty_cycle, bool isOFDM,
/* Read a single u16 from shared memory. /* Read a single u16 from shared memory.
* SHM 'offset' needs to be an even address * SHM 'offset' needs to be an even address
*/ */
u16 wlc_read_shm(wlc_info_t *wlc, uint offset) u16 wlc_read_shm(struct wlc_info *wlc, uint offset)
{ {
return wlc_bmac_read_shm(wlc->hw, offset); return wlc_bmac_read_shm(wlc->hw, offset);
} }
...@@ -8110,7 +8113,7 @@ u16 wlc_read_shm(wlc_info_t *wlc, uint offset) ...@@ -8110,7 +8113,7 @@ u16 wlc_read_shm(wlc_info_t *wlc, uint offset)
/* Write a single u16 to shared memory. /* Write a single u16 to shared memory.
* SHM 'offset' needs to be an even address * SHM 'offset' needs to be an even address
*/ */
void wlc_write_shm(wlc_info_t *wlc, uint offset, u16 v) void wlc_write_shm(struct wlc_info *wlc, uint offset, u16 v)
{ {
wlc_bmac_write_shm(wlc->hw, offset, v); wlc_bmac_write_shm(wlc->hw, offset, v);
} }
...@@ -8119,7 +8122,7 @@ void wlc_write_shm(wlc_info_t *wlc, uint offset, u16 v) ...@@ -8119,7 +8122,7 @@ void wlc_write_shm(wlc_info_t *wlc, uint offset, u16 v)
* SHM 'offset' needs to be an even address and * SHM 'offset' needs to be an even address and
* Range length 'len' must be an even number of bytes * Range length 'len' must be an even number of bytes
*/ */
void wlc_set_shm(wlc_info_t *wlc, uint offset, u16 v, int len) void wlc_set_shm(struct wlc_info *wlc, uint offset, u16 v, int len)
{ {
/* offset and len need to be even */ /* offset and len need to be even */
ASSERT((offset & 1) == 0); ASSERT((offset & 1) == 0);
...@@ -8135,7 +8138,7 @@ void wlc_set_shm(wlc_info_t *wlc, uint offset, u16 v, int len) ...@@ -8135,7 +8138,7 @@ void wlc_set_shm(wlc_info_t *wlc, uint offset, u16 v, int len)
* SHM 'offset' needs to be an even address and * SHM 'offset' needs to be an even address and
* Buffer length 'len' must be an even number of bytes * Buffer length 'len' must be an even number of bytes
*/ */
void wlc_copyto_shm(wlc_info_t *wlc, uint offset, const void *buf, int len) void wlc_copyto_shm(struct wlc_info *wlc, uint offset, const void *buf, int len)
{ {
/* offset and len need to be even */ /* offset and len need to be even */
ASSERT((offset & 1) == 0); ASSERT((offset & 1) == 0);
...@@ -8151,7 +8154,7 @@ void wlc_copyto_shm(wlc_info_t *wlc, uint offset, const void *buf, int len) ...@@ -8151,7 +8154,7 @@ void wlc_copyto_shm(wlc_info_t *wlc, uint offset, const void *buf, int len)
* SHM 'offset' needs to be an even address and * SHM 'offset' needs to be an even address and
* Buffer length 'len' must be an even number of bytes * Buffer length 'len' must be an even number of bytes
*/ */
void wlc_copyfrom_shm(wlc_info_t *wlc, uint offset, void *buf, int len) void wlc_copyfrom_shm(struct wlc_info *wlc, uint offset, void *buf, int len)
{ {
/* offset and len need to be even */ /* offset and len need to be even */
ASSERT((offset & 1) == 0); ASSERT((offset & 1) == 0);
...@@ -8164,71 +8167,73 @@ void wlc_copyfrom_shm(wlc_info_t *wlc, uint offset, void *buf, int len) ...@@ -8164,71 +8167,73 @@ void wlc_copyfrom_shm(wlc_info_t *wlc, uint offset, void *buf, int len)
} }
/* wrapper BMAC functions to for HIGH driver access */ /* wrapper BMAC functions to for HIGH driver access */
void wlc_mctrl(wlc_info_t *wlc, u32 mask, u32 val) void wlc_mctrl(struct wlc_info *wlc, u32 mask, u32 val)
{ {
wlc_bmac_mctrl(wlc->hw, mask, val); wlc_bmac_mctrl(wlc->hw, mask, val);
} }
void wlc_corereset(wlc_info_t *wlc, u32 flags) void wlc_corereset(struct wlc_info *wlc, u32 flags)
{ {
wlc_bmac_corereset(wlc->hw, flags); wlc_bmac_corereset(wlc->hw, flags);
} }
void wlc_mhf(wlc_info_t *wlc, u8 idx, u16 mask, u16 val, int bands) void wlc_mhf(struct wlc_info *wlc, u8 idx, u16 mask, u16 val, int bands)
{ {
wlc_bmac_mhf(wlc->hw, idx, mask, val, bands); wlc_bmac_mhf(wlc->hw, idx, mask, val, bands);
} }
u16 wlc_mhf_get(wlc_info_t *wlc, u8 idx, int bands) u16 wlc_mhf_get(struct wlc_info *wlc, u8 idx, int bands)
{ {
return wlc_bmac_mhf_get(wlc->hw, idx, bands); return wlc_bmac_mhf_get(wlc->hw, idx, bands);
} }
int wlc_xmtfifo_sz_get(wlc_info_t *wlc, uint fifo, uint *blocks) int wlc_xmtfifo_sz_get(struct wlc_info *wlc, uint fifo, uint *blocks)
{ {
return wlc_bmac_xmtfifo_sz_get(wlc->hw, fifo, blocks); return wlc_bmac_xmtfifo_sz_get(wlc->hw, fifo, blocks);
} }
void wlc_write_template_ram(wlc_info_t *wlc, int offset, int len, void *buf) void wlc_write_template_ram(struct wlc_info *wlc, int offset, int len,
void *buf)
{ {
wlc_bmac_write_template_ram(wlc->hw, offset, len, buf); wlc_bmac_write_template_ram(wlc->hw, offset, len, buf);
} }
void wlc_write_hw_bcntemplates(wlc_info_t *wlc, void *bcn, int len, bool both) void wlc_write_hw_bcntemplates(struct wlc_info *wlc, void *bcn, int len,
bool both)
{ {
wlc_bmac_write_hw_bcntemplates(wlc->hw, bcn, len, both); wlc_bmac_write_hw_bcntemplates(wlc->hw, bcn, len, both);
} }
void void
wlc_set_addrmatch(wlc_info_t *wlc, int match_reg_offset, wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
const struct ether_addr *addr) const struct ether_addr *addr)
{ {
wlc_bmac_set_addrmatch(wlc->hw, match_reg_offset, addr); wlc_bmac_set_addrmatch(wlc->hw, match_reg_offset, addr);
} }
void wlc_set_rcmta(wlc_info_t *wlc, int idx, const struct ether_addr *addr) void wlc_set_rcmta(struct wlc_info *wlc, int idx, const struct ether_addr *addr)
{ {
wlc_bmac_set_rcmta(wlc->hw, idx, addr); wlc_bmac_set_rcmta(wlc->hw, idx, addr);
} }
void wlc_read_tsf(wlc_info_t *wlc, u32 *tsf_l_ptr, u32 *tsf_h_ptr) void wlc_read_tsf(struct wlc_info *wlc, u32 *tsf_l_ptr, u32 *tsf_h_ptr)
{ {
wlc_bmac_read_tsf(wlc->hw, tsf_l_ptr, tsf_h_ptr); wlc_bmac_read_tsf(wlc->hw, tsf_l_ptr, tsf_h_ptr);
} }
void wlc_set_cwmin(wlc_info_t *wlc, u16 newmin) void wlc_set_cwmin(struct wlc_info *wlc, u16 newmin)
{ {
wlc->band->CWmin = newmin; wlc->band->CWmin = newmin;
wlc_bmac_set_cwmin(wlc->hw, newmin); wlc_bmac_set_cwmin(wlc->hw, newmin);
} }
void wlc_set_cwmax(wlc_info_t *wlc, u16 newmax) void wlc_set_cwmax(struct wlc_info *wlc, u16 newmax)
{ {
wlc->band->CWmax = newmax; wlc->band->CWmax = newmax;
wlc_bmac_set_cwmax(wlc->hw, newmax); wlc_bmac_set_cwmax(wlc->hw, newmax);
} }
void wlc_fifoerrors(wlc_info_t *wlc) void wlc_fifoerrors(struct wlc_info *wlc)
{ {
wlc_bmac_fifoerrors(wlc->hw); wlc_bmac_fifoerrors(wlc->hw);
...@@ -8236,16 +8241,16 @@ void wlc_fifoerrors(wlc_info_t *wlc) ...@@ -8236,16 +8241,16 @@ void wlc_fifoerrors(wlc_info_t *wlc)
/* Search mem rw utilities */ /* Search mem rw utilities */
void wlc_pllreq(wlc_info_t *wlc, bool set, mbool req_bit) void wlc_pllreq(struct wlc_info *wlc, bool set, mbool req_bit)
{ {
wlc_bmac_pllreq(wlc->hw, set, req_bit); wlc_bmac_pllreq(wlc->hw, set, req_bit);
} }
void wlc_reset_bmac_done(wlc_info_t *wlc) void wlc_reset_bmac_done(struct wlc_info *wlc)
{ {
} }
void wlc_ht_mimops_cap_update(wlc_info_t *wlc, u8 mimops_mode) void wlc_ht_mimops_cap_update(struct wlc_info *wlc, u8 mimops_mode)
{ {
wlc->ht_cap.cap &= ~HT_CAP_MIMO_PS_MASK; wlc->ht_cap.cap &= ~HT_CAP_MIMO_PS_MASK;
wlc->ht_cap.cap |= (mimops_mode << HT_CAP_MIMO_PS_SHIFT); wlc->ht_cap.cap |= (mimops_mode << HT_CAP_MIMO_PS_SHIFT);
...@@ -8258,7 +8263,7 @@ void wlc_ht_mimops_cap_update(wlc_info_t *wlc, u8 mimops_mode) ...@@ -8258,7 +8263,7 @@ void wlc_ht_mimops_cap_update(wlc_info_t *wlc, u8 mimops_mode)
/* check for the particular priority flow control bit being set */ /* check for the particular priority flow control bit being set */
bool bool
wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *q, int prio) wlc_txflowcontrol_prio_isset(struct wlc_info *wlc, wlc_txq_info_t *q, int prio)
{ {
uint prio_mask; uint prio_mask;
...@@ -8273,7 +8278,8 @@ wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *q, int prio) ...@@ -8273,7 +8278,8 @@ wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *q, int prio)
} }
/* propogate the flow control to all interfaces using the given tx queue */ /* propogate the flow control to all interfaces using the given tx queue */
void wlc_txflowcontrol(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, int prio) void wlc_txflowcontrol(struct wlc_info *wlc, wlc_txq_info_t *qi,
bool on, int prio)
{ {
uint prio_bits; uint prio_bits;
uint cur_bits; uint cur_bits;
...@@ -8315,7 +8321,7 @@ void wlc_txflowcontrol(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, int prio) ...@@ -8315,7 +8321,7 @@ void wlc_txflowcontrol(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, int prio)
} }
void void
wlc_txflowcontrol_override(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, wlc_txflowcontrol_override(struct wlc_info *wlc, wlc_txq_info_t *qi, bool on,
uint override) uint override)
{ {
uint prev_override; uint prev_override;
...@@ -8362,7 +8368,7 @@ wlc_txflowcontrol_override(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, ...@@ -8362,7 +8368,7 @@ wlc_txflowcontrol_override(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on,
} }
} }
static void wlc_txflowcontrol_reset(wlc_info_t *wlc) static void wlc_txflowcontrol_reset(struct wlc_info *wlc)
{ {
wlc_txq_info_t *qi; wlc_txq_info_t *qi;
...@@ -8375,7 +8381,7 @@ static void wlc_txflowcontrol_reset(wlc_info_t *wlc) ...@@ -8375,7 +8381,7 @@ static void wlc_txflowcontrol_reset(wlc_info_t *wlc)
} }
static void static void
wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, wlc_txflowcontrol_signal(struct wlc_info *wlc, wlc_txq_info_t *qi, bool on,
int prio) int prio)
{ {
wlc_if_t *wlcif; wlc_if_t *wlcif;
...@@ -8386,7 +8392,7 @@ wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, ...@@ -8386,7 +8392,7 @@ wlc_txflowcontrol_signal(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on,
} }
} }
static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, struct osl_info *osh) static wlc_txq_info_t *wlc_txq_alloc(struct wlc_info *wlc, struct osl_info *osh)
{ {
wlc_txq_info_t *qi, *p; wlc_txq_info_t *qi, *p;
...@@ -8416,7 +8422,7 @@ static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, struct osl_info *osh) ...@@ -8416,7 +8422,7 @@ static wlc_txq_info_t *wlc_txq_alloc(wlc_info_t *wlc, struct osl_info *osh)
return qi; return qi;
} }
static void wlc_txq_free(wlc_info_t *wlc, struct osl_info *osh, static void wlc_txq_free(struct wlc_info *wlc, struct osl_info *osh,
wlc_txq_info_t *qi) wlc_txq_info_t *qi)
{ {
wlc_txq_info_t *p; wlc_txq_info_t *p;
......
...@@ -350,7 +350,7 @@ typedef struct wlcband { ...@@ -350,7 +350,7 @@ typedef struct wlcband {
typedef void (*cb_fn_t) (void *); typedef void (*cb_fn_t) (void *);
/* tx completion callback takes 3 args */ /* tx completion callback takes 3 args */
typedef void (*pkcb_fn_t) (wlc_info_t *wlc, uint txstatus, void *arg); typedef void (*pkcb_fn_t) (struct wlc_info *wlc, uint txstatus, void *arg);
typedef struct pkt_cb { typedef struct pkt_cb {
pkcb_fn_t fn; /* function to call when tx frame completes */ pkcb_fn_t fn; /* function to call when tx frame completes */
...@@ -421,7 +421,7 @@ typedef struct wlc_hwband { ...@@ -421,7 +421,7 @@ typedef struct wlc_hwband {
struct wlc_hw_info { struct wlc_hw_info {
struct osl_info *osh; /* pointer to os handle */ struct osl_info *osh; /* pointer to os handle */
bool _piomode; /* true if pio mode */ bool _piomode; /* true if pio mode */
wlc_info_t *wlc; struct wlc_info *wlc;
/* fifo */ /* fifo */
hnddma_t *di[NFIFO]; /* hnddma handles, per fifo */ hnddma_t *di[NFIFO]; /* hnddma handles, per fifo */
...@@ -782,7 +782,7 @@ struct wlc_info { ...@@ -782,7 +782,7 @@ struct wlc_info {
/* antsel module specific state */ /* antsel module specific state */
struct antsel_info { struct antsel_info {
wlc_info_t *wlc; /* pointer to main wlc structure */ struct wlc_info *wlc; /* pointer to main wlc structure */
wlc_pub_t *pub; /* pointer to public fn */ wlc_pub_t *pub; /* pointer to public fn */
u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic
* 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
...@@ -815,44 +815,45 @@ struct antsel_info { ...@@ -815,44 +815,45 @@ struct antsel_info {
#define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \ #define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \
((len1 == len2) && !memcmp(ssid1, ssid2, len1)) ((len1 == len2) && !memcmp(ssid1, ssid2, len1))
extern void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus); extern void wlc_high_dpc(struct wlc_info *wlc, u32 macintstatus);
extern void wlc_fatal_error(wlc_info_t *wlc); extern void wlc_fatal_error(struct wlc_info *wlc);
extern void wlc_bmac_rpc_watchdog(wlc_info_t *wlc); extern void wlc_bmac_rpc_watchdog(struct wlc_info *wlc);
extern void wlc_recv(wlc_info_t *wlc, struct sk_buff *p); extern void wlc_recv(struct wlc_info *wlc, struct sk_buff *p);
extern bool wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2); extern bool wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2);
extern void wlc_txfifo(wlc_info_t *wlc, uint fifo, struct sk_buff *p, extern void wlc_txfifo(struct wlc_info *wlc, uint fifo, struct sk_buff *p,
bool commit, s8 txpktpend); bool commit, s8 txpktpend);
extern void wlc_txfifo_complete(wlc_info_t *wlc, uint fifo, s8 txpktpend); extern void wlc_txfifo_complete(struct wlc_info *wlc, uint fifo, s8 txpktpend);
extern void wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu, extern void wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
uint prec); uint prec);
extern void wlc_info_init(wlc_info_t *wlc, int unit); extern void wlc_info_init(struct wlc_info *wlc, int unit);
extern void wlc_print_txstatus(tx_status_t *txs); extern void wlc_print_txstatus(tx_status_t *txs);
extern int wlc_xmtfifo_sz_get(wlc_info_t *wlc, uint fifo, uint *blocks); extern int wlc_xmtfifo_sz_get(struct wlc_info *wlc, uint fifo, uint *blocks);
extern void wlc_write_template_ram(wlc_info_t *wlc, int offset, int len, extern void wlc_write_template_ram(struct wlc_info *wlc, int offset, int len,
void *buf); void *buf);
extern void wlc_write_hw_bcntemplates(wlc_info_t *wlc, void *bcn, int len, extern void wlc_write_hw_bcntemplates(struct wlc_info *wlc, void *bcn, int len,
bool both); bool both);
#if defined(BCMDBG) #if defined(BCMDBG)
extern void wlc_get_rcmta(wlc_info_t *wlc, int idx, struct ether_addr *addr); extern void wlc_get_rcmta(struct wlc_info *wlc, int idx,
struct ether_addr *addr);
#endif #endif
extern void wlc_set_rcmta(wlc_info_t *wlc, int idx, extern void wlc_set_rcmta(struct wlc_info *wlc, int idx,
const struct ether_addr *addr); const struct ether_addr *addr);
extern void wlc_set_addrmatch(wlc_info_t *wlc, int match_reg_offset, extern void wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
const struct ether_addr *addr); const struct ether_addr *addr);
extern void wlc_read_tsf(wlc_info_t *wlc, u32 *tsf_l_ptr, extern void wlc_read_tsf(struct wlc_info *wlc, u32 *tsf_l_ptr,
u32 *tsf_h_ptr); u32 *tsf_h_ptr);
extern void wlc_set_cwmin(wlc_info_t *wlc, u16 newmin); extern void wlc_set_cwmin(struct wlc_info *wlc, u16 newmin);
extern void wlc_set_cwmax(wlc_info_t *wlc, u16 newmax); extern void wlc_set_cwmax(struct wlc_info *wlc, u16 newmax);
extern void wlc_fifoerrors(wlc_info_t *wlc); extern void wlc_fifoerrors(struct wlc_info *wlc);
extern void wlc_pllreq(wlc_info_t *wlc, bool set, mbool req_bit); extern void wlc_pllreq(struct wlc_info *wlc, bool set, mbool req_bit);
extern void wlc_reset_bmac_done(wlc_info_t *wlc); extern void wlc_reset_bmac_done(struct wlc_info *wlc);
extern void wlc_protection_upd(wlc_info_t *wlc, uint idx, int val); extern void wlc_protection_upd(struct wlc_info *wlc, uint idx, int val);
extern void wlc_hwtimer_gptimer_set(wlc_info_t *wlc, uint us); extern void wlc_hwtimer_gptimer_set(struct wlc_info *wlc, uint us);
extern void wlc_hwtimer_gptimer_abort(wlc_info_t *wlc); extern void wlc_hwtimer_gptimer_abort(struct wlc_info *wlc);
#if defined(BCMDBG) #if defined(BCMDBG)
extern void wlc_print_rxh(d11rxhdr_t *rxh); extern void wlc_print_rxh(d11rxhdr_t *rxh);
extern void wlc_print_hdrs(wlc_info_t *wlc, const char *prefix, u8 *frame, extern void wlc_print_hdrs(struct wlc_info *wlc, const char *prefix, u8 *frame,
d11txh_t *txh, d11rxhdr_t *rxh, uint len); d11txh_t *txh, d11rxhdr_t *rxh, uint len);
extern void wlc_print_txdesc(d11txh_t *txh); extern void wlc_print_txdesc(d11txh_t *txh);
#endif #endif
...@@ -863,79 +864,83 @@ extern void wlc_print_dot11_mac_hdr(u8 *buf, int len); ...@@ -863,79 +864,83 @@ extern void wlc_print_dot11_mac_hdr(u8 *buf, int len);
extern void wlc_setxband(wlc_hw_info_t *wlc_hw, uint bandunit); extern void wlc_setxband(wlc_hw_info_t *wlc_hw, uint bandunit);
extern void wlc_coredisable(wlc_hw_info_t *wlc_hw); extern void wlc_coredisable(wlc_hw_info_t *wlc_hw);
extern bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rate, int band, extern bool wlc_valid_rate(struct wlc_info *wlc, ratespec_t rate, int band,
bool verbose); bool verbose);
extern void wlc_ap_upd(wlc_info_t *wlc); extern void wlc_ap_upd(struct wlc_info *wlc);
/* helper functions */ /* helper functions */
extern void wlc_shm_ssid_upd(wlc_info_t *wlc, wlc_bsscfg_t *cfg); extern void wlc_shm_ssid_upd(struct wlc_info *wlc, wlc_bsscfg_t *cfg);
extern int wlc_set_gmode(wlc_info_t *wlc, u8 gmode, bool config); extern int wlc_set_gmode(struct wlc_info *wlc, u8 gmode, bool config);
extern void wlc_mac_bcn_promisc_change(wlc_info_t *wlc, bool promisc); extern void wlc_mac_bcn_promisc_change(struct wlc_info *wlc, bool promisc);
extern void wlc_mac_bcn_promisc(wlc_info_t *wlc); extern void wlc_mac_bcn_promisc(struct wlc_info *wlc);
extern void wlc_mac_promisc(wlc_info_t *wlc); extern void wlc_mac_promisc(struct wlc_info *wlc);
extern void wlc_txflowcontrol(wlc_info_t *wlc, wlc_txq_info_t *qi, bool on, extern void wlc_txflowcontrol(struct wlc_info *wlc, wlc_txq_info_t *qi, bool on,
int prio); int prio);
extern void wlc_txflowcontrol_override(wlc_info_t *wlc, wlc_txq_info_t *qi, extern void wlc_txflowcontrol_override(struct wlc_info *wlc, wlc_txq_info_t *qi,
bool on, uint override); bool on, uint override);
extern bool wlc_txflowcontrol_prio_isset(wlc_info_t *wlc, wlc_txq_info_t *qi, extern bool wlc_txflowcontrol_prio_isset(struct wlc_info *wlc,
int prio); wlc_txq_info_t *qi, int prio);
extern void wlc_send_q(wlc_info_t *wlc, wlc_txq_info_t *qi); extern void wlc_send_q(struct wlc_info *wlc, wlc_txq_info_t *qi);
extern int wlc_prep_pdu(wlc_info_t *wlc, struct sk_buff *pdu, uint *fifo); extern int wlc_prep_pdu(struct wlc_info *wlc, struct sk_buff *pdu, uint *fifo);
extern u16 wlc_calc_lsig_len(wlc_info_t *wlc, ratespec_t ratespec, extern u16 wlc_calc_lsig_len(struct wlc_info *wlc, ratespec_t ratespec,
uint mac_len); uint mac_len);
extern ratespec_t wlc_rspec_to_rts_rspec(wlc_info_t *wlc, ratespec_t rspec, extern ratespec_t wlc_rspec_to_rts_rspec(struct wlc_info *wlc, ratespec_t rspec,
bool use_rspec, u16 mimo_ctlchbw); bool use_rspec, u16 mimo_ctlchbw);
extern u16 wlc_compute_rtscts_dur(wlc_info_t *wlc, bool cts_only, extern u16 wlc_compute_rtscts_dur(struct wlc_info *wlc, bool cts_only,
ratespec_t rts_rate, ratespec_t frame_rate, ratespec_t rts_rate, ratespec_t frame_rate,
u8 rts_preamble_type, u8 rts_preamble_type,
u8 frame_preamble_type, uint frame_len, u8 frame_preamble_type, uint frame_len,
bool ba); bool ba);
extern void wlc_tbtt(wlc_info_t *wlc, d11regs_t *regs); extern void wlc_tbtt(struct wlc_info *wlc, d11regs_t *regs);
#if defined(BCMDBG) #if defined(BCMDBG)
extern void wlc_dump_ie(wlc_info_t *wlc, bcm_tlv_t *ie, struct bcmstrbuf *b); extern void wlc_dump_ie(struct wlc_info *wlc, bcm_tlv_t *ie,
struct bcmstrbuf *b);
#endif #endif
extern bool wlc_ps_check(wlc_info_t *wlc); extern bool wlc_ps_check(struct wlc_info *wlc);
extern void wlc_reprate_init(wlc_info_t *wlc); extern void wlc_reprate_init(struct wlc_info *wlc);
extern void wlc_bsscfg_reprate_init(wlc_bsscfg_t *bsscfg); extern void wlc_bsscfg_reprate_init(wlc_bsscfg_t *bsscfg);
extern void wlc_uint64_sub(u32 *a_high, u32 *a_low, u32 b_high, extern void wlc_uint64_sub(u32 *a_high, u32 *a_low, u32 b_high,
u32 b_low); u32 b_low);
extern u32 wlc_calc_tbtt_offset(u32 bi, u32 tsf_h, u32 tsf_l); extern u32 wlc_calc_tbtt_offset(u32 bi, u32 tsf_h, u32 tsf_l);
/* Shared memory access */ /* Shared memory access */
extern void wlc_write_shm(wlc_info_t *wlc, uint offset, u16 v); extern void wlc_write_shm(struct wlc_info *wlc, uint offset, u16 v);
extern u16 wlc_read_shm(wlc_info_t *wlc, uint offset); extern u16 wlc_read_shm(struct wlc_info *wlc, uint offset);
extern void wlc_set_shm(wlc_info_t *wlc, uint offset, u16 v, int len); extern void wlc_set_shm(struct wlc_info *wlc, uint offset, u16 v, int len);
extern void wlc_copyto_shm(wlc_info_t *wlc, uint offset, const void *buf, extern void wlc_copyto_shm(struct wlc_info *wlc, uint offset, const void *buf,
int len);
extern void wlc_copyfrom_shm(struct wlc_info *wlc, uint offset, void *buf,
int len); int len);
extern void wlc_copyfrom_shm(wlc_info_t *wlc, uint offset, void *buf, int len);
extern void wlc_update_beacon(wlc_info_t *wlc); extern void wlc_update_beacon(struct wlc_info *wlc);
extern void wlc_bss_update_beacon(wlc_info_t *wlc, struct wlc_bsscfg *bsscfg); extern void wlc_bss_update_beacon(struct wlc_info *wlc,
struct wlc_bsscfg *bsscfg);
extern void wlc_update_probe_resp(wlc_info_t *wlc, bool suspend); extern void wlc_update_probe_resp(struct wlc_info *wlc, bool suspend);
extern void wlc_bss_update_probe_resp(wlc_info_t *wlc, wlc_bsscfg_t *cfg, extern void wlc_bss_update_probe_resp(struct wlc_info *wlc, wlc_bsscfg_t *cfg,
bool suspend); bool suspend);
extern bool wlc_ismpc(wlc_info_t *wlc); extern bool wlc_ismpc(struct wlc_info *wlc);
extern bool wlc_is_non_delay_mpc(wlc_info_t *wlc); extern bool wlc_is_non_delay_mpc(struct wlc_info *wlc);
extern void wlc_radio_mpc_upd(wlc_info_t *wlc); extern void wlc_radio_mpc_upd(struct wlc_info *wlc);
extern bool wlc_prec_enq(wlc_info_t *wlc, struct pktq *q, void *pkt, int prec); extern bool wlc_prec_enq(struct wlc_info *wlc, struct pktq *q, void *pkt,
extern bool wlc_prec_enq_head(wlc_info_t *wlc, struct pktq *q, int prec);
extern bool wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q,
struct sk_buff *pkt, int prec, bool head); struct sk_buff *pkt, int prec, bool head);
extern u16 wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec); extern u16 wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec);
extern void wlc_compute_plcp(wlc_info_t *wlc, ratespec_t rate, uint length, extern void wlc_compute_plcp(struct wlc_info *wlc, ratespec_t rate, uint length,
u8 *plcp); u8 *plcp);
extern uint wlc_calc_frame_time(wlc_info_t *wlc, ratespec_t ratespec, extern uint wlc_calc_frame_time(struct wlc_info *wlc, ratespec_t ratespec,
u8 preamble_type, uint mac_len); u8 preamble_type, uint mac_len);
extern void wlc_set_chanspec(wlc_info_t *wlc, chanspec_t chanspec); extern void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec);
extern bool wlc_timers_init(wlc_info_t *wlc, int unit); extern bool wlc_timers_init(struct wlc_info *wlc, int unit);
extern const bcm_iovar_t wlc_iovars[]; extern const bcm_iovar_t wlc_iovars[];
...@@ -944,36 +949,38 @@ extern int wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid, ...@@ -944,36 +949,38 @@ extern int wlc_doiovar(void *hdl, const bcm_iovar_t *vi, u32 actionid,
int len, int val_size, wlc_if_t *wlcif); int len, int val_size, wlc_if_t *wlcif);
#if defined(BCMDBG) #if defined(BCMDBG)
extern void wlc_print_ies(wlc_info_t *wlc, u8 *ies, uint ies_len); extern void wlc_print_ies(struct wlc_info *wlc, u8 *ies, uint ies_len);
#endif #endif
extern int wlc_set_nmode(wlc_info_t *wlc, s32 nmode); extern int wlc_set_nmode(struct wlc_info *wlc, s32 nmode);
extern void wlc_ht_mimops_cap_update(wlc_info_t *wlc, u8 mimops_mode); extern void wlc_ht_mimops_cap_update(struct wlc_info *wlc, u8 mimops_mode);
extern void wlc_mimops_action_ht_send(wlc_info_t *wlc, wlc_bsscfg_t *bsscfg, extern void wlc_mimops_action_ht_send(struct wlc_info *wlc,
u8 mimops_mode); wlc_bsscfg_t *bsscfg, u8 mimops_mode);
extern void wlc_switch_shortslot(wlc_info_t *wlc, bool shortslot); extern void wlc_switch_shortslot(struct wlc_info *wlc, bool shortslot);
extern void wlc_set_bssid(wlc_bsscfg_t *cfg); extern void wlc_set_bssid(wlc_bsscfg_t *cfg);
extern void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend); extern void wlc_edcf_setparams(wlc_bsscfg_t *cfg, bool suspend);
extern void wlc_set_ratetable(wlc_info_t *wlc); extern void wlc_set_ratetable(struct wlc_info *wlc);
extern int wlc_set_mac(wlc_bsscfg_t *cfg); extern int wlc_set_mac(wlc_bsscfg_t *cfg);
extern void wlc_beacon_phytxctl_txant_upd(wlc_info_t *wlc, extern void wlc_beacon_phytxctl_txant_upd(struct wlc_info *wlc,
ratespec_t bcn_rate); ratespec_t bcn_rate);
extern void wlc_mod_prb_rsp_rate_table(wlc_info_t *wlc, uint frame_len); extern void wlc_mod_prb_rsp_rate_table(struct wlc_info *wlc, uint frame_len);
extern ratespec_t wlc_lowest_basic_rspec(wlc_info_t *wlc, wlc_rateset_t *rs); extern ratespec_t wlc_lowest_basic_rspec(struct wlc_info *wlc,
extern u16 wlc_compute_bcntsfoff(wlc_info_t *wlc, ratespec_t rspec, wlc_rateset_t *rs);
extern u16 wlc_compute_bcntsfoff(struct wlc_info *wlc, ratespec_t rspec,
bool short_preamble, bool phydelay); bool short_preamble, bool phydelay);
extern void wlc_radio_disable(wlc_info_t *wlc); extern void wlc_radio_disable(struct wlc_info *wlc);
extern void wlc_bcn_li_upd(wlc_info_t *wlc); extern void wlc_bcn_li_upd(struct wlc_info *wlc);
extern int wlc_get_revision_info(wlc_info_t *wlc, void *buf, uint len); extern int wlc_get_revision_info(struct wlc_info *wlc, void *buf, uint len);
extern void wlc_out(wlc_info_t *wlc); extern void wlc_out(struct wlc_info *wlc);
extern void wlc_set_home_chanspec(wlc_info_t *wlc, chanspec_t chanspec); extern void wlc_set_home_chanspec(struct wlc_info *wlc, chanspec_t chanspec);
extern void wlc_watchdog_upd(wlc_info_t *wlc, bool tbtt); extern void wlc_watchdog_upd(struct wlc_info *wlc, bool tbtt);
extern bool wlc_ps_allowed(wlc_info_t *wlc); extern bool wlc_ps_allowed(struct wlc_info *wlc);
extern bool wlc_stay_awake(wlc_info_t *wlc); extern bool wlc_stay_awake(struct wlc_info *wlc);
extern void wlc_wme_initparams_sta(wlc_info_t *wlc, wme_param_ie_t *pe); extern void wlc_wme_initparams_sta(struct wlc_info *wlc, wme_param_ie_t *pe);
extern void wlc_bss_list_free(wlc_info_t *wlc, wlc_bss_list_t *bss_list); extern void wlc_bss_list_free(struct wlc_info *wlc, wlc_bss_list_t *bss_list);
extern void wlc_ht_mimops_cap_update(struct wlc_info *wlc, u8 mimops_mode);
#endif /* _wlc_h_ */ #endif /* _wlc_h_ */
...@@ -512,7 +512,7 @@ extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc); ...@@ -512,7 +512,7 @@ extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc);
extern bool wlc_dpc(struct wlc_info *wlc, bool bounded); extern bool wlc_dpc(struct wlc_info *wlc, bool bounded);
extern bool wlc_send80211_raw(struct wlc_info *wlc, wlc_if_t *wlcif, void *p, extern bool wlc_send80211_raw(struct wlc_info *wlc, wlc_if_t *wlcif, void *p,
uint ac); uint ac);
extern bool wlc_sendpkt_mac80211(wlc_info_t *wlc, struct sk_buff *sdu, extern bool wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
struct ieee80211_hw *hw); struct ieee80211_hw *hw);
extern int wlc_iovar_op(struct wlc_info *wlc, const char *name, void *params, extern int wlc_iovar_op(struct wlc_info *wlc, const char *name, void *params,
int p_len, void *arg, int len, bool set, int p_len, void *arg, int len, bool set,
...@@ -522,10 +522,10 @@ extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len, ...@@ -522,10 +522,10 @@ extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
/* helper functions */ /* helper functions */
extern void wlc_statsupd(struct wlc_info *wlc); extern void wlc_statsupd(struct wlc_info *wlc);
extern int wlc_get_header_len(void); extern int wlc_get_header_len(void);
extern void wlc_mac_bcn_promisc_change(wlc_info_t *wlc, bool promisc); extern void wlc_mac_bcn_promisc_change(struct wlc_info *wlc, bool promisc);
extern void wlc_set_addrmatch(wlc_info_t *wlc, int match_reg_offset, extern void wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
const struct ether_addr *addr); const struct ether_addr *addr);
extern void wlc_wme_setparams(wlc_info_t *wlc, u16 aci, void *arg, extern void wlc_wme_setparams(struct wlc_info *wlc, u16 aci, void *arg,
bool suspend); bool suspend);
extern wlc_pub_t *wlc_pub(void *wlc); extern wlc_pub_t *wlc_pub(void *wlc);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <proto/802.1d.h> #include <proto/802.1d.h>
extern bool wlc_aggregatable(wlc_info_t *wlc, u8 tid); extern bool wlc_aggregatable(struct wlc_info *wlc, u8 tid);
#define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */ #define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */
/* structure to store per-tid state for the ampdu initiator */ /* structure to store per-tid state for the ampdu initiator */
......
...@@ -44,14 +44,14 @@ ...@@ -44,14 +44,14 @@
#define WLC_STF_SS_STBC_RX(wlc) (WLCISNPHY(wlc->band) && \ #define WLC_STF_SS_STBC_RX(wlc) (WLCISNPHY(wlc->band) && \
NREV_GT(wlc->band->phyrev, 3) && NREV_LE(wlc->band->phyrev, 6)) NREV_GT(wlc->band->phyrev, 3) && NREV_LE(wlc->band->phyrev, 6))
static s8 wlc_stf_stbc_rx_get(wlc_info_t *wlc); static s8 wlc_stf_stbc_rx_get(struct wlc_info *wlc);
static bool wlc_stf_stbc_tx_set(wlc_info_t *wlc, s32 int_val); static bool wlc_stf_stbc_tx_set(struct wlc_info *wlc, s32 int_val);
static int wlc_stf_txcore_set(wlc_info_t *wlc, u8 Nsts, u8 val); static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 val);
static int wlc_stf_spatial_policy_set(wlc_info_t *wlc, int val); static int wlc_stf_spatial_policy_set(struct wlc_info *wlc, int val);
static void wlc_stf_stbc_rx_ht_update(wlc_info_t *wlc, int val); static void wlc_stf_stbc_rx_ht_update(struct wlc_info *wlc, int val);
static void _wlc_stf_phy_txant_upd(wlc_info_t *wlc); static void _wlc_stf_phy_txant_upd(struct wlc_info *wlc);
static u16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec); static u16 _wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec);
#define NSTS_1 1 #define NSTS_1 1
#define NSTS_2 2 #define NSTS_2 2
...@@ -65,7 +65,7 @@ const u8 txcore_default[5] = { ...@@ -65,7 +65,7 @@ const u8 txcore_default[5] = {
(0x0f) /* For Nsts = 4, enable all cores */ (0x0f) /* For Nsts = 4, enable all cores */
}; };
static void wlc_stf_stbc_rx_ht_update(wlc_info_t *wlc, int val) static void wlc_stf_stbc_rx_ht_update(struct wlc_info *wlc, int val)
{ {
ASSERT((val == HT_CAP_RX_STBC_NO) ASSERT((val == HT_CAP_RX_STBC_NO)
|| (val == HT_CAP_RX_STBC_ONE_STREAM)); || (val == HT_CAP_RX_STBC_ONE_STREAM));
...@@ -86,7 +86,7 @@ static void wlc_stf_stbc_rx_ht_update(wlc_info_t *wlc, int val) ...@@ -86,7 +86,7 @@ static void wlc_stf_stbc_rx_ht_update(wlc_info_t *wlc, int val)
} }
/* every WLC_TEMPSENSE_PERIOD seconds temperature check to decide whether to turn on/off txchain */ /* every WLC_TEMPSENSE_PERIOD seconds temperature check to decide whether to turn on/off txchain */
void wlc_tempsense_upd(wlc_info_t *wlc) void wlc_tempsense_upd(struct wlc_info *wlc)
{ {
wlc_phy_t *pi = wlc->band->pi; wlc_phy_t *pi = wlc->band->pi;
uint active_chains, txchain; uint active_chains, txchain;
...@@ -110,7 +110,7 @@ void wlc_tempsense_upd(wlc_info_t *wlc) ...@@ -110,7 +110,7 @@ void wlc_tempsense_upd(wlc_info_t *wlc)
} }
void void
wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, u16 *ss_algo_channel, wlc_stf_ss_algo_channel_get(struct wlc_info *wlc, u16 *ss_algo_channel,
chanspec_t chanspec) chanspec_t chanspec)
{ {
tx_power_t power; tx_power_t power;
...@@ -151,12 +151,12 @@ wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, u16 *ss_algo_channel, ...@@ -151,12 +151,12 @@ wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, u16 *ss_algo_channel,
setbit(ss_algo_channel, PHY_TXC1_MODE_STBC); setbit(ss_algo_channel, PHY_TXC1_MODE_STBC);
} }
static s8 wlc_stf_stbc_rx_get(wlc_info_t *wlc) static s8 wlc_stf_stbc_rx_get(struct wlc_info *wlc)
{ {
return (wlc->ht_cap.cap & HT_CAP_RX_STBC_MASK) >> HT_CAP_RX_STBC_SHIFT; return (wlc->ht_cap.cap & HT_CAP_RX_STBC_MASK) >> HT_CAP_RX_STBC_SHIFT;
} }
static bool wlc_stf_stbc_tx_set(wlc_info_t *wlc, s32 int_val) static bool wlc_stf_stbc_tx_set(struct wlc_info *wlc, s32 int_val)
{ {
if ((int_val != AUTO) && (int_val != OFF) && (int_val != ON)) { if ((int_val != AUTO) && (int_val != OFF) && (int_val != ON)) {
return false; return false;
...@@ -177,7 +177,7 @@ static bool wlc_stf_stbc_tx_set(wlc_info_t *wlc, s32 int_val) ...@@ -177,7 +177,7 @@ static bool wlc_stf_stbc_tx_set(wlc_info_t *wlc, s32 int_val)
return true; return true;
} }
bool wlc_stf_stbc_rx_set(wlc_info_t *wlc, s32 int_val) bool wlc_stf_stbc_rx_set(struct wlc_info *wlc, s32 int_val)
{ {
if ((int_val != HT_CAP_RX_STBC_NO) if ((int_val != HT_CAP_RX_STBC_NO)
&& (int_val != HT_CAP_RX_STBC_ONE_STREAM)) { && (int_val != HT_CAP_RX_STBC_ONE_STREAM)) {
...@@ -194,7 +194,7 @@ bool wlc_stf_stbc_rx_set(wlc_info_t *wlc, s32 int_val) ...@@ -194,7 +194,7 @@ bool wlc_stf_stbc_rx_set(wlc_info_t *wlc, s32 int_val)
return true; return true;
} }
static int wlc_stf_txcore_set(wlc_info_t *wlc, u8 Nsts, u8 core_mask) static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 core_mask)
{ {
WL_TRACE(("wl%d: %s: Nsts %d core_mask %x\n", WL_TRACE(("wl%d: %s: Nsts %d core_mask %x\n",
wlc->pub->unit, __func__, Nsts, core_mask)); wlc->pub->unit, __func__, Nsts, core_mask));
...@@ -231,7 +231,7 @@ static int wlc_stf_txcore_set(wlc_info_t *wlc, u8 Nsts, u8 core_mask) ...@@ -231,7 +231,7 @@ static int wlc_stf_txcore_set(wlc_info_t *wlc, u8 Nsts, u8 core_mask)
return BCME_OK; return BCME_OK;
} }
static int wlc_stf_spatial_policy_set(wlc_info_t *wlc, int val) static int wlc_stf_spatial_policy_set(struct wlc_info *wlc, int val)
{ {
int i; int i;
u8 core_mask = 0; u8 core_mask = 0;
...@@ -247,7 +247,7 @@ static int wlc_stf_spatial_policy_set(wlc_info_t *wlc, int val) ...@@ -247,7 +247,7 @@ static int wlc_stf_spatial_policy_set(wlc_info_t *wlc, int val)
return BCME_OK; return BCME_OK;
} }
int wlc_stf_txchain_set(wlc_info_t *wlc, s32 int_val, bool force) int wlc_stf_txchain_set(struct wlc_info *wlc, s32 int_val, bool force)
{ {
u8 txchain = (u8) int_val; u8 txchain = (u8) int_val;
u8 txstreams; u8 txstreams;
...@@ -307,7 +307,7 @@ int wlc_stf_txchain_set(wlc_info_t *wlc, s32 int_val, bool force) ...@@ -307,7 +307,7 @@ int wlc_stf_txchain_set(wlc_info_t *wlc, s32 int_val, bool force)
return BCME_OK; return BCME_OK;
} }
int wlc_stf_rxchain_set(wlc_info_t *wlc, s32 int_val) int wlc_stf_rxchain_set(struct wlc_info *wlc, s32 int_val)
{ {
u8 rxchain_cnt; u8 rxchain_cnt;
u8 rxchain = (u8) int_val; u8 rxchain = (u8) int_val;
...@@ -371,7 +371,7 @@ int wlc_stf_rxchain_set(wlc_info_t *wlc, s32 int_val) ...@@ -371,7 +371,7 @@ int wlc_stf_rxchain_set(wlc_info_t *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(wlc_info_t *wlc, wlcband_t *band) int wlc_stf_ss_update(struct wlc_info *wlc, wlcband_t *band)
{ {
int ret_code = 0; int ret_code = 0;
u8 prev_stf_ss; u8 prev_stf_ss;
...@@ -406,7 +406,7 @@ int wlc_stf_ss_update(wlc_info_t *wlc, wlcband_t *band) ...@@ -406,7 +406,7 @@ int wlc_stf_ss_update(wlc_info_t *wlc, wlcband_t *band)
return ret_code; return ret_code;
} }
int wlc_stf_attach(wlc_info_t *wlc) int wlc_stf_attach(struct wlc_info *wlc)
{ {
wlc->bandstate[BAND_2G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_SISO; wlc->bandstate[BAND_2G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_SISO;
wlc->bandstate[BAND_5G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_CDD; wlc->bandstate[BAND_5G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_CDD;
...@@ -429,11 +429,11 @@ int wlc_stf_attach(wlc_info_t *wlc) ...@@ -429,11 +429,11 @@ int wlc_stf_attach(wlc_info_t *wlc)
return 0; return 0;
} }
void wlc_stf_detach(wlc_info_t *wlc) void wlc_stf_detach(struct wlc_info *wlc)
{ {
} }
int wlc_stf_ant_txant_validate(wlc_info_t *wlc, s8 val) int wlc_stf_ant_txant_validate(struct wlc_info *wlc, s8 val)
{ {
int bcmerror = BCME_OK; int bcmerror = BCME_OK;
...@@ -480,7 +480,7 @@ int wlc_stf_ant_txant_validate(wlc_info_t *wlc, s8 val) ...@@ -480,7 +480,7 @@ int wlc_stf_ant_txant_validate(wlc_info_t *wlc, s8 val)
* do tx-antenna selection for SISO transmissions * do tx-antenna selection for SISO transmissions
* for NREV>=7, bit 6 and bit 7 mean antenna 0 and 1 respectively, nit6+bit7 means both cores active * for NREV>=7, bit 6 and bit 7 mean antenna 0 and 1 respectively, nit6+bit7 means both cores active
*/ */
static void _wlc_stf_phy_txant_upd(wlc_info_t *wlc) static void _wlc_stf_phy_txant_upd(struct wlc_info *wlc)
{ {
s8 txant; s8 txant;
...@@ -521,12 +521,12 @@ static void _wlc_stf_phy_txant_upd(wlc_info_t *wlc) ...@@ -521,12 +521,12 @@ static void _wlc_stf_phy_txant_upd(wlc_info_t *wlc)
wlc_bmac_txant_set(wlc->hw, wlc->stf->phytxant); wlc_bmac_txant_set(wlc->hw, wlc->stf->phytxant);
} }
void wlc_stf_phy_txant_upd(wlc_info_t *wlc) void wlc_stf_phy_txant_upd(struct wlc_info *wlc)
{ {
_wlc_stf_phy_txant_upd(wlc); _wlc_stf_phy_txant_upd(wlc);
} }
void wlc_stf_phy_chain_calc(wlc_info_t *wlc) void wlc_stf_phy_chain_calc(struct wlc_info *wlc)
{ {
/* get available rx/tx chains */ /* get available rx/tx chains */
wlc->stf->hw_txchain = (u8) getintvar(wlc->pub->vars, "txchain"); wlc->stf->hw_txchain = (u8) getintvar(wlc->pub->vars, "txchain");
...@@ -563,7 +563,7 @@ void wlc_stf_phy_chain_calc(wlc_info_t *wlc) ...@@ -563,7 +563,7 @@ void wlc_stf_phy_chain_calc(wlc_info_t *wlc)
wlc_stf_spatial_policy_set(wlc, MIN_SPATIAL_EXPANSION); wlc_stf_spatial_policy_set(wlc, MIN_SPATIAL_EXPANSION);
} }
static u16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) static u16 _wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec)
{ {
u16 phytxant = wlc->stf->phytxant; u16 phytxant = wlc->stf->phytxant;
...@@ -576,12 +576,12 @@ static u16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) ...@@ -576,12 +576,12 @@ static u16 _wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec)
return phytxant; return phytxant;
} }
u16 wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec) u16 wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec)
{ {
return _wlc_stf_phytxchain_sel(wlc, rspec); return _wlc_stf_phytxchain_sel(wlc, rspec);
} }
u16 wlc_stf_d11hdrs_phyctl_txant(wlc_info_t *wlc, ratespec_t rspec) u16 wlc_stf_d11hdrs_phyctl_txant(struct wlc_info *wlc, ratespec_t rspec)
{ {
u16 phytxant = wlc->stf->phytxant; u16 phytxant = wlc->stf->phytxant;
u16 mask = PHY_TXC_ANT_MASK; u16 mask = PHY_TXC_ANT_MASK;
......
...@@ -20,23 +20,24 @@ ...@@ -20,23 +20,24 @@
#define MIN_SPATIAL_EXPANSION 0 #define MIN_SPATIAL_EXPANSION 0
#define MAX_SPATIAL_EXPANSION 1 #define MAX_SPATIAL_EXPANSION 1
extern int wlc_stf_attach(wlc_info_t *wlc); extern int wlc_stf_attach(struct wlc_info *wlc);
extern void wlc_stf_detach(wlc_info_t *wlc); extern void wlc_stf_detach(struct wlc_info *wlc);
extern void wlc_tempsense_upd(wlc_info_t *wlc); extern void wlc_tempsense_upd(struct wlc_info *wlc);
extern void wlc_stf_ss_algo_channel_get(wlc_info_t *wlc, extern void wlc_stf_ss_algo_channel_get(struct wlc_info *wlc,
u16 *ss_algo_channel, u16 *ss_algo_channel,
chanspec_t chanspec); chanspec_t chanspec);
extern int wlc_stf_ss_update(wlc_info_t *wlc, struct wlcband *band); extern int wlc_stf_ss_update(struct wlc_info *wlc, struct wlcband *band);
extern void wlc_stf_phy_txant_upd(wlc_info_t *wlc); extern void wlc_stf_phy_txant_upd(struct wlc_info *wlc);
extern int wlc_stf_txchain_set(wlc_info_t *wlc, s32 int_val, bool force); extern int wlc_stf_txchain_set(struct wlc_info *wlc, s32 int_val, bool force);
extern int wlc_stf_rxchain_set(wlc_info_t *wlc, s32 int_val); extern int wlc_stf_rxchain_set(struct wlc_info *wlc, s32 int_val);
extern bool wlc_stf_stbc_rx_set(wlc_info_t *wlc, s32 int_val); extern bool wlc_stf_stbc_rx_set(struct wlc_info *wlc, s32 int_val);
extern int wlc_stf_ant_txant_validate(wlc_info_t *wlc, s8 val); extern int wlc_stf_ant_txant_validate(struct wlc_info *wlc, s8 val);
extern void wlc_stf_phy_txant_upd(wlc_info_t *wlc); extern void wlc_stf_phy_txant_upd(struct wlc_info *wlc);
extern void wlc_stf_phy_chain_calc(wlc_info_t *wlc); extern void wlc_stf_phy_chain_calc(struct wlc_info *wlc);
extern u16 wlc_stf_phytxchain_sel(wlc_info_t *wlc, ratespec_t rspec); extern u16 wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec);
extern u16 wlc_stf_d11hdrs_phyctl_txant(wlc_info_t *wlc, ratespec_t rspec); extern u16 wlc_stf_d11hdrs_phyctl_txant(struct wlc_info *wlc, ratespec_t rspec);
extern u16 wlc_stf_spatial_expansion_get(wlc_info_t *wlc, ratespec_t rspec); extern u16 wlc_stf_spatial_expansion_get(struct wlc_info *wlc,
ratespec_t rspec);
#endif /* _wlc_stf_h_ */ #endif /* _wlc_stf_h_ */
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
/* forward declarations */ /* forward declarations */
typedef struct wlc_info wlc_info_t; struct wlc_info;
typedef struct wlc_hw_info wlc_hw_info_t; typedef struct wlc_hw_info wlc_hw_info_t;
typedef struct wlc_if wlc_if_t; typedef struct wlc_if wlc_if_t;
typedef struct wl_if wl_if_t; typedef struct wl_if wl_if_t;
......
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