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

staging: brcm80211: replaced various typedefs in softmac

typedefs are undesirable according to documentation/CodingStyle.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2d4684a5
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
#define BCM5357_CHIP_ID 0x5357 /* 5357 chipcommon chipid */ #define BCM5357_CHIP_ID 0x5357 /* 5357 chipcommon chipid */
#define SI_INFO(sih) ((si_info_t *)sih) #define SI_INFO(sih) ((struct si_info *)sih)
#define GOODCOREADDR(x, b) \ #define GOODCOREADDR(x, b) \
(((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \ (((x) >= (b)) && ((x) < ((b) + SI_MAXCORES * SI_CORE_SIZE)) && \
......
...@@ -22,12 +22,12 @@ ...@@ -22,12 +22,12 @@
static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit); static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit);
static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg); static void brcms_c_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
static struct wlc_pub *brcms_c_pub_malloc(uint unit, static struct brcms_pub *brcms_c_pub_malloc(uint unit,
uint *err, uint devid); uint *err, uint devid);
static void brcms_c_pub_mfree(struct wlc_pub *pub); static void brcms_c_pub_mfree(struct brcms_pub *pub);
static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid); static void brcms_c_tunables_init(struct brcms_tunables *tunables, uint devid);
static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid) static void brcms_c_tunables_init(struct brcms_tunables *tunables, uint devid)
{ {
tunables->ntxd = NTXD; tunables->ntxd = NTXD;
tunables->nrxd = NRXD; tunables->nrxd = NRXD;
...@@ -45,17 +45,17 @@ static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid) ...@@ -45,17 +45,17 @@ static void brcms_c_tunables_init(wlc_tunables_t *tunables, uint devid)
tunables->txsbnd = TXSBND; tunables->txsbnd = TXSBND;
} }
static struct wlc_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid) static struct brcms_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid)
{ {
struct wlc_pub *pub; struct brcms_pub *pub;
pub = kzalloc(sizeof(struct wlc_pub), GFP_ATOMIC); pub = kzalloc(sizeof(struct brcms_pub), GFP_ATOMIC);
if (pub == NULL) { if (pub == NULL) {
*err = 1001; *err = 1001;
goto fail; goto fail;
} }
pub->tunables = kzalloc(sizeof(wlc_tunables_t), GFP_ATOMIC); pub->tunables = kzalloc(sizeof(struct brcms_tunables), GFP_ATOMIC);
if (pub->tunables == NULL) { if (pub->tunables == NULL) {
*err = 1028; *err = 1028;
goto fail; goto fail;
...@@ -77,7 +77,7 @@ static struct wlc_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid) ...@@ -77,7 +77,7 @@ static struct wlc_pub *brcms_c_pub_malloc(uint unit, uint *err, uint devid)
return NULL; return NULL;
} }
static void brcms_c_pub_mfree(struct wlc_pub *pub) static void brcms_c_pub_mfree(struct brcms_pub *pub)
{ {
if (pub == NULL) if (pub == NULL)
return; return;
...@@ -95,7 +95,7 @@ static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit) ...@@ -95,7 +95,7 @@ static struct brcms_c_bsscfg *brcms_c_bsscfg_malloc(uint unit)
if (cfg == NULL) if (cfg == NULL)
goto fail; goto fail;
cfg->current_bss = kzalloc(sizeof(wlc_bss_info_t), GFP_ATOMIC); cfg->current_bss = kzalloc(sizeof(struct brcms_bss_info), GFP_ATOMIC);
if (cfg->current_bss == NULL) if (cfg->current_bss == NULL)
goto fail; goto fail;
...@@ -175,7 +175,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) ...@@ -175,7 +175,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
goto fail; goto fail;
} }
wlc->default_bss = kzalloc(sizeof(wlc_bss_info_t), GFP_ATOMIC); wlc->default_bss = kzalloc(sizeof(struct brcms_bss_info), GFP_ATOMIC);
if (wlc->default_bss == NULL) { if (wlc->default_bss == NULL) {
*err = 1010; *err = 1010;
goto fail; goto fail;
...@@ -189,16 +189,16 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) ...@@ -189,16 +189,16 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
brcms_c_bsscfg_ID_assign(wlc, wlc->cfg); brcms_c_bsscfg_ID_assign(wlc, wlc->cfg);
wlc->wsec_def_keys[0] = wlc->wsec_def_keys[0] =
kzalloc(sizeof(wsec_key_t) * WLC_DEFAULT_KEYS, GFP_ATOMIC); kzalloc(sizeof(struct wsec_key) * WLC_DEFAULT_KEYS, GFP_ATOMIC);
if (wlc->wsec_def_keys[0] == NULL) { if (wlc->wsec_def_keys[0] == NULL) {
*err = 1015; *err = 1015;
goto fail; goto fail;
} else { } else {
int i; int i;
for (i = 1; i < WLC_DEFAULT_KEYS; i++) { for (i = 1; i < WLC_DEFAULT_KEYS; i++) {
wlc->wsec_def_keys[i] = (wsec_key_t *) wlc->wsec_def_keys[i] = (struct wsec_key *)
((unsigned long)wlc->wsec_def_keys[0] + ((unsigned long)wlc->wsec_def_keys[0] +
(sizeof(wsec_key_t) * i)); (sizeof(struct wsec_key) * i));
} }
} }
...@@ -237,7 +237,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid) ...@@ -237,7 +237,7 @@ struct brcms_c_info *brcms_c_attach_malloc(uint unit, uint *err, uint devid)
} }
wlc->corestate->macstat_snapshot = wlc->corestate->macstat_snapshot =
kzalloc(sizeof(macstat_t), GFP_ATOMIC); kzalloc(sizeof(struct macstat), GFP_ATOMIC);
if (wlc->corestate->macstat_snapshot == NULL) { if (wlc->corestate->macstat_snapshot == NULL) {
*err = 1027; *err = 1027;
goto fail; goto fail;
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
* This allows to maintain a specific state independently of * This allows to maintain a specific state independently of
* how often and/or when the wlc counters are updated. * how often and/or when the wlc counters are updated.
*/ */
typedef struct wlc_fifo_info { struct brcms_fifo_info {
u16 ampdu_pld_size; /* number of bytes to be pre-loaded */ u16 ampdu_pld_size; /* number of bytes to be pre-loaded */
u8 mcs2ampdu_table[FFPLD_MAX_MCS + 1]; /* per-mcs max # of mpdus in an ampdu */ u8 mcs2ampdu_table[FFPLD_MAX_MCS + 1]; /* per-mcs max # of mpdus in an ampdu */
u16 prev_txfunfl; /* num of underflows last read from the HW macstats counter */ u16 prev_txfunfl; /* num of underflows last read from the HW macstats counter */
...@@ -68,7 +68,7 @@ typedef struct wlc_fifo_info { ...@@ -68,7 +68,7 @@ typedef struct wlc_fifo_info {
u32 accum_txampdu; /* num of tx ampdu since we modified pld params */ u32 accum_txampdu; /* num of tx ampdu since we modified pld params */
u32 prev_txampdu; /* previous reading of tx ampdu */ u32 prev_txampdu; /* previous reading of tx ampdu */
u32 dmaxferrate; /* estimated dma avg xfer rate in kbits/sec */ u32 dmaxferrate; /* estimated dma avg xfer rate in kbits/sec */
} wlc_fifo_info_t; };
/* AMPDU module specific state */ /* AMPDU module specific state */
struct ampdu_info { struct ampdu_info {
...@@ -94,7 +94,8 @@ struct ampdu_info { ...@@ -94,7 +94,8 @@ struct ampdu_info {
u32 tx_max_funl; /* underflows should be kept such that u32 tx_max_funl; /* underflows should be kept such that
* (tx_max_funfl*underflows) < tx frames * (tx_max_funfl*underflows) < tx frames
*/ */
wlc_fifo_info_t fifo_tb[NUM_FFPLD_FIFO]; /* table of fifo infos */ /* table of fifo infos */
struct brcms_fifo_info fifo_tb[NUM_FFPLD_FIFO];
}; };
...@@ -122,10 +123,12 @@ static void brcms_c_scb_ampdu_update_config_all(struct ampdu_info *ampdu); ...@@ -122,10 +123,12 @@ static void brcms_c_scb_ampdu_update_config_all(struct ampdu_info *ampdu);
#define brcms_c_ampdu_txflowcontrol(a, b, c) do {} while (0) #define brcms_c_ampdu_txflowcontrol(a, b, c) do {} while (0)
static void brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, static void
struct scb *scb, brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu,
struct sk_buff *p, tx_status_t *txs, struct scb *scb,
u32 frmtxstatus, u32 frmtxstatus2); struct sk_buff *p, struct tx_status *txs,
u32 frmtxstatus, u32 frmtxstatus2);
static bool brcms_c_ampdu_cap(struct ampdu_info *ampdu); static bool brcms_c_ampdu_cap(struct ampdu_info *ampdu);
static int brcms_c_ampdu_set(struct ampdu_info *ampdu, bool on); static int brcms_c_ampdu_set(struct ampdu_info *ampdu, bool on);
...@@ -203,7 +206,7 @@ void brcms_c_ampdu_detach(struct ampdu_info *ampdu) ...@@ -203,7 +206,7 @@ void brcms_c_ampdu_detach(struct ampdu_info *ampdu)
static void brcms_c_scb_ampdu_update_config(struct ampdu_info *ampdu, static void brcms_c_scb_ampdu_update_config(struct ampdu_info *ampdu,
struct scb *scb) struct scb *scb)
{ {
scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb); struct scb_ampdu *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
int i; int i;
scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu; scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu;
...@@ -237,7 +240,7 @@ static void brcms_c_scb_ampdu_update_config_all(struct ampdu_info *ampdu) ...@@ -237,7 +240,7 @@ static void brcms_c_scb_ampdu_update_config_all(struct ampdu_info *ampdu)
static void brcms_c_ffpld_init(struct ampdu_info *ampdu) static void brcms_c_ffpld_init(struct ampdu_info *ampdu)
{ {
int i, j; int i, j;
wlc_fifo_info_t *fifo; struct brcms_fifo_info *fifo;
for (j = 0; j < NUM_FFPLD_FIFO; j++) { for (j = 0; j < NUM_FFPLD_FIFO; j++) {
fifo = (ampdu->fifo_tb + j); fifo = (ampdu->fifo_tb + j);
...@@ -267,14 +270,14 @@ static int brcms_c_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid) ...@@ -267,14 +270,14 @@ static int brcms_c_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid)
u32 current_ampdu_cnt = 0; u32 current_ampdu_cnt = 0;
u16 max_pld_size; u16 max_pld_size;
u32 new_txunfl; u32 new_txunfl;
wlc_fifo_info_t *fifo = (ampdu->fifo_tb + fid); struct brcms_fifo_info *fifo = (ampdu->fifo_tb + fid);
uint xmtfifo_sz; uint xmtfifo_sz;
u16 cur_txunfl; u16 cur_txunfl;
/* return if we got here for a different reason than underflows */ /* return if we got here for a different reason than underflows */
cur_txunfl = cur_txunfl = brcms_c_read_shm(wlc,
brcms_c_read_shm(wlc, M_UCODE_MACSTAT +
M_UCODE_MACSTAT + offsetof(macstat_t, txfunfl[fid])); offsetof(struct macstat, txfunfl[fid]));
new_txunfl = (u16) (cur_txunfl - fifo->prev_txfunfl); new_txunfl = (u16) (cur_txunfl - fifo->prev_txfunfl);
if (new_txunfl == 0) { if (new_txunfl == 0) {
BCMMSG(wlc->wiphy, "TX status FRAG set but no tx underflows\n"); BCMMSG(wlc->wiphy, "TX status FRAG set but no tx underflows\n");
...@@ -381,7 +384,7 @@ static void brcms_c_ffpld_calc_mcs2ampdu_table(struct ampdu_info *ampdu, int f) ...@@ -381,7 +384,7 @@ static void brcms_c_ffpld_calc_mcs2ampdu_table(struct ampdu_info *ampdu, int f)
int i; int i;
u32 phy_rate, dma_rate, tmp; u32 phy_rate, dma_rate, tmp;
u8 max_mpdu; u8 max_mpdu;
wlc_fifo_info_t *fifo = (ampdu->fifo_tb + f); struct brcms_fifo_info *fifo = (ampdu->fifo_tb + f);
/* recompute the dma rate */ /* recompute the dma rate */
/* note : we divide/multiply by 100 to avoid integer overflows */ /* note : we divide/multiply by 100 to avoid integer overflows */
...@@ -413,8 +416,8 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid, ...@@ -413,8 +416,8 @@ brcms_c_ampdu_tx_operational(struct brcms_c_info *wlc, u8 tid,
u8 ba_wsize, /* negotiated ba window size (in pdu) */ u8 ba_wsize, /* negotiated ba window size (in pdu) */
uint max_rx_ampdu_bytes) /* from ht_cap in beacon */ uint max_rx_ampdu_bytes) /* from ht_cap in beacon */
{ {
scb_ampdu_t *scb_ampdu; struct scb_ampdu *scb_ampdu;
scb_ampdu_tid_ini_t *ini; struct scb_ampdu_tid_ini *ini;
struct ampdu_info *ampdu = wlc->ampdu; struct ampdu_info *ampdu = wlc->ampdu;
struct scb *scb = wlc->pub->global_scb; struct scb *scb = wlc->pub->global_scb;
scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb); scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
...@@ -449,12 +452,12 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -449,12 +452,12 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
uint i, count = 0, fifo, seg_cnt = 0; uint i, count = 0, fifo, seg_cnt = 0;
u16 plen, len, seq = 0, mcl, mch, index, frameid, dma_len = 0; u16 plen, len, seq = 0, mcl, mch, index, frameid, dma_len = 0;
u32 ampdu_len, max_ampdu_bytes = 0; u32 ampdu_len, max_ampdu_bytes = 0;
d11txh_t *txh = NULL; struct d11txh *txh = NULL;
u8 *plcp; u8 *plcp;
struct ieee80211_hdr *h; struct ieee80211_hdr *h;
struct scb *scb; struct scb *scb;
scb_ampdu_t *scb_ampdu; struct scb_ampdu *scb_ampdu;
scb_ampdu_tid_ini_t *ini; struct scb_ampdu_tid_ini *ini;
u8 mcs = 0; u8 mcs = 0;
bool use_rts = false, use_cts = false; bool use_rts = false, use_cts = false;
ratespec_t rspec = 0, rspec_fallback = 0; ratespec_t rspec = 0, rspec_fallback = 0;
...@@ -462,7 +465,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -462,7 +465,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
u16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ; u16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ;
struct ieee80211_rts *rts; struct ieee80211_rts *rts;
u8 rr_retry_limit; u8 rr_retry_limit;
wlc_fifo_info_t *f; struct brcms_fifo_info *f;
bool fbr_iscck; bool fbr_iscck;
struct ieee80211_tx_info *tx_info; struct ieee80211_tx_info *tx_info;
u16 qlen; u16 qlen;
...@@ -524,7 +527,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -524,7 +527,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
} }
/* pkt is good to be aggregated */ /* pkt is good to be aggregated */
txh = (d11txh_t *) p->data; txh = (struct d11txh *) p->data;
plcp = (u8 *) (txh + 1); plcp = (u8 *) (txh + 1);
h = (struct ieee80211_hdr *)(plcp + D11_PHY_HDR_LEN); h = (struct ieee80211_hdr *)(plcp + D11_PHY_HDR_LEN);
seq = le16_to_cpu(h->seq_ctrl) >> SEQNUM_SHIFT; seq = le16_to_cpu(h->seq_ctrl) >> SEQNUM_SHIFT;
...@@ -701,7 +704,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -701,7 +704,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
if (count) { if (count) {
/* patch up the last txh */ /* patch up the last txh */
txh = (d11txh_t *) pkt[count - 1]->data; txh = (struct d11txh *) pkt[count - 1]->data;
mcl = le16_to_cpu(txh->MacTxControlLow); mcl = le16_to_cpu(txh->MacTxControlLow);
mcl &= ~TXC_AMPDU_MASK; mcl &= ~TXC_AMPDU_MASK;
mcl |= (TXC_AMPDU_LAST << TXC_AMPDU_SHIFT); mcl |= (TXC_AMPDU_LAST << TXC_AMPDU_SHIFT);
...@@ -719,7 +722,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -719,7 +722,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
ampdu_len -= roundup(len, 4) - len; ampdu_len -= roundup(len, 4) - len;
/* patch up the first txh & plcp */ /* patch up the first txh & plcp */
txh = (d11txh_t *) pkt[0]->data; txh = (struct d11txh *) pkt[0]->data;
plcp = (u8 *) (txh + 1); plcp = (u8 *) (txh + 1);
WLC_SET_MIMO_PLCP_LEN(plcp, ampdu_len); WLC_SET_MIMO_PLCP_LEN(plcp, ampdu_len);
...@@ -809,11 +812,11 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi, ...@@ -809,11 +812,11 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
void void
brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs) struct sk_buff *p, struct tx_status *txs)
{ {
scb_ampdu_t *scb_ampdu; struct scb_ampdu *scb_ampdu;
struct brcms_c_info *wlc = ampdu->wlc; struct brcms_c_info *wlc = ampdu->wlc;
scb_ampdu_tid_ini_t *ini; struct scb_ampdu_tid_ini *ini;
u32 s1 = 0, s2 = 0; u32 s1 = 0, s2 = 0;
struct ieee80211_tx_info *tx_info; struct ieee80211_tx_info *tx_info;
...@@ -845,11 +848,11 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, ...@@ -845,11 +848,11 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
} else { } else {
/* loop through all pkts and free */ /* loop through all pkts and free */
u8 queue = txs->frameid & TXFID_QUEUE_MASK; u8 queue = txs->frameid & TXFID_QUEUE_MASK;
d11txh_t *txh; struct d11txh *txh;
u16 mcl; u16 mcl;
while (p) { while (p) {
tx_info = IEEE80211_SKB_CB(p); tx_info = IEEE80211_SKB_CB(p);
txh = (d11txh_t *) p->data; txh = (struct d11txh *) p->data;
mcl = le16_to_cpu(txh->MacTxControlLow); mcl = le16_to_cpu(txh->MacTxControlLow);
brcmu_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
/* break out if last packet of ampdu */ /* break out if last packet of ampdu */
...@@ -866,7 +869,7 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, ...@@ -866,7 +869,7 @@ brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
static void static void
brcms_c_ampdu_rate_status(struct brcms_c_info *wlc, brcms_c_ampdu_rate_status(struct brcms_c_info *wlc,
struct ieee80211_tx_info *tx_info, struct ieee80211_tx_info *tx_info,
tx_status_t *txs, u8 mcs) struct tx_status *txs, u8 mcs)
{ {
struct ieee80211_tx_rate *txrate = tx_info->status.rates; struct ieee80211_tx_rate *txrate = tx_info->status.rates;
int i; int i;
...@@ -882,14 +885,14 @@ brcms_c_ampdu_rate_status(struct brcms_c_info *wlc, ...@@ -882,14 +885,14 @@ brcms_c_ampdu_rate_status(struct brcms_c_info *wlc,
static void static void
brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs, struct sk_buff *p, struct tx_status *txs,
u32 s1, u32 s2) u32 s1, u32 s2)
{ {
scb_ampdu_t *scb_ampdu; struct scb_ampdu *scb_ampdu;
struct brcms_c_info *wlc = ampdu->wlc; struct brcms_c_info *wlc = ampdu->wlc;
scb_ampdu_tid_ini_t *ini; struct scb_ampdu_tid_ini *ini;
u8 bitmap[8], queue, tid; u8 bitmap[8], queue, tid;
d11txh_t *txh; struct d11txh *txh;
u8 *plcp; u8 *plcp;
struct ieee80211_hdr *h; struct ieee80211_hdr *h;
u16 seq, start_seq = 0, bindex, index, mcl; u16 seq, start_seq = 0, bindex, index, mcl;
...@@ -982,7 +985,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -982,7 +985,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
if (WL_ERROR_ON()) { if (WL_ERROR_ON()) {
brcmu_prpkt("txpkt (AMPDU)", p); brcmu_prpkt("txpkt (AMPDU)", p);
brcms_c_print_txdesc((d11txh_t *) p->data); brcms_c_print_txdesc((struct d11txh *) p->data);
} }
brcms_c_print_txstatus(txs); brcms_c_print_txstatus(txs);
} }
...@@ -991,7 +994,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb, ...@@ -991,7 +994,7 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
/* loop through all pkts and retry if not acked */ /* loop through all pkts and retry if not acked */
while (p) { while (p) {
tx_info = IEEE80211_SKB_CB(p); tx_info = IEEE80211_SKB_CB(p);
txh = (d11txh_t *) p->data; txh = (struct d11txh *) p->data;
mcl = le16_to_cpu(txh->MacTxControlLow); mcl = le16_to_cpu(txh->MacTxControlLow);
plcp = (u8 *) (txh + 1); plcp = (u8 *) (txh + 1);
h = (struct ieee80211_hdr *)(plcp + D11_PHY_HDR_LEN); h = (struct ieee80211_hdr *)(plcp + D11_PHY_HDR_LEN);
......
...@@ -23,7 +23,7 @@ extern int brcms_c_sendampdu(struct ampdu_info *ampdu, ...@@ -23,7 +23,7 @@ extern int brcms_c_sendampdu(struct ampdu_info *ampdu,
struct brcms_c_txq_info *qi, struct brcms_c_txq_info *qi,
struct sk_buff **aggp, int prec); struct sk_buff **aggp, int prec);
extern void brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb, extern void brcms_c_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs); struct sk_buff *p, struct tx_status *txs);
extern void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc); extern void brcms_c_ampdu_macaddr_upd(struct brcms_c_info *wlc);
extern void brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu); extern void brcms_c_ampdu_shm_upd(struct ampdu_info *ampdu);
......
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
/* static functions */ /* static functions */
static int brcms_c_antsel_cfgupd(struct antsel_info *asi, static int brcms_c_antsel_cfgupd(struct antsel_info *asi,
wlc_antselcfg_t *antsel); struct brcms_antselcfg *antsel);
static u8 brcms_c_antsel_id2antcfg(struct antsel_info *asi, u8 id); static u8 brcms_c_antsel_id2antcfg(struct antsel_info *asi, u8 id);
static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg); static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg);
static void brcms_c_antsel_init_cfg(struct antsel_info *asi, static void brcms_c_antsel_init_cfg(struct antsel_info *asi,
wlc_antselcfg_t *antsel, struct brcms_antselcfg *antsel,
bool auto_sel); bool auto_sel);
const u16 mimo_2x4_div_antselpat_tbl[] = { const u16 mimo_2x4_div_antselpat_tbl[] = {
...@@ -160,7 +160,7 @@ void brcms_c_antsel_init(struct antsel_info *asi) ...@@ -160,7 +160,7 @@ void brcms_c_antsel_init(struct antsel_info *asi)
/* boardlevel antenna selection: init antenna selection structure */ /* boardlevel antenna selection: init antenna selection structure */
static void static void
brcms_c_antsel_init_cfg(struct antsel_info *asi, wlc_antselcfg_t *antsel, brcms_c_antsel_init_cfg(struct antsel_info *asi, struct brcms_antselcfg *antsel,
bool auto_sel) bool auto_sel)
{ {
if (asi->antsel_type == ANTSEL_2x3) { if (asi->antsel_type == ANTSEL_2x3) {
...@@ -282,7 +282,7 @@ static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg) ...@@ -282,7 +282,7 @@ static u16 brcms_c_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)
/* boardlevel antenna selection: ucode interface control */ /* boardlevel antenna selection: ucode interface control */
static int brcms_c_antsel_cfgupd(struct antsel_info *asi, static int brcms_c_antsel_cfgupd(struct antsel_info *asi,
wlc_antselcfg_t *antsel) struct brcms_antselcfg *antsel)
{ {
struct brcms_c_info *wlc = asi->wlc; struct brcms_c_info *wlc = asi->wlc;
u8 ant_cfg; u8 ant_cfg;
......
...@@ -83,8 +83,8 @@ static void brcms_ucode_download(struct brcms_c_hw_info *wlc); ...@@ -83,8 +83,8 @@ static void brcms_ucode_download(struct brcms_c_hw_info *wlc);
static void brcms_c_ucode_txant_set(struct brcms_c_hw_info *wlc_hw); static void brcms_c_ucode_txant_set(struct brcms_c_hw_info *wlc_hw);
/* used by brcms_c_dpc() */ /* used by brcms_c_dpc() */
static bool brcms_b_dotxstatus(struct brcms_c_hw_info *wlc, tx_status_t *txs, static bool brcms_b_dotxstatus(struct brcms_c_hw_info *wlc,
u32 s2); struct tx_status *txs, u32 s2);
static bool brcms_b_txstatus(struct brcms_c_hw_info *wlc, bool bound, static bool brcms_b_txstatus(struct brcms_c_hw_info *wlc, bool bound,
bool *fatal); bool *fatal);
static bool brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound); static bool brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound);
...@@ -246,7 +246,7 @@ brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound) ...@@ -246,7 +246,7 @@ brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound)
struct sk_buff *tail = NULL; struct sk_buff *tail = NULL;
uint n = 0; uint n = 0;
uint bound_limit = bound ? wlc_hw->wlc->pub->tunables->rxbnd : -1; uint bound_limit = bound ? wlc_hw->wlc->pub->tunables->rxbnd : -1;
wlc_d11rxhdr_t *wlc_rxhdr = NULL; struct brcms_d11rxhdr *wlc_rxhdr = NULL;
BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit);
/* gather received frames */ /* gather received frames */
...@@ -272,7 +272,7 @@ brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound) ...@@ -272,7 +272,7 @@ brcms_b_recv(struct brcms_c_hw_info *wlc_hw, uint fifo, bool bound)
head = head->prev; head = head->prev;
p->prev = NULL; p->prev = NULL;
wlc_rxhdr = (wlc_d11rxhdr_t *) p->data; wlc_rxhdr = (struct brcms_d11rxhdr *) p->data;
/* compute the RSSI from d11rxhdr and record it in wlc_rxd11hr */ /* compute the RSSI from d11rxhdr and record it in wlc_rxd11hr */
wlc_phy_rssi_compute(wlc_hw->band->pi, wlc_rxhdr); wlc_phy_rssi_compute(wlc_hw->band->pi, wlc_rxhdr);
...@@ -457,7 +457,8 @@ brcms_b_set_chanspec(struct brcms_c_hw_info *wlc_hw, chanspec_t chanspec, ...@@ -457,7 +457,8 @@ brcms_b_set_chanspec(struct brcms_c_hw_info *wlc_hw, chanspec_t chanspec,
} }
} }
int brcms_b_state_get(struct brcms_c_hw_info *wlc_hw, brcms_b_state_t *state) int brcms_b_state_get(struct brcms_c_hw_info *wlc_hw,
struct brcms_b_state *state)
{ {
state->machwcap = wlc_hw->machwcap; state->machwcap = wlc_hw->machwcap;
...@@ -472,7 +473,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme) ...@@ -472,7 +473,7 @@ static bool brcms_b_attach_dmapio(struct brcms_c_info *wlc, uint j, bool wme)
u16 pio_mhf2 = 0; u16 pio_mhf2 = 0;
struct brcms_c_hw_info *wlc_hw = wlc->hw; struct brcms_c_hw_info *wlc_hw = wlc->hw;
uint unit = wlc_hw->unit; uint unit = wlc_hw->unit;
wlc_tunables_t *tune = wlc->pub->tunables; struct brcms_tunables *tune = wlc->pub->tunables;
struct wiphy *wiphy = wlc->wiphy; struct wiphy *wiphy = wlc->wiphy;
/* name and offsets for dma_attach */ /* name and offsets for dma_attach */
...@@ -589,7 +590,7 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit, ...@@ -589,7 +590,7 @@ int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device, uint unit,
uint err = 0; uint err = 0;
uint j; uint j;
bool wme = false; bool wme = false;
shared_phy_params_t sha_params; struct shared_phy_params sha_params;
struct wiphy *wiphy = wlc->wiphy; struct wiphy *wiphy = wlc->wiphy;
BCMMSG(wlc->wiphy, "wl%d: vendor 0x%x device 0x%x\n", unit, vendor, BCMMSG(wlc->wiphy, "wl%d: vendor 0x%x device 0x%x\n", unit, vendor,
...@@ -2959,7 +2960,8 @@ bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc) ...@@ -2959,7 +2960,8 @@ bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc)
} }
static bool static bool
brcms_b_dotxstatus(struct brcms_c_hw_info *wlc_hw, tx_status_t *txs, u32 s2) brcms_b_dotxstatus(struct brcms_c_hw_info *wlc_hw, struct tx_status *txs,
u32 s2)
{ {
/* discard intermediate indications for ucode with one legitimate case: /* discard intermediate indications for ucode with one legitimate case:
* e.g. if "useRTS" is set. ucode did a successful rts/cts exchange, but the subsequent * e.g. if "useRTS" is set. ucode did a successful rts/cts exchange, but the subsequent
...@@ -2983,7 +2985,7 @@ brcms_b_txstatus(struct brcms_c_hw_info *wlc_hw, bool bound, bool *fatal) ...@@ -2983,7 +2985,7 @@ brcms_b_txstatus(struct brcms_c_hw_info *wlc_hw, bool bound, bool *fatal)
bool morepending = false; bool morepending = false;
struct brcms_c_info *wlc = wlc_hw->wlc; struct brcms_c_info *wlc = wlc_hw->wlc;
d11regs_t *regs; d11regs_t *regs;
tx_status_t txstatus, *txs; struct tx_status txstatus, *txs;
u32 s1, s2; u32 s1, s2;
uint n = 0; uint n = 0;
/* /*
......
...@@ -119,7 +119,7 @@ extern u16 brcms_b_get_txant(struct brcms_c_hw_info *wlc_hw); ...@@ -119,7 +119,7 @@ extern u16 brcms_b_get_txant(struct brcms_c_hw_info *wlc_hw);
extern void brcms_b_antsel_type_set(struct brcms_c_hw_info *wlc_hw, extern void brcms_b_antsel_type_set(struct brcms_c_hw_info *wlc_hw,
u8 antsel_type); u8 antsel_type);
extern int brcms_b_state_get(struct brcms_c_hw_info *wlc_hw, extern int brcms_b_state_get(struct brcms_c_hw_info *wlc_hw,
brcms_b_state_t *state); struct brcms_b_state *state);
extern void brcms_b_write_shm(struct brcms_c_hw_info *wlc_hw, uint offset, extern void brcms_b_write_shm(struct brcms_c_hw_info *wlc_hw, uint offset,
u16 v); u16 v);
extern u16 brcms_b_read_shm(struct brcms_c_hw_info *wlc_hw, uint offset); extern u16 brcms_b_read_shm(struct brcms_c_hw_info *wlc_hw, uint offset);
......
...@@ -103,18 +103,21 @@ struct country_info { ...@@ -103,18 +103,21 @@ struct country_info {
const u8 locale_mimo_5G; /* 5G mimo info */ const u8 locale_mimo_5G; /* 5G mimo info */
}; };
extern wlc_cm_info_t *brcms_c_channel_mgr_attach(struct brcms_c_info *wlc); extern struct brcms_cm_info *
extern void brcms_c_channel_mgr_detach(wlc_cm_info_t *wlc_cm); brcms_c_channel_mgr_attach(struct brcms_c_info *wlc);
extern u8 brcms_c_channel_locale_flags_in_band(wlc_cm_info_t *wlc_cm, extern void brcms_c_channel_mgr_detach(struct brcms_cm_info *wlc_cm);
extern u8 brcms_c_channel_locale_flags_in_band(struct brcms_cm_info *wlc_cm,
uint bandunit); uint bandunit);
extern bool brcms_c_valid_chanspec_db(wlc_cm_info_t *wlc_cm, chanspec_t chspec); extern bool brcms_c_valid_chanspec_db(struct brcms_cm_info *wlc_cm,
chanspec_t chspec);
extern void brcms_c_channel_reg_limits(wlc_cm_info_t *wlc_cm, extern void brcms_c_channel_reg_limits(struct brcms_cm_info *wlc_cm,
chanspec_t chanspec, chanspec_t chanspec,
struct txpwr_limits *txpwr); struct txpwr_limits *txpwr);
extern void brcms_c_channel_set_chanspec(wlc_cm_info_t *wlc_cm, extern void brcms_c_channel_set_chanspec(struct brcms_cm_info *wlc_cm,
chanspec_t chanspec, chanspec_t chanspec,
u8 local_constraint_qdbm); u8 local_constraint_qdbm);
......
...@@ -1308,11 +1308,11 @@ struct d11rxhdr { ...@@ -1308,11 +1308,11 @@ struct d11rxhdr {
u16 RxChan; /* gain code, channel radio code, and phy type */ u16 RxChan; /* gain code, channel radio code, and phy type */
} __attribute__((packed)); } __attribute__((packed));
#define RXHDR_LEN 24 /* sizeof d11rxhdr_t */ #define RXHDR_LEN 24 /* sizeof struct d11rxhdr */
#define FRAMELEN(h) ((h)->RxFrameSize) #define FRAMELEN(h) ((h)->RxFrameSize)
struct wlc_d11rxhdr { struct brcms_d11rxhdr {
d11rxhdr_t rxhdr; struct d11rxhdr rxhdr;
u32 tsf_l; /* TSF_L reading */ u32 tsf_l; /* TSF_L reading */
s8 rssi; /* computed instanteneous rssi in BMAC */ s8 rssi; /* computed instanteneous rssi in BMAC */
s8 rxpwr0; /* obsoleted, place holder for legacy ROM code. use rxpwr[] */ s8 rxpwr0; /* obsoleted, place holder for legacy ROM code. use rxpwr[] */
......
This diff is collapsed.
...@@ -82,11 +82,11 @@ typedef bool(*di_rxenable_t) (struct dma_pub *dmah); ...@@ -82,11 +82,11 @@ typedef bool(*di_rxenable_t) (struct dma_pub *dmah);
typedef bool(*di_rxenabled_t) (struct dma_pub *dmah); typedef bool(*di_rxenabled_t) (struct dma_pub *dmah);
typedef void *(*di_rx_t) (struct dma_pub *dmah); typedef void *(*di_rx_t) (struct dma_pub *dmah);
typedef bool(*di_rxfill_t) (struct dma_pub *dmah); typedef bool(*di_rxfill_t) (struct dma_pub *dmah);
typedef void (*di_txreclaim_t) (struct dma_pub *dmah, txd_range_t range); typedef void (*di_txreclaim_t) (struct dma_pub *dmah, enum txd_range range);
typedef void (*di_rxreclaim_t) (struct dma_pub *dmah); typedef void (*di_rxreclaim_t) (struct dma_pub *dmah);
typedef unsigned long (*di_getvar_t) (struct dma_pub *dmah, typedef unsigned long (*di_getvar_t) (struct dma_pub *dmah,
const char *name); const char *name);
typedef void *(*di_getnexttxp_t) (struct dma_pub *dmah, txd_range_t range); typedef void *(*di_getnexttxp_t) (struct dma_pub *dmah, enum txd_range range);
typedef void *(*di_getnextrxp_t) (struct dma_pub *dmah, bool forceall); typedef void *(*di_getnextrxp_t) (struct dma_pub *dmah, bool forceall);
typedef void *(*di_peeknexttxp_t) (struct dma_pub *dmah); typedef void *(*di_peeknexttxp_t) (struct dma_pub *dmah);
typedef void *(*di_peeknextrxp_t) (struct dma_pub *dmah); typedef void *(*di_peeknextrxp_t) (struct dma_pub *dmah);
...@@ -161,7 +161,7 @@ struct di_fcn_s { ...@@ -161,7 +161,7 @@ struct di_fcn_s {
*/ */
/* export structure */ /* export structure */
struct dma_pub { struct dma_pub {
const di_fcn_t *di_fn; /* DMA function pointers */ const struct di_fcn_s *di_fn; /* DMA function pointers */
uint txavail; /* # free tx descriptors */ uint txavail; /* # free tx descriptors */
uint dmactrlflags; /* dma control flags */ uint dmactrlflags; /* dma control flags */
...@@ -177,7 +177,7 @@ extern struct dma_pub *dma_attach(char *name, struct si_pub *sih, ...@@ -177,7 +177,7 @@ extern struct dma_pub *dma_attach(char *name, struct si_pub *sih,
uint nrxd, uint rxbufsize, int rxextheadroom, uint nrxd, uint rxbufsize, int rxextheadroom,
uint nrxpost, uint rxoffset, uint *msg_level); uint nrxpost, uint rxoffset, uint *msg_level);
extern const di_fcn_t dma64proc; extern const struct di_fcn_s dma64proc;
#define dma_detach(di) (dma64proc.detach(di)) #define dma_detach(di) (dma64proc.detach(di))
#define dma_txreset(di) (dma64proc.txreset(di)) #define dma_txreset(di) (dma64proc.txreset(di))
......
...@@ -56,7 +56,7 @@ struct brcms_firmware { ...@@ -56,7 +56,7 @@ struct brcms_firmware {
}; };
struct brcms_info { struct brcms_info {
struct wlc_pub *pub; /* pointer to public wlc state */ struct brcms_pub *pub; /* pointer to public wlc state */
void *wlc; /* pointer to private common os-independent data */ void *wlc; /* pointer to private common os-independent data */
u32 magic; u32 magic;
......
This diff is collapsed.
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
struct brcms_c_bss_list { struct brcms_c_bss_list {
uint count; uint count;
bool beacon; /* set for beacon, cleared for probe response */ bool beacon; /* set for beacon, cleared for probe response */
wlc_bss_info_t *ptrs[MAXBSS]; struct brcms_bss_info *ptrs[MAXBSS];
}; };
#define SW_TIMER_MAC_STAT_UPD 30 /* periodic MAC stats update */ #define SW_TIMER_MAC_STAT_UPD 30 /* periodic MAC stats update */
...@@ -292,7 +292,7 @@ struct brcms_c_stf { ...@@ -292,7 +292,7 @@ struct brcms_c_stf {
#define WLC_CHAN_CHANNEL(x) (((x) & RXS_CHAN_ID_MASK) >> RXS_CHAN_ID_SHIFT) #define WLC_CHAN_CHANNEL(x) (((x) & RXS_CHAN_ID_MASK) >> RXS_CHAN_ID_SHIFT)
#define WLC_RX_CHANNEL(rxh) (WLC_CHAN_CHANNEL((rxh)->RxChan)) #define WLC_RX_CHANNEL(rxh) (WLC_CHAN_CHANNEL((rxh)->RxChan))
/* wlc_bss_info flag bit values */ /* brcms_bss_info flag bit values */
#define WLC_BSS_HT 0x0020 /* BSS is HT (MIMO) capable */ #define WLC_BSS_HT 0x0020 /* BSS is HT (MIMO) capable */
/* Flags used in brcms_c_txq_info.stopped */ /* Flags used in brcms_c_txq_info.stopped */
...@@ -341,8 +341,8 @@ struct wsec_key { ...@@ -341,8 +341,8 @@ struct wsec_key {
u32 len; /* key length..don't move this var */ u32 len; /* key length..don't move this var */
/* data is 4byte aligned */ /* data is 4byte aligned */
u8 data[WLAN_MAX_KEY_LEN]; /* key data */ u8 data[WLAN_MAX_KEY_LEN]; /* key data */
wsec_iv_t rxiv[WLC_NUMRXIVS]; /* Rx IV (one per TID) */ struct wsec_iv rxiv[WLC_NUMRXIVS]; /* Rx IV (one per TID) */
wsec_iv_t txiv; /* Tx IV */ struct wsec_iv txiv; /* Tx IV */
}; };
/* /*
...@@ -355,7 +355,7 @@ struct brcms_c_core { ...@@ -355,7 +355,7 @@ struct brcms_c_core {
uint *txavail[NFIFO]; /* # tx descriptors available */ uint *txavail[NFIFO]; /* # tx descriptors available */
s16 txpktpend[NFIFO]; /* tx admission control */ s16 txpktpend[NFIFO]; /* tx admission control */
macstat_t *macstat_snapshot; /* mac hw prev read values */ struct macstat *macstat_snapshot; /* mac hw prev read values */
}; };
/* /*
...@@ -437,7 +437,7 @@ struct wme_param_ie { ...@@ -437,7 +437,7 @@ struct wme_param_ie {
u8 version; u8 version;
u8 qosinfo; u8 qosinfo;
u8 rsvd; u8 rsvd;
edcf_acparam_t acparam[AC_COUNT]; struct edcf_acparam acparam[AC_COUNT];
} __attribute__((packed)); } __attribute__((packed));
/* virtual interface */ /* virtual interface */
...@@ -571,7 +571,7 @@ struct brcms_c_txq_info { ...@@ -571,7 +571,7 @@ struct brcms_c_txq_info {
* Principal common (os-independent) software data structure. * Principal common (os-independent) software data structure.
*/ */
struct brcms_c_info { struct brcms_c_info {
struct wlc_pub *pub; /* pointer to wlc public state */ struct brcms_pub *pub; /* pointer to wlc public state */
struct brcms_info *wl; /* pointer to os-specific private state */ struct brcms_info *wl; /* pointer to os-specific private state */
d11regs_t *regs; /* pointer to device registers */ d11regs_t *regs; /* pointer to device registers */
...@@ -615,7 +615,7 @@ struct brcms_c_info { ...@@ -615,7 +615,7 @@ struct brcms_c_info {
struct ampdu_info *ampdu; /* ampdu module handler */ struct ampdu_info *ampdu; /* ampdu module handler */
struct antsel_info *asi; /* antsel module handler */ struct antsel_info *asi; /* antsel module handler */
wlc_cm_info_t *cmi; /* channel manager module handler */ struct brcms_cm_info *cmi; /* channel manager module handler */
uint vars_size; /* size of vars, free vars on detach */ uint vars_size; /* size of vars, free vars on detach */
...@@ -664,11 +664,13 @@ struct brcms_c_info { ...@@ -664,11 +664,13 @@ struct brcms_c_info {
/* WME */ /* WME */
ac_bitmap_t wme_dp; /* Discard (oldest first) policy per AC */ ac_bitmap_t wme_dp; /* Discard (oldest first) policy per AC */
u16 edcf_txop[AC_COUNT]; /* current txop for each ac */ u16 edcf_txop[AC_COUNT]; /* current txop for each ac */
wme_param_ie_t wme_param_ie; /* WME parameter info element, which on STA
* contains parameters in use locally, and on /*
* AP contains parameters advertised to STA * WME parameter info element, which on STA contains parameters in use
* in beacons and assoc responses. * locally, and on AP contains parameters advertised to STA in beacons
*/ * and assoc responses.
*/
struct wme_param_ie wme_param_ie;
u16 wme_retries[AC_COUNT]; /* per-AC retry limits */ u16 wme_retries[AC_COUNT]; /* per-AC retry limits */
u16 tx_prec_map; /* Precedence map based on HW FIFO space */ u16 tx_prec_map; /* Precedence map based on HW FIFO space */
...@@ -685,8 +687,9 @@ struct brcms_c_info { ...@@ -685,8 +687,9 @@ struct brcms_c_info {
struct brcms_c_txq_info *tx_queues; /* common TX Queue list */ struct brcms_c_txq_info *tx_queues; /* common TX Queue list */
/* security */ /* security */
wsec_key_t *wsec_keys[WSEC_MAX_KEYS]; /* dynamic key storage */ struct wsec_key *wsec_keys[WSEC_MAX_KEYS]; /* dynamic key storage */
wsec_key_t *wsec_def_keys[WLC_DEFAULT_KEYS]; /* default key storage */ /* default key storage */
struct wsec_key *wsec_def_keys[WLC_DEFAULT_KEYS];
bool wsec_swkeys; /* indicates that all keys should be bool wsec_swkeys; /* indicates that all keys should be
* treated as sw keys (used for debugging) * treated as sw keys (used for debugging)
*/ */
...@@ -699,7 +702,7 @@ struct brcms_c_info { ...@@ -699,7 +702,7 @@ struct brcms_c_info {
/* HT CAP IE being advertised by this node: */ /* HT CAP IE being advertised by this node: */
struct ieee80211_ht_cap ht_cap; struct ieee80211_ht_cap ht_cap;
wlc_bss_info_t *default_bss; /* configured BSS parameters */ struct brcms_bss_info *default_bss; /* configured BSS parameters */
u16 mc_fid_counter; /* BC/MC FIFO frame ID counter */ u16 mc_fid_counter; /* BC/MC FIFO frame ID counter */
...@@ -761,14 +764,14 @@ struct brcms_c_info { ...@@ -761,14 +764,14 @@ struct brcms_c_info {
/* antsel module specific state */ /* antsel module specific state */
struct antsel_info { struct antsel_info {
struct brcms_c_info *wlc; /* pointer to main wlc structure */ struct brcms_c_info *wlc; /* pointer to main wlc structure */
struct wlc_pub *pub; /* pointer to public fn */ struct brcms_pub *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
*/ */
u8 antsel_antswitch; /* board level antenna switch type */ u8 antsel_antswitch; /* board level antenna switch type */
bool antsel_avail; /* Ant selection availability (SROM based) */ bool antsel_avail; /* Ant selection availability (SROM based) */
wlc_antselcfg_t antcfg_11n; /* antenna configuration */ struct brcms_antselcfg antcfg_11n; /* antenna configuration */
wlc_antselcfg_t antcfg_cur; /* current antenna config (auto) */ struct brcms_antselcfg antcfg_cur; /* current antenna config (auto) */
}; };
/* BSS configuration state */ /* BSS configuration state */
...@@ -800,9 +803,11 @@ struct brcms_c_bsscfg { ...@@ -800,9 +803,11 @@ struct brcms_c_bsscfg {
u16 WPA_auth; /* WPA: authenticated key management */ u16 WPA_auth; /* WPA: authenticated key management */
bool wpa2_preauth; /* default is true, wpa_cap sets value */ bool wpa2_preauth; /* default is true, wpa_cap sets value */
bool wsec_portopen; /* indicates keys are plumbed */ bool wsec_portopen; /* indicates keys are plumbed */
wsec_iv_t wpa_none_txiv; /* global txiv for WPA_NONE, tkip and aes */ /* global txiv for WPA_NONE, tkip and aes */
struct wsec_iv wpa_none_txiv;
int wsec_index; /* 0-3: default tx key, -1: not set */ int wsec_index; /* 0-3: default tx key, -1: not set */
wsec_key_t *bss_def_keys[WLC_DEFAULT_KEYS]; /* default key storage */ /* default key storage: */
struct wsec_key *bss_def_keys[WLC_DEFAULT_KEYS];
/* TKIP countermeasures */ /* TKIP countermeasures */
bool tkip_countermeasures; /* flags TKIP no-assoc period */ bool tkip_countermeasures; /* flags TKIP no-assoc period */
...@@ -829,7 +834,7 @@ struct brcms_c_bsscfg { ...@@ -829,7 +834,7 @@ struct brcms_c_bsscfg {
pmkid_t pmkid[MAXPMKID]; /* PMKID cache */ pmkid_t pmkid[MAXPMKID]; /* PMKID cache */
uint npmkid; /* num cached PMKIDs */ uint npmkid; /* num cached PMKIDs */
wlc_bss_info_t *current_bss; /* BSS parms in ASSOCIATED state */ struct brcms_bss_info *current_bss; /* BSS parms in ASSOCIATED state */
/* PM states */ /* PM states */
bool PMawakebcn; /* bcn recvd during current waking state */ bool PMawakebcn; /* bcn recvd during current waking state */
...@@ -840,7 +845,7 @@ struct brcms_c_bsscfg { ...@@ -840,7 +845,7 @@ struct brcms_c_bsscfg {
/* BSSID entry in RCMTA, use the wsec key management infrastructure to /* BSSID entry in RCMTA, use the wsec key management infrastructure to
* manage the RCMTA entries. * manage the RCMTA entries.
*/ */
wsec_key_t *rcmta; struct wsec_key *rcmta;
/* 'unique' ID of this bsscfg, assigned at bsscfg allocation */ /* 'unique' ID of this bsscfg, assigned at bsscfg allocation */
u16 ID; u16 ID;
...@@ -874,7 +879,7 @@ struct brcms_c_bsscfg { ...@@ -874,7 +879,7 @@ struct brcms_c_bsscfg {
extern void brcms_c_fatal_error(struct brcms_c_info *wlc); extern void brcms_c_fatal_error(struct brcms_c_info *wlc);
extern void brcms_b_rpc_watchdog(struct brcms_c_info *wlc); extern void brcms_b_rpc_watchdog(struct brcms_c_info *wlc);
extern void brcms_c_recv(struct brcms_c_info *wlc, struct sk_buff *p); extern void brcms_c_recv(struct brcms_c_info *wlc, struct sk_buff *p);
extern bool brcms_c_dotxstatus(struct brcms_c_info *wlc, tx_status_t *txs, extern bool brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs,
u32 frm_tx2); u32 frm_tx2);
extern void brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo, extern void brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo,
struct sk_buff *p, struct sk_buff *p,
...@@ -884,7 +889,7 @@ extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo, ...@@ -884,7 +889,7 @@ extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo,
extern void brcms_c_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu, extern void brcms_c_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
uint prec); uint prec);
extern void brcms_c_info_init(struct brcms_c_info *wlc, int unit); extern void brcms_c_info_init(struct brcms_c_info *wlc, int unit);
extern void brcms_c_print_txstatus(tx_status_t *txs); extern void brcms_c_print_txstatus(struct tx_status *txs);
extern int brcms_c_xmtfifo_sz_get(struct brcms_c_info *wlc, uint fifo, extern int brcms_c_xmtfifo_sz_get(struct brcms_c_info *wlc, uint fifo,
uint *blocks); uint *blocks);
extern void brcms_c_write_template_ram(struct brcms_c_info *wlc, int offset, extern void brcms_c_write_template_ram(struct brcms_c_info *wlc, int offset,
...@@ -895,8 +900,8 @@ extern void brcms_c_pllreq(struct brcms_c_info *wlc, bool set, mbool req_bit); ...@@ -895,8 +900,8 @@ extern void brcms_c_pllreq(struct brcms_c_info *wlc, bool set, mbool req_bit);
extern void brcms_c_reset_bmac_done(struct brcms_c_info *wlc); extern void brcms_c_reset_bmac_done(struct brcms_c_info *wlc);
#if defined(BCMDBG) #if defined(BCMDBG)
extern void brcms_c_print_rxh(d11rxhdr_t *rxh); extern void brcms_c_print_rxh(struct d11rxhdr *rxh);
extern void brcms_c_print_txdesc(d11txh_t *txh); extern void brcms_c_print_txdesc(struct d11txh *txh);
#else #else
#define brcms_c_print_txdesc(a) #define brcms_c_print_txdesc(a)
#endif #endif
...@@ -1007,6 +1012,6 @@ extern void brcms_c_set_home_chanspec(struct brcms_c_info *wlc, ...@@ -1007,6 +1012,6 @@ extern void brcms_c_set_home_chanspec(struct brcms_c_info *wlc,
extern bool brcms_c_ps_allowed(struct brcms_c_info *wlc); extern bool brcms_c_ps_allowed(struct brcms_c_info *wlc);
extern bool brcms_c_stay_awake(struct brcms_c_info *wlc); extern bool brcms_c_stay_awake(struct brcms_c_info *wlc);
extern void brcms_c_wme_initparams_sta(struct brcms_c_info *wlc, extern void brcms_c_wme_initparams_sta(struct brcms_c_info *wlc,
wme_param_ie_t *pe); struct wme_param_ie *pe);
#endif /* _BRCM_MAIN_H_ */ #endif /* _BRCM_MAIN_H_ */
This diff is collapsed.
...@@ -69,18 +69,18 @@ typedef int (*otp_read_region_t) (struct si_pub *sih, int region, u16 *data, ...@@ -69,18 +69,18 @@ typedef int (*otp_read_region_t) (struct si_pub *sih, int region, u16 *data,
typedef int (*otp_nvread_t) (void *oh, char *data, uint *len); typedef int (*otp_nvread_t) (void *oh, char *data, uint *len);
/* OTP function struct */ /* OTP function struct */
typedef struct otp_fn_s { struct otp_fn_s {
otp_size_t size; otp_size_t size;
otp_read_bit_t read_bit; otp_read_bit_t read_bit;
otp_init_t init; otp_init_t init;
otp_read_region_t read_region; otp_read_region_t read_region;
otp_nvread_t nvread; otp_nvread_t nvread;
otp_status_t status; otp_status_t status;
} otp_fn_t; };
typedef struct { struct otpinfo {
uint ccrev; /* chipc revision */ uint ccrev; /* chipc revision */
otp_fn_t *fn; /* OTP functions */ struct otp_fn_s *fn; /* OTP functions */
struct si_pub *sih; /* Saved sb handle */ struct si_pub *sih; /* Saved sb handle */
/* IPX OTP section */ /* IPX OTP section */
...@@ -97,9 +97,9 @@ typedef struct { ...@@ -97,9 +97,9 @@ typedef struct {
u16 fbase; /* fuse subregion offset */ u16 fbase; /* fuse subregion offset */
u16 flim; /* fuse subregion boundary */ u16 flim; /* fuse subregion boundary */
int otpgu_base; /* offset to General Use Region */ int otpgu_base; /* offset to General Use Region */
} otpinfo_t; };
static otpinfo_t otpinfo; static struct otpinfo otpinfo;
/* /*
* IPX OTP Code * IPX OTP Code
...@@ -153,29 +153,29 @@ static otpinfo_t otpinfo; ...@@ -153,29 +153,29 @@ static otpinfo_t otpinfo;
static int ipxotp_status(void *oh) static int ipxotp_status(void *oh)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
return (int)(oi->status); return (int)(oi->status);
} }
/* Return size in bytes */ /* Return size in bytes */
static int ipxotp_size(void *oh) static int ipxotp_size(void *oh)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
return (int)oi->wsize * 2; return (int)oi->wsize * 2;
} }
static u16 ipxotp_otpr(void *oh, chipcregs_t *cc, uint wn) static u16 ipxotp_otpr(void *oh, chipcregs_t *cc, uint wn)
{ {
otpinfo_t *oi; struct otpinfo *oi;
oi = (otpinfo_t *) oh; oi = (struct otpinfo *) oh;
return R_REG(&cc->sromotp[wn]); return R_REG(&cc->sromotp[wn]);
} }
static u16 ipxotp_read_bit(void *oh, chipcregs_t *cc, uint off) static u16 ipxotp_read_bit(void *oh, chipcregs_t *cc, uint off)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
uint k, row, col; uint k, row, col;
u32 otpp, st; u32 otpp, st;
...@@ -225,7 +225,7 @@ static int ipxotp_max_rgnsz(struct si_pub *sih, int osizew) ...@@ -225,7 +225,7 @@ static int ipxotp_max_rgnsz(struct si_pub *sih, int osizew)
return ret; return ret;
} }
static void _ipxotp_init(otpinfo_t *oi, chipcregs_t *cc) static void _ipxotp_init(struct otpinfo *oi, chipcregs_t *cc)
{ {
uint k; uint k;
u32 otpp, st; u32 otpp, st;
...@@ -300,7 +300,7 @@ static void *ipxotp_init(struct si_pub *sih) ...@@ -300,7 +300,7 @@ static void *ipxotp_init(struct si_pub *sih)
{ {
uint idx; uint idx;
chipcregs_t *cc; chipcregs_t *cc;
otpinfo_t *oi; struct otpinfo *oi;
/* Make sure we're running IPX OTP */ /* Make sure we're running IPX OTP */
if (!OTPTYPE_IPX(sih->ccrev)) if (!OTPTYPE_IPX(sih->ccrev))
...@@ -356,7 +356,7 @@ static void *ipxotp_init(struct si_pub *sih) ...@@ -356,7 +356,7 @@ static void *ipxotp_init(struct si_pub *sih)
static int ipxotp_read_region(void *oh, int region, u16 *data, uint *wlen) static int ipxotp_read_region(void *oh, int region, u16 *data, uint *wlen)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
uint idx; uint idx;
chipcregs_t *cc; chipcregs_t *cc;
uint base, i, sz; uint base, i, sz;
...@@ -444,7 +444,7 @@ static int ipxotp_nvread(void *oh, char *data, uint *len) ...@@ -444,7 +444,7 @@ static int ipxotp_nvread(void *oh, char *data, uint *len)
return -ENOTSUPP; return -ENOTSUPP;
} }
static otp_fn_t ipxotp_fn = { static struct otp_fn_s ipxotp_fn = {
(otp_size_t) ipxotp_size, (otp_size_t) ipxotp_size,
(otp_read_bit_t) ipxotp_read_bit, (otp_read_bit_t) ipxotp_read_bit,
...@@ -466,21 +466,21 @@ static otp_fn_t ipxotp_fn = { ...@@ -466,21 +466,21 @@ static otp_fn_t ipxotp_fn = {
int otp_status(void *oh) int otp_status(void *oh)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
return oi->fn->status(oh); return oi->fn->status(oh);
} }
int otp_size(void *oh) int otp_size(void *oh)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
return oi->fn->size(oh); return oi->fn->size(oh);
} }
u16 otp_read_bit(void *oh, uint offset) u16 otp_read_bit(void *oh, uint offset)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
uint idx = ai_coreidx(oi->sih); uint idx = ai_coreidx(oi->sih);
chipcregs_t *cc = ai_setcoreidx(oi->sih, SI_CC_IDX); chipcregs_t *cc = ai_setcoreidx(oi->sih, SI_CC_IDX);
u16 readBit = (u16) oi->fn->read_bit(oh, cc, offset); u16 readBit = (u16) oi->fn->read_bit(oh, cc, offset);
...@@ -490,11 +490,11 @@ u16 otp_read_bit(void *oh, uint offset) ...@@ -490,11 +490,11 @@ u16 otp_read_bit(void *oh, uint offset)
void *otp_init(struct si_pub *sih) void *otp_init(struct si_pub *sih)
{ {
otpinfo_t *oi; struct otpinfo *oi;
void *ret = NULL; void *ret = NULL;
oi = &otpinfo; oi = &otpinfo;
memset(oi, 0, sizeof(otpinfo_t)); memset(oi, 0, sizeof(struct otpinfo));
oi->ccrev = sih->ccrev; oi->ccrev = sih->ccrev;
...@@ -529,7 +529,8 @@ otp_read_region(struct si_pub *sih, int region, u16 *data, ...@@ -529,7 +529,8 @@ otp_read_region(struct si_pub *sih, int region, u16 *data,
goto out; goto out;
} }
err = (((otpinfo_t *) oh)->fn->read_region) (oh, region, data, wlen); err = (((struct otpinfo *) oh)->fn->read_region)
(oh, region, data, wlen);
out: out:
return err; return err;
...@@ -537,7 +538,7 @@ otp_read_region(struct si_pub *sih, int region, u16 *data, ...@@ -537,7 +538,7 @@ otp_read_region(struct si_pub *sih, int region, u16 *data,
int otp_nvread(void *oh, char *data, uint *len) int otp_nvread(void *oh, char *data, uint *len)
{ {
otpinfo_t *oi = (otpinfo_t *) oh; struct otpinfo *oi = (struct otpinfo *) oh;
return oi->fn->nvread(oh, data, len); return oi->fn->nvread(oh, data, len);
} }
...@@ -29,13 +29,12 @@ ...@@ -29,13 +29,12 @@
u32 phyhal_msg_level = PHYHAL_ERROR; u32 phyhal_msg_level = PHYHAL_ERROR;
typedef struct _chan_info_basic { struct chan_info_basic {
u16 chan; u16 chan;
u16 freq; u16 freq;
} chan_info_basic_t; };
static chan_info_basic_t chan_info_all[] = {
static struct chan_info_basic chan_info_all[] = {
{1, 2412}, {1, 2412},
{2, 2417}, {2, 2417},
{3, 2422}, {3, 2422},
...@@ -469,11 +468,11 @@ static void WLBANDINITFN(wlc_set_phy_uninitted) (phy_info_t *pi) ...@@ -469,11 +468,11 @@ static void WLBANDINITFN(wlc_set_phy_uninitted) (phy_info_t *pi)
} }
} }
shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp) struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp)
{ {
shared_phy_t *sh; struct shared_phy *sh;
sh = kzalloc(sizeof(shared_phy_t), GFP_ATOMIC); sh = kzalloc(sizeof(struct shared_phy), GFP_ATOMIC);
if (sh == NULL) { if (sh == NULL) {
return NULL; return NULL;
} }
...@@ -506,7 +505,7 @@ shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp) ...@@ -506,7 +505,7 @@ shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp)
return sh; return sh;
} }
wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype,
char *vars, struct wiphy *wiphy) char *vars, struct wiphy *wiphy)
{ {
phy_info_t *pi; phy_info_t *pi;
...@@ -998,7 +997,7 @@ void wlc_phy_table_data_write(phy_info_t *pi, uint width, u32 val) ...@@ -998,7 +997,7 @@ void wlc_phy_table_data_write(phy_info_t *pi, uint width, u32 val)
} }
void void
wlc_phy_write_table(phy_info_t *pi, const phytbl_info_t *ptbl_info, wlc_phy_write_table(phy_info_t *pi, const struct phytbl_info *ptbl_info,
u16 tblAddr, u16 tblDataHi, u16 tblDataLo) u16 tblAddr, u16 tblDataHi, u16 tblDataLo)
{ {
uint idx; uint idx;
...@@ -1038,7 +1037,7 @@ wlc_phy_write_table(phy_info_t *pi, const phytbl_info_t *ptbl_info, ...@@ -1038,7 +1037,7 @@ wlc_phy_write_table(phy_info_t *pi, const phytbl_info_t *ptbl_info,
} }
void void
wlc_phy_read_table(phy_info_t *pi, const phytbl_info_t *ptbl_info, wlc_phy_read_table(phy_info_t *pi, const struct phytbl_info *ptbl_info,
u16 tblAddr, u16 tblDataHi, u16 tblDataLo) u16 tblAddr, u16 tblDataHi, u16 tblDataLo)
{ {
uint idx; uint idx;
...@@ -1076,7 +1075,8 @@ wlc_phy_read_table(phy_info_t *pi, const phytbl_info_t *ptbl_info, ...@@ -1076,7 +1075,8 @@ wlc_phy_read_table(phy_info_t *pi, const phytbl_info_t *ptbl_info,
} }
uint uint
wlc_phy_init_radio_regs_allbands(phy_info_t *pi, radio_20xx_regs_t *radioregs) wlc_phy_init_radio_regs_allbands(phy_info_t *pi,
struct radio_20xx_regs *radioregs)
{ {
uint i = 0; uint i = 0;
...@@ -1093,7 +1093,7 @@ wlc_phy_init_radio_regs_allbands(phy_info_t *pi, radio_20xx_regs_t *radioregs) ...@@ -1093,7 +1093,7 @@ wlc_phy_init_radio_regs_allbands(phy_info_t *pi, radio_20xx_regs_t *radioregs)
} }
uint uint
wlc_phy_init_radio_regs(phy_info_t *pi, radio_regs_t *radioregs, wlc_phy_init_radio_regs(phy_info_t *pi, struct radio_regs *radioregs,
u16 core_offset) u16 core_offset)
{ {
uint i = 0; uint i = 0;
...@@ -2440,7 +2440,7 @@ wlc_phy_noise_sample_request(wlc_phy_t *pih, u8 reason, u8 ch) ...@@ -2440,7 +2440,7 @@ wlc_phy_noise_sample_request(wlc_phy_t *pih, u8 reason, u8 ch)
OR_REG(&pi->regs->maccommand, OR_REG(&pi->regs->maccommand,
MCMD_BG_NOISE); MCMD_BG_NOISE);
} else { } else {
phy_iq_est_t est[PHY_CORE_MAX]; struct phy_iq_est est[PHY_CORE_MAX];
u32 cmplx_pwr[PHY_CORE_MAX]; u32 cmplx_pwr[PHY_CORE_MAX];
s8 noise_dbm_ant[PHY_CORE_MAX]; s8 noise_dbm_ant[PHY_CORE_MAX];
u16 log_num_samps, num_samps, classif_state = 0; u16 log_num_samps, num_samps, classif_state = 0;
...@@ -2675,8 +2675,8 @@ void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_cmplx_pwr_dB, u8 core) ...@@ -2675,8 +2675,8 @@ void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_cmplx_pwr_dB, u8 core)
void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx) void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx)
{ {
wlc_d11rxhdr_t *wlc_rxhdr = (wlc_d11rxhdr_t *) ctx; struct brcms_d11rxhdr *wlc_rxhdr = (struct brcms_d11rxhdr *) ctx;
d11rxhdr_t *rxh = &wlc_rxhdr->rxhdr; struct d11rxhdr *rxh = &wlc_rxhdr->rxhdr;
int rssi = le16_to_cpu(rxh->PhyRxStatus_1) & PRXS1_JSSI_MASK; int rssi = le16_to_cpu(rxh->PhyRxStatus_1) & PRXS1_JSSI_MASK;
uint radioid = pih->radioid; uint radioid = pih->radioid;
phy_info_t *pi = (phy_info_t *) pih; phy_info_t *pi = (phy_info_t *) pih;
...@@ -2694,7 +2694,7 @@ void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx) ...@@ -2694,7 +2694,7 @@ void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx)
if (ISLCNPHY(pi)) { if (ISLCNPHY(pi)) {
u8 gidx = (le16_to_cpu(rxh->PhyRxStatus_2) & 0xFC00) >> 10; u8 gidx = (le16_to_cpu(rxh->PhyRxStatus_2) & 0xFC00) >> 10;
phy_info_lcnphy_t *pi_lcn = pi->u.pi_lcnphy; struct phy_info_lcnphy *pi_lcn = pi->u.pi_lcnphy;
if (rssi > 127) if (rssi > 127)
rssi -= 256; rssi -= 256;
......
...@@ -176,9 +176,9 @@ struct shared_phy_params { ...@@ -176,9 +176,9 @@ struct shared_phy_params {
}; };
extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp); extern struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp);
extern wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, extern wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs,
char *vars, struct wiphy *wiphy); int bandtype, char *vars, struct wiphy *wiphy);
extern void wlc_phy_detach(wlc_phy_t *ppi); extern void wlc_phy_detach(wlc_phy_t *ppi);
extern bool wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype, extern bool wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype,
......
...@@ -41,7 +41,7 @@ extern u32 phyhal_msg_level; ...@@ -41,7 +41,7 @@ extern u32 phyhal_msg_level;
#define LCNXN_BASEREV 16 #define LCNXN_BASEREV 16
struct wlc_phy_srom_fem { struct brcms_phy_srom_fem {
u8 tssipos; /* TSSI positive slope, 1: positive, 0: negative */ u8 tssipos; /* TSSI positive slope, 1: positive, 0: negative */
u8 extpagain; /* Ext PA gain-type: full-gain: 0, pa-lite: 1, no_pa: 2 */ u8 extpagain; /* Ext PA gain-type: full-gain: 0, pa-lite: 1, no_pa: 2 */
u8 pdetrange; /* support 32 combinations of different Pdet dynamic ranges */ u8 pdetrange; /* support 32 combinations of different Pdet dynamic ranges */
...@@ -441,11 +441,11 @@ struct txiqcal_cache { ...@@ -441,11 +441,11 @@ struct txiqcal_cache {
u16 txcal_coeffs_2G[8]; u16 txcal_coeffs_2G[8];
u16 txcal_radio_regs_2G[8]; u16 txcal_radio_regs_2G[8];
nphy_iq_comp_t rxcal_coeffs_2G; struct nphy_iq_comp rxcal_coeffs_2G;
u16 txcal_coeffs_5G[8]; u16 txcal_coeffs_5G[8];
u16 txcal_radio_regs_5G[8]; u16 txcal_radio_regs_5G[8];
nphy_iq_comp_t rxcal_coeffs_5G; struct nphy_iq_comp rxcal_coeffs_5G;
}; };
struct nphy_pwrctrl { struct nphy_pwrctrl {
...@@ -595,12 +595,12 @@ struct phy_func_ptr { ...@@ -595,12 +595,12 @@ struct phy_func_ptr {
struct phy_info { struct phy_info {
wlc_phy_t pubpi_ro; wlc_phy_t pubpi_ro;
shared_phy_t *sh; struct shared_phy *sh;
phy_func_ptr_t pi_fptr; struct phy_func_ptr pi_fptr;
void *pi_ptr; void *pi_ptr;
union { union {
phy_info_lcnphy_t *pi_lcnphy; struct phy_info_lcnphy *pi_lcnphy;
} u; } u;
bool user_txpwr_at_rfport; bool user_txpwr_at_rfport;
...@@ -650,8 +650,8 @@ struct phy_info { ...@@ -650,8 +650,8 @@ struct phy_info {
s8 tx_power_offset[TXP_NUM_RATES]; s8 tx_power_offset[TXP_NUM_RATES];
u8 tx_power_target[TXP_NUM_RATES]; u8 tx_power_target[TXP_NUM_RATES];
wlc_phy_srom_fem_t srom_fem2g; struct brcms_phy_srom_fem srom_fem2g;
wlc_phy_srom_fem_t srom_fem5g; struct brcms_phy_srom_fem srom_fem5g;
u8 tx_power_max; u8 tx_power_max;
u8 tx_power_max_rate_ind; u8 tx_power_max_rate_ind;
...@@ -722,7 +722,8 @@ struct phy_info { ...@@ -722,7 +722,8 @@ struct phy_info {
u16 mintxbias; u16 mintxbias;
u16 mintxmag; u16 mintxmag;
lo_complex_abgphy_info_t gphy_locomp_iq[STATIC_NUM_RF][STATIC_NUM_BB]; struct lo_complex_abgphy_info gphy_locomp_iq
[STATIC_NUM_RF][STATIC_NUM_BB];
s8 stats_11b_txpower[STATIC_NUM_RF][STATIC_NUM_BB]; s8 stats_11b_txpower[STATIC_NUM_RF][STATIC_NUM_BB];
u16 gain_table[TX_GAIN_TABLE_LENGTH]; u16 gain_table[TX_GAIN_TABLE_LENGTH];
bool loopback_gain; bool loopback_gain;
...@@ -780,8 +781,8 @@ struct phy_info { ...@@ -780,8 +781,8 @@ struct phy_info {
u32 nphy_bb_mult_save; u32 nphy_bb_mult_save;
u16 nphy_txiqlocal_bestc[11]; u16 nphy_txiqlocal_bestc[11];
bool nphy_txiqlocal_coeffsvalid; bool nphy_txiqlocal_coeffsvalid;
phy_txpwrindex_t nphy_txpwrindex[PHY_CORE_NUM_2]; struct nphy_txpwrindex nphy_txpwrindex[PHY_CORE_NUM_2];
phy_pwrctrl_t nphy_pwrctrl_info[PHY_CORE_NUM_2]; struct nphy_pwrctrl nphy_pwrctrl_info[PHY_CORE_NUM_2];
u16 cck2gpo; u16 cck2gpo;
u32 ofdm2gpo; u32 ofdm2gpo;
u32 ofdm5gpo; u32 ofdm5gpo;
...@@ -849,8 +850,8 @@ struct phy_info { ...@@ -849,8 +850,8 @@ struct phy_info {
bool internal_tx_iqlo_cal_tapoff_intpa_nphy; bool internal_tx_iqlo_cal_tapoff_intpa_nphy;
s16 nphy_lastcal_temp; s16 nphy_lastcal_temp;
txiqcal_cache_t calibration_cache; struct txiqcal_cache calibration_cache;
rssical_cache_t rssical_cache; struct rssical_cache rssical_cache;
u8 nphy_txpwr_idx[2]; u8 nphy_txpwr_idx[2];
u8 nphy_papd_cal_type; u8 nphy_papd_cal_type;
...@@ -881,7 +882,7 @@ struct phy_info { ...@@ -881,7 +882,7 @@ struct phy_info {
u8 nphy_txcal_pwr_idx[2]; u8 nphy_txcal_pwr_idx[2];
u8 nphy_rxcal_pwr_idx[2]; u8 nphy_rxcal_pwr_idx[2];
u16 nphy_cal_orig_tx_gain[2]; u16 nphy_cal_orig_tx_gain[2];
nphy_txgains_t nphy_cal_target_gain; struct nphy_txgains nphy_cal_target_gain;
u16 nphy_txcal_bbmult; u16 nphy_txcal_bbmult;
u16 nphy_gmval; u16 nphy_gmval;
...@@ -892,7 +893,7 @@ struct phy_info { ...@@ -892,7 +893,7 @@ struct phy_info {
bool nphy_aband_spurwar_en; bool nphy_aband_spurwar_en;
u16 nphy_rccal_value; u16 nphy_rccal_value;
u16 nphy_crsminpwr[3]; u16 nphy_crsminpwr[3];
phy_noisevar_buf_t nphy_saved_noisevars; struct nphy_noisevar_buf nphy_saved_noisevars;
bool nphy_anarxlpf_adjusted; bool nphy_anarxlpf_adjusted;
bool nphy_crsminpwr_adjusted; bool nphy_crsminpwr_adjusted;
bool nphy_noisevars_adjusted; bool nphy_noisevars_adjusted;
...@@ -963,21 +964,23 @@ struct lcnphy_radio_regs { ...@@ -963,21 +964,23 @@ struct lcnphy_radio_regs {
u8 do_init_g; u8 do_init_g;
}; };
extern lcnphy_radio_regs_t lcnphy_radio_regs_2064[]; extern struct lcnphy_radio_regs lcnphy_radio_regs_2064[];
extern lcnphy_radio_regs_t lcnphy_radio_regs_2066[]; extern struct lcnphy_radio_regs lcnphy_radio_regs_2066[];
extern radio_regs_t regs_2055[], regs_SYN_2056[], regs_TX_2056[], extern struct radio_regs regs_2055[], regs_SYN_2056[], regs_TX_2056[],
regs_RX_2056[]; regs_RX_2056[];
extern radio_regs_t regs_SYN_2056_A1[], regs_TX_2056_A1[], regs_RX_2056_A1[]; extern struct radio_regs regs_SYN_2056_A1[], regs_TX_2056_A1[],
extern radio_regs_t regs_SYN_2056_rev5[], regs_TX_2056_rev5[], regs_RX_2056_A1[];
extern struct radio_regs regs_SYN_2056_rev5[], regs_TX_2056_rev5[],
regs_RX_2056_rev5[]; regs_RX_2056_rev5[];
extern radio_regs_t regs_SYN_2056_rev6[], regs_TX_2056_rev6[], extern struct radio_regs regs_SYN_2056_rev6[], regs_TX_2056_rev6[],
regs_RX_2056_rev6[]; regs_RX_2056_rev6[];
extern radio_regs_t regs_SYN_2056_rev7[], regs_TX_2056_rev7[], extern struct radio_regs regs_SYN_2056_rev7[], regs_TX_2056_rev7[],
regs_RX_2056_rev7[]; regs_RX_2056_rev7[];
extern radio_regs_t regs_SYN_2056_rev8[], regs_TX_2056_rev8[], extern struct radio_regs regs_SYN_2056_rev8[], regs_TX_2056_rev8[],
regs_RX_2056_rev8[]; regs_RX_2056_rev8[];
extern radio_20xx_regs_t regs_2057_rev4[], regs_2057_rev5[], regs_2057_rev5v1[]; extern struct radio_20xx_regs regs_2057_rev4[], regs_2057_rev5[],
extern radio_20xx_regs_t regs_2057_rev7[], regs_2057_rev8[]; regs_2057_rev5v1[];
extern struct radio_20xx_regs regs_2057_rev7[], regs_2057_rev8[];
extern char *phy_getvar(phy_info_t *pi, const char *name); extern char *phy_getvar(phy_info_t *pi, const char *name);
extern int phy_getintvar(phy_info_t *pi, const char *name); extern int phy_getintvar(phy_info_t *pi, const char *name);
...@@ -1004,12 +1007,13 @@ extern void wlc_phyreg_exit(wlc_phy_t *pih); ...@@ -1004,12 +1007,13 @@ extern void wlc_phyreg_exit(wlc_phy_t *pih);
extern void wlc_radioreg_enter(wlc_phy_t *pih); extern void wlc_radioreg_enter(wlc_phy_t *pih);
extern void wlc_radioreg_exit(wlc_phy_t *pih); extern void wlc_radioreg_exit(wlc_phy_t *pih);
extern void wlc_phy_read_table(phy_info_t *pi, const phytbl_info_t *ptbl_info, extern void wlc_phy_read_table(phy_info_t *pi,
const struct phytbl_info *ptbl_info,
u16 tblAddr, u16 tblDataHi, u16 tblAddr, u16 tblDataHi,
u16 tblDatalo); u16 tblDatalo);
extern void wlc_phy_write_table(phy_info_t *pi, extern void wlc_phy_write_table(phy_info_t *pi,
const phytbl_info_t *ptbl_info, u16 tblAddr, const struct phytbl_info *ptbl_info,
u16 tblDataHi, u16 tblDatalo); u16 tblAddr, u16 tblDataHi, u16 tblDatalo);
extern void wlc_phy_table_addr(phy_info_t *pi, uint tbl_id, uint tbl_offset, extern void wlc_phy_table_addr(phy_info_t *pi, uint tbl_id, uint tbl_offset,
u16 tblAddr, u16 tblDataHi, u16 tblAddr, u16 tblDataHi,
u16 tblDataLo); u16 tblDataLo);
...@@ -1023,8 +1027,9 @@ extern u8 wlc_phy_nbits(s32 value); ...@@ -1023,8 +1027,9 @@ extern u8 wlc_phy_nbits(s32 value);
extern void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_dB, u8 core); extern void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_dB, u8 core);
extern uint wlc_phy_init_radio_regs_allbands(phy_info_t *pi, extern uint wlc_phy_init_radio_regs_allbands(phy_info_t *pi,
radio_20xx_regs_t *radioregs); struct radio_20xx_regs *radioregs);
extern uint wlc_phy_init_radio_regs(phy_info_t *pi, radio_regs_t *radioregs, extern uint wlc_phy_init_radio_regs(phy_info_t *pi,
struct radio_regs *radioregs,
u16 core_offset); u16 core_offset);
extern void wlc_phy_txpower_ipa_upd(phy_info_t *pi); extern void wlc_phy_txpower_ipa_upd(phy_info_t *pi);
...@@ -1101,8 +1106,9 @@ extern void wlc_phy_txpower_recalc_target(phy_info_t *pi); ...@@ -1101,8 +1106,9 @@ extern void wlc_phy_txpower_recalc_target(phy_info_t *pi);
#define LCNPHY_TX_PWR_CTRL_TEMPBASED 0xE001 #define LCNPHY_TX_PWR_CTRL_TEMPBASED 0xE001
extern void wlc_lcnphy_write_table(phy_info_t *pi, const phytbl_info_t *pti); extern void wlc_lcnphy_write_table(phy_info_t *pi,
extern void wlc_lcnphy_read_table(phy_info_t *pi, phytbl_info_t *pti); const struct phytbl_info *pti);
extern void wlc_lcnphy_read_table(phy_info_t *pi, struct phytbl_info *pti);
extern void wlc_lcnphy_set_tx_iqcc(phy_info_t *pi, u16 a, u16 b); extern void wlc_lcnphy_set_tx_iqcc(phy_info_t *pi, u16 a, u16 b);
extern void wlc_lcnphy_set_tx_locc(phy_info_t *pi, u16 didq); extern void wlc_lcnphy_set_tx_locc(phy_info_t *pi, u16 didq);
extern void wlc_lcnphy_get_tx_iqcc(phy_info_t *pi, u16 *a, u16 *b); extern void wlc_lcnphy_get_tx_iqcc(phy_info_t *pi, u16 *a, u16 *b);
...@@ -1167,12 +1173,12 @@ extern s16 wlc_phy_tempsense_nphy(phy_info_t *pi); ...@@ -1167,12 +1173,12 @@ extern s16 wlc_phy_tempsense_nphy(phy_info_t *pi);
extern u16 wlc_phy_classifier_nphy(phy_info_t *pi, u16 mask, u16 val); extern u16 wlc_phy_classifier_nphy(phy_info_t *pi, u16 mask, u16 val);
extern void wlc_phy_rx_iq_est_nphy(phy_info_t *pi, phy_iq_est_t *est, extern void wlc_phy_rx_iq_est_nphy(phy_info_t *pi, struct phy_iq_est *est,
u16 num_samps, u8 wait_time, u16 num_samps, u8 wait_time,
u8 wait_for_crs); u8 wait_for_crs);
extern void wlc_phy_rx_iq_coeffs_nphy(phy_info_t *pi, u8 write, extern void wlc_phy_rx_iq_coeffs_nphy(phy_info_t *pi, u8 write,
nphy_iq_comp_t *comp); struct nphy_iq_comp *comp);
extern void wlc_phy_aci_and_noise_reduction_nphy(phy_info_t *pi); extern void wlc_phy_aci_and_noise_reduction_nphy(phy_info_t *pi);
extern void wlc_phy_rxcore_setstate_nphy(wlc_phy_t *pih, u8 rxcore_bitmask); extern void wlc_phy_rxcore_setstate_nphy(wlc_phy_t *pih, u8 rxcore_bitmask);
...@@ -1184,10 +1190,12 @@ extern void wlc_phy_txpwr_apply_nphy(phy_info_t *pi); ...@@ -1184,10 +1190,12 @@ extern void wlc_phy_txpwr_apply_nphy(phy_info_t *pi);
extern void wlc_phy_txpwr_papd_cal_nphy(phy_info_t *pi); extern void wlc_phy_txpwr_papd_cal_nphy(phy_info_t *pi);
extern u16 wlc_phy_txpwr_idx_get_nphy(phy_info_t *pi); extern u16 wlc_phy_txpwr_idx_get_nphy(phy_info_t *pi);
extern nphy_txgains_t wlc_phy_get_tx_gain_nphy(phy_info_t *pi); extern struct nphy_txgains wlc_phy_get_tx_gain_nphy(phy_info_t *pi);
extern int wlc_phy_cal_txiqlo_nphy(phy_info_t *pi, nphy_txgains_t target_gain, extern int wlc_phy_cal_txiqlo_nphy(phy_info_t *pi,
struct nphy_txgains target_gain,
bool full, bool m); bool full, bool m);
extern int wlc_phy_cal_rxiq_nphy(phy_info_t *pi, nphy_txgains_t target_gain, extern int wlc_phy_cal_rxiq_nphy(phy_info_t *pi,
struct nphy_txgains target_gain,
u8 type, bool d); u8 type, bool d);
extern void wlc_phy_txpwr_index_nphy(phy_info_t *pi, u8 core_mask, extern void wlc_phy_txpwr_index_nphy(phy_info_t *pi, u8 core_mask,
s8 txpwrindex, bool res); s8 txpwrindex, bool res);
...@@ -1205,7 +1213,8 @@ extern void wlc_phy_est_tonepwr_nphy(phy_info_t *pi, s32 *qdBm_pwrbuf, ...@@ -1205,7 +1213,8 @@ extern void wlc_phy_est_tonepwr_nphy(phy_info_t *pi, s32 *qdBm_pwrbuf,
u8 num_samps); u8 num_samps);
extern void wlc_phy_radio205x_vcocal_nphy(phy_info_t *pi); extern void wlc_phy_radio205x_vcocal_nphy(phy_info_t *pi);
extern int wlc_phy_rssi_compute_nphy(phy_info_t *pi, wlc_d11rxhdr_t *wlc_rxh); extern int wlc_phy_rssi_compute_nphy(phy_info_t *pi,
struct brcms_d11rxhdr *wlc_rxh);
#define NPHY_TESTPATTERN_BPHY_EVM 0 #define NPHY_TESTPATTERN_BPHY_EVM 0
#define NPHY_TESTPATTERN_BPHY_RFCS 1 #define NPHY_TESTPATTERN_BPHY_RFCS 1
......
...@@ -100,7 +100,7 @@ struct phy_info_lcnphy { ...@@ -100,7 +100,7 @@ struct phy_info_lcnphy {
u16 lcnphy_extstxctrl1; u16 lcnphy_extstxctrl1;
s16 lcnphy_cck_dig_filt_type; s16 lcnphy_cck_dig_filt_type;
s16 lcnphy_ofdm_dig_filt_type; s16 lcnphy_ofdm_dig_filt_type;
lcnphy_cal_results_t lcnphy_cal_results; struct lcnphy_cal_results lcnphy_cal_results;
u8 lcnphy_psat_pwr; u8 lcnphy_psat_pwr;
u8 lcnphy_psat_indx; u8 lcnphy_psat_indx;
......
...@@ -1505,7 +1505,7 @@ const u32 dot11lcn_gain_tbl_5G[] = { ...@@ -1505,7 +1505,7 @@ const u32 dot11lcn_gain_tbl_5G[] = {
0x00000000 0x00000000
}; };
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[] = { const struct phytbl_info dot11lcnphytbl_rx_gain_info_rev0[] = {
{&dot11lcn_gain_tbl_rev0, {&dot11lcn_gain_tbl_rev0,
sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18, sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18,
0, 32} 0, 32}
...@@ -1520,7 +1520,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[] = { ...@@ -1520,7 +1520,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[] = {
, ,
}; };
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev1[] = { const struct phytbl_info dot11lcnphytbl_rx_gain_info_rev1[] = {
{&dot11lcn_gain_tbl_rev1, {&dot11lcn_gain_tbl_rev1,
sizeof(dot11lcn_gain_tbl_rev1) / sizeof(dot11lcn_gain_tbl_rev1[0]), 18, sizeof(dot11lcn_gain_tbl_rev1) / sizeof(dot11lcn_gain_tbl_rev1[0]), 18,
0, 32} 0, 32}
...@@ -1535,7 +1535,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev1[] = { ...@@ -1535,7 +1535,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev1[] = {
, ,
}; };
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_2G_rev2[] = { const struct phytbl_info dot11lcnphytbl_rx_gain_info_2G_rev2[] = {
{&dot11lcn_gain_tbl_2G, {&dot11lcn_gain_tbl_2G,
sizeof(dot11lcn_gain_tbl_2G) / sizeof(dot11lcn_gain_tbl_2G[0]), 18, 0, sizeof(dot11lcn_gain_tbl_2G) / sizeof(dot11lcn_gain_tbl_2G[0]), 18, 0,
32} 32}
...@@ -1553,7 +1553,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_2G_rev2[] = { ...@@ -1553,7 +1553,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_2G_rev2[] = {
17, 0, 8} 17, 0, 8}
}; };
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_5G_rev2[] = { const struct phytbl_info dot11lcnphytbl_rx_gain_info_5G_rev2[] = {
{&dot11lcn_gain_tbl_5G, {&dot11lcn_gain_tbl_5G,
sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0, sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
32} 32}
...@@ -1571,7 +1571,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_5G_rev2[] = { ...@@ -1571,7 +1571,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_5G_rev2[] = {
17, 0, 8} 17, 0, 8}
}; };
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[] = { const struct phytbl_info dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[] = {
{&dot11lcn_gain_tbl_extlna_2G, {&dot11lcn_gain_tbl_extlna_2G,
sizeof(dot11lcn_gain_tbl_extlna_2G) / sizeof(dot11lcn_gain_tbl_extlna_2G) /
sizeof(dot11lcn_gain_tbl_extlna_2G[0]), 18, 0, 32} sizeof(dot11lcn_gain_tbl_extlna_2G[0]), 18, 0, 32}
...@@ -1589,7 +1589,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[] = { ...@@ -1589,7 +1589,7 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[] = {
sizeof(dot11lcn_gain_val_tbl_extlna_2G[0]), 17, 0, 8} sizeof(dot11lcn_gain_val_tbl_extlna_2G[0]), 17, 0, 8}
}; };
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[] = { const struct phytbl_info dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[] = {
{&dot11lcn_gain_tbl_5G, {&dot11lcn_gain_tbl_5G,
sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0, sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
32} 32}
...@@ -2773,7 +2773,7 @@ const u32 dot11lcn_papd_compdelta_tbl_rev0[] = { ...@@ -2773,7 +2773,7 @@ const u32 dot11lcn_papd_compdelta_tbl_rev0[] = {
0x00080000, 0x00080000,
}; };
const dot11lcnphytbl_info_t dot11lcnphytbl_info_rev0[] = { const struct phytbl_info dot11lcnphytbl_info_rev0[] = {
{&dot11lcn_min_sig_sq_tbl_rev0, {&dot11lcn_min_sig_sq_tbl_rev0,
sizeof(dot11lcn_min_sig_sq_tbl_rev0) / sizeof(dot11lcn_min_sig_sq_tbl_rev0) /
sizeof(dot11lcn_min_sig_sq_tbl_rev0[0]), 2, 0, 16} sizeof(dot11lcn_min_sig_sq_tbl_rev0[0]), 2, 0, 16}
...@@ -2832,25 +2832,25 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_info_rev0[] = { ...@@ -2832,25 +2832,25 @@ const dot11lcnphytbl_info_t dot11lcnphytbl_info_rev0[] = {
, ,
}; };
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313 = { const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313 = {
&dot11lcn_sw_ctrl_tbl_4313_rev0, &dot11lcn_sw_ctrl_tbl_4313_rev0,
sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0) / sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0) /
sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0[0]), 15, 0, 16 sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0[0]), 15, 0, 16
}; };
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_epa = { const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_epa = {
&dot11lcn_sw_ctrl_tbl_4313_epa_rev0, &dot11lcn_sw_ctrl_tbl_4313_epa_rev0,
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0) / sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0) /
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0[0]), 15, 0, 16 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0[0]), 15, 0, 16
}; };
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa = { const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa = {
&dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo, &dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo,
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo) / sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo) /
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[0]), 15, 0, 16 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[0]), 15, 0, 16
}; };
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250 = { const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250 = {
&dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0, &dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0,
sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0) / sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0) /
sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[0]), 15, 0, 16 sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[0]), 15, 0, 16
...@@ -2859,7 +2859,8 @@ const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250 = { ...@@ -2859,7 +2859,8 @@ const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250 = {
const u32 dot11lcnphytbl_info_sz_rev0 = const u32 dot11lcnphytbl_info_sz_rev0 =
sizeof(dot11lcnphytbl_info_rev0) / sizeof(dot11lcnphytbl_info_rev0[0]); sizeof(dot11lcnphytbl_info_rev0) / sizeof(dot11lcnphytbl_info_rev0[0]);
const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[128] = { const struct lcnphy_tx_gain_tbl_entry
dot11lcnphy_2GHz_extPA_gaintable_rev0[128] = {
{3, 0, 31, 0, 72,} {3, 0, 31, 0, 72,}
, ,
{3, 0, 31, 0, 70,} {3, 0, 31, 0, 70,}
...@@ -3118,7 +3119,7 @@ const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[128] = { ...@@ -3118,7 +3119,7 @@ const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[128] = {
, ,
}; };
const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[128] = { const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[128] = {
{7, 0, 31, 0, 72,} {7, 0, 31, 0, 72,}
, ,
{7, 0, 31, 0, 70,} {7, 0, 31, 0, 70,}
...@@ -3377,7 +3378,7 @@ const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[128] = { ...@@ -3377,7 +3378,7 @@ const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[128] = {
, ,
}; };
const lcnphy_tx_gain_tbl_entry dot11lcnphy_5GHz_gaintable_rev0[128] = { const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_5GHz_gaintable_rev0[128] = {
{255, 255, 0xf0, 0, 152,} {255, 255, 0xf0, 0, 152,}
, ,
{255, 255, 0xf0, 0, 147,} {255, 255, 0xf0, 0, 147,}
......
...@@ -17,26 +17,26 @@ ...@@ -17,26 +17,26 @@
#include <types.h> #include <types.h>
#include "phy_int.h" #include "phy_int.h"
extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[]; extern const struct phytbl_info dot11lcnphytbl_rx_gain_info_rev0[];
extern const u32 dot11lcnphytbl_rx_gain_info_sz_rev0; extern const u32 dot11lcnphytbl_rx_gain_info_sz_rev0;
extern const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313; extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313;
extern const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_epa; extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_epa;
extern const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_epa_combo; extern const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_epa_combo;
extern const dot11lcnphytbl_info_t dot11lcnphytbl_info_rev0[]; extern const struct phytbl_info dot11lcnphytbl_info_rev0[];
extern const u32 dot11lcnphytbl_info_sz_rev0; extern const u32 dot11lcnphytbl_info_sz_rev0;
extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_2G_rev2[]; extern const struct phytbl_info dot11lcnphytbl_rx_gain_info_2G_rev2[];
extern const u32 dot11lcnphytbl_rx_gain_info_2G_rev2_sz; extern const u32 dot11lcnphytbl_rx_gain_info_2G_rev2_sz;
extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_5G_rev2[]; extern const struct phytbl_info dot11lcnphytbl_rx_gain_info_5G_rev2[];
extern const u32 dot11lcnphytbl_rx_gain_info_5G_rev2_sz; extern const u32 dot11lcnphytbl_rx_gain_info_5G_rev2_sz;
extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[]; extern const struct phytbl_info dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[];
extern const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[]; extern const struct phytbl_info dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[];
struct _lcnphy_tx_gain_tbl_entry { struct lcnphy_tx_gain_tbl_entry {
unsigned char gm; unsigned char gm;
unsigned char pga; unsigned char pga;
unsigned char pad; unsigned char pad;
...@@ -44,7 +44,9 @@ struct _lcnphy_tx_gain_tbl_entry { ...@@ -44,7 +44,9 @@ struct _lcnphy_tx_gain_tbl_entry {
unsigned char bb_mult; unsigned char bb_mult;
}; };
extern const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[]; extern const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[];
extern const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[];
extern const lcnphy_tx_gain_tbl_entry dot11lcnphy_5GHz_gaintable_rev0[]; extern const struct
lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[];
extern const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_5GHz_gaintable_rev0[];
...@@ -4436,7 +4436,7 @@ const u16 loft_lut_core1_rev0[] = { ...@@ -4436,7 +4436,7 @@ const u16 loft_lut_core1_rev0[] = {
0x0103, 0x0103,
}; };
const mimophytbl_info_t mimophytbl_info_rev0_volatile[] = { const struct phytbl_info mimophytbl_info_rev0_volatile[] = {
{&bdi_tbl_rev0, sizeof(bdi_tbl_rev0) / sizeof(bdi_tbl_rev0[0]), 21, 0, {&bdi_tbl_rev0, sizeof(bdi_tbl_rev0) / sizeof(bdi_tbl_rev0[0]), 21, 0,
16} 16}
, ,
...@@ -4484,7 +4484,7 @@ const mimophytbl_info_t mimophytbl_info_rev0_volatile[] = { ...@@ -4484,7 +4484,7 @@ const mimophytbl_info_t mimophytbl_info_rev0_volatile[] = {
, ,
}; };
const mimophytbl_info_t mimophytbl_info_rev0[] = { const struct phytbl_info mimophytbl_info_rev0[] = {
{&frame_struct_rev0, {&frame_struct_rev0,
sizeof(frame_struct_rev0) / sizeof(frame_struct_rev0[0]), 10, 0, 32} sizeof(frame_struct_rev0) / sizeof(frame_struct_rev0[0]), 10, 0, 32}
, ,
...@@ -9361,34 +9361,34 @@ const u32 papd_cal_scalars_tbl_core1_rev3[] = { ...@@ -9361,34 +9361,34 @@ const u32 papd_cal_scalars_tbl_core1_rev3[] = {
0x002606a4, 0x002606a4,
}; };
const mimophytbl_info_t mimophytbl_info_rev3_volatile[] = { const struct phytbl_info mimophytbl_info_rev3_volatile[] = {
{&ant_swctrl_tbl_rev3, {&ant_swctrl_tbl_rev3,
sizeof(ant_swctrl_tbl_rev3) / sizeof(ant_swctrl_tbl_rev3[0]), 9, 0, 16} sizeof(ant_swctrl_tbl_rev3) / sizeof(ant_swctrl_tbl_rev3[0]), 9, 0, 16}
, ,
}; };
const mimophytbl_info_t mimophytbl_info_rev3_volatile1[] = { const struct phytbl_info mimophytbl_info_rev3_volatile1[] = {
{&ant_swctrl_tbl_rev3_1, {&ant_swctrl_tbl_rev3_1,
sizeof(ant_swctrl_tbl_rev3_1) / sizeof(ant_swctrl_tbl_rev3_1[0]), 9, 0, sizeof(ant_swctrl_tbl_rev3_1) / sizeof(ant_swctrl_tbl_rev3_1[0]), 9, 0,
16} 16}
, ,
}; };
const mimophytbl_info_t mimophytbl_info_rev3_volatile2[] = { const struct phytbl_info mimophytbl_info_rev3_volatile2[] = {
{&ant_swctrl_tbl_rev3_2, {&ant_swctrl_tbl_rev3_2,
sizeof(ant_swctrl_tbl_rev3_2) / sizeof(ant_swctrl_tbl_rev3_2[0]), 9, 0, sizeof(ant_swctrl_tbl_rev3_2) / sizeof(ant_swctrl_tbl_rev3_2[0]), 9, 0,
16} 16}
, ,
}; };
const mimophytbl_info_t mimophytbl_info_rev3_volatile3[] = { const struct phytbl_info mimophytbl_info_rev3_volatile3[] = {
{&ant_swctrl_tbl_rev3_3, {&ant_swctrl_tbl_rev3_3,
sizeof(ant_swctrl_tbl_rev3_3) / sizeof(ant_swctrl_tbl_rev3_3[0]), 9, 0, sizeof(ant_swctrl_tbl_rev3_3) / sizeof(ant_swctrl_tbl_rev3_3[0]), 9, 0,
16} 16}
, ,
}; };
const mimophytbl_info_t mimophytbl_info_rev3[] = { const struct phytbl_info mimophytbl_info_rev3[] = {
{&frame_struct_rev3, {&frame_struct_rev3,
sizeof(frame_struct_rev3) / sizeof(frame_struct_rev3[0]), 10, 0, 32} sizeof(frame_struct_rev3) / sizeof(frame_struct_rev3[0]), 10, 0, 32}
, ,
...@@ -10467,7 +10467,7 @@ const u32 papd_cal_scalars_tbl_core1_rev7[] = { ...@@ -10467,7 +10467,7 @@ const u32 papd_cal_scalars_tbl_core1_rev7[] = {
0x004e068c, 0x004e068c,
}; };
const mimophytbl_info_t mimophytbl_info_rev7[] = { const struct phytbl_info mimophytbl_info_rev7[] = {
{&frame_struct_rev3, {&frame_struct_rev3,
sizeof(frame_struct_rev3) / sizeof(frame_struct_rev3[0]), 10, 0, 32} sizeof(frame_struct_rev3) / sizeof(frame_struct_rev3[0]), 10, 0, 32}
, ,
...@@ -10581,7 +10581,7 @@ const mimophytbl_info_t mimophytbl_info_rev7[] = { ...@@ -10581,7 +10581,7 @@ const mimophytbl_info_t mimophytbl_info_rev7[] = {
const u32 mimophytbl_info_sz_rev7 = const u32 mimophytbl_info_sz_rev7 =
sizeof(mimophytbl_info_rev7) / sizeof(mimophytbl_info_rev7[0]); sizeof(mimophytbl_info_rev7) / sizeof(mimophytbl_info_rev7[0]);
const mimophytbl_info_t mimophytbl_info_rev16[] = { const struct phytbl_info mimophytbl_info_rev16[] = {
{&noise_var_tbl_rev7, {&noise_var_tbl_rev7,
sizeof(noise_var_tbl_rev7) / sizeof(noise_var_tbl_rev7[0]), 16, 0, 32} sizeof(noise_var_tbl_rev7) / sizeof(noise_var_tbl_rev7[0]), 16, 0, 32}
, ,
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
#include <types.h> #include <types.h>
#include "phy_int.h" #include "phy_int.h"
extern const mimophytbl_info_t mimophytbl_info_rev0[], extern const struct phytbl_info mimophytbl_info_rev0[],
mimophytbl_info_rev0_volatile[]; mimophytbl_info_rev0_volatile[];
extern const u32 mimophytbl_info_sz_rev0, mimophytbl_info_sz_rev0_volatile; extern const u32 mimophytbl_info_sz_rev0, mimophytbl_info_sz_rev0_volatile;
extern const mimophytbl_info_t mimophytbl_info_rev3[], extern const struct phytbl_info mimophytbl_info_rev3[],
mimophytbl_info_rev3_volatile[], mimophytbl_info_rev3_volatile1[], mimophytbl_info_rev3_volatile[], mimophytbl_info_rev3_volatile1[],
mimophytbl_info_rev3_volatile2[], mimophytbl_info_rev3_volatile3[]; mimophytbl_info_rev3_volatile2[], mimophytbl_info_rev3_volatile3[];
extern const u32 mimophytbl_info_sz_rev3, mimophytbl_info_sz_rev3_volatile, extern const u32 mimophytbl_info_sz_rev3, mimophytbl_info_sz_rev3_volatile,
...@@ -32,9 +32,9 @@ extern const u32 mimophytbl_info_sz_rev3, mimophytbl_info_sz_rev3_volatile, ...@@ -32,9 +32,9 @@ extern const u32 mimophytbl_info_sz_rev3, mimophytbl_info_sz_rev3_volatile,
extern const u32 noise_var_tbl_rev3[]; extern const u32 noise_var_tbl_rev3[];
extern const mimophytbl_info_t mimophytbl_info_rev7[]; extern const struct phytbl_info mimophytbl_info_rev7[];
extern const u32 mimophytbl_info_sz_rev7; extern const u32 mimophytbl_info_sz_rev7;
extern const u32 noise_var_tbl_rev7[]; extern const u32 noise_var_tbl_rev7[];
extern const mimophytbl_info_t mimophytbl_info_rev16[]; extern const struct phytbl_info mimophytbl_info_rev16[];
extern const u32 mimophytbl_info_sz_rev16; extern const u32 mimophytbl_info_sz_rev16;
...@@ -29,17 +29,17 @@ ...@@ -29,17 +29,17 @@
#include "phy_shim.h" #include "phy_shim.h"
/* PHY SHIM module specific state */ /* PHY SHIM module specific state */
struct wlc_phy_shim_info { struct phy_shim_info {
struct brcms_c_hw_info *wlc_hw; /* pointer to main wlc_hw structure */ struct brcms_c_hw_info *wlc_hw; /* pointer to main wlc_hw structure */
void *wlc; /* pointer to main wlc structure */ void *wlc; /* pointer to main wlc structure */
void *wl; /* pointer to os-specific private state */ void *wl; /* pointer to os-specific private state */
}; };
wlc_phy_shim_info_t *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw, struct phy_shim_info *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw,
void *wl, void *wlc) { void *wl, void *wlc) {
wlc_phy_shim_info_t *physhim = NULL; struct phy_shim_info *physhim = NULL;
physhim = kzalloc(sizeof(wlc_phy_shim_info_t), GFP_ATOMIC); physhim = kzalloc(sizeof(struct phy_shim_info), GFP_ATOMIC);
if (!physhim) { if (!physhim) {
wiphy_err(wlc_hw->wlc->wiphy, wiphy_err(wlc_hw->wlc->wiphy,
"wl%d: wlc_phy_shim_attach: out of mem\n", "wl%d: wlc_phy_shim_attach: out of mem\n",
...@@ -53,12 +53,12 @@ wlc_phy_shim_info_t *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw, ...@@ -53,12 +53,12 @@ wlc_phy_shim_info_t *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw,
return physhim; return physhim;
} }
void wlc_phy_shim_detach(wlc_phy_shim_info_t *physhim) void wlc_phy_shim_detach(struct phy_shim_info *physhim)
{ {
kfree(physhim); kfree(physhim);
} }
struct wlapi_timer *wlapi_init_timer(wlc_phy_shim_info_t *physhim, struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
void (*fn) (void *arg), void *arg, void (*fn) (void *arg), void *arg,
const char *name) const char *name)
{ {
...@@ -66,152 +66,152 @@ struct wlapi_timer *wlapi_init_timer(wlc_phy_shim_info_t *physhim, ...@@ -66,152 +66,152 @@ struct wlapi_timer *wlapi_init_timer(wlc_phy_shim_info_t *physhim,
brcms_init_timer(physhim->wl, fn, arg, name); brcms_init_timer(physhim->wl, fn, arg, name);
} }
void wlapi_free_timer(wlc_phy_shim_info_t *physhim, struct wlapi_timer *t) void wlapi_free_timer(struct phy_shim_info *physhim, struct wlapi_timer *t)
{ {
brcms_free_timer(physhim->wl, (struct brcms_timer *)t); brcms_free_timer(physhim->wl, (struct brcms_timer *)t);
} }
void void
wlapi_add_timer(wlc_phy_shim_info_t *physhim, struct wlapi_timer *t, uint ms, wlapi_add_timer(struct phy_shim_info *physhim, struct wlapi_timer *t, uint ms,
int periodic) int periodic)
{ {
brcms_add_timer(physhim->wl, (struct brcms_timer *)t, ms, periodic); brcms_add_timer(physhim->wl, (struct brcms_timer *)t, ms, periodic);
} }
bool wlapi_del_timer(wlc_phy_shim_info_t *physhim, struct wlapi_timer *t) bool wlapi_del_timer(struct phy_shim_info *physhim, struct wlapi_timer *t)
{ {
return brcms_del_timer(physhim->wl, (struct brcms_timer *)t); return brcms_del_timer(physhim->wl, (struct brcms_timer *)t);
} }
void wlapi_intrson(wlc_phy_shim_info_t *physhim) void wlapi_intrson(struct phy_shim_info *physhim)
{ {
brcms_intrson(physhim->wl); brcms_intrson(physhim->wl);
} }
u32 wlapi_intrsoff(wlc_phy_shim_info_t *physhim) u32 wlapi_intrsoff(struct phy_shim_info *physhim)
{ {
return brcms_intrsoff(physhim->wl); return brcms_intrsoff(physhim->wl);
} }
void wlapi_intrsrestore(wlc_phy_shim_info_t *physhim, u32 macintmask) void wlapi_intrsrestore(struct phy_shim_info *physhim, u32 macintmask)
{ {
brcms_intrsrestore(physhim->wl, macintmask); brcms_intrsrestore(physhim->wl, macintmask);
} }
void wlapi_bmac_write_shm(wlc_phy_shim_info_t *physhim, uint offset, u16 v) void wlapi_bmac_write_shm(struct phy_shim_info *physhim, uint offset, u16 v)
{ {
brcms_b_write_shm(physhim->wlc_hw, offset, v); brcms_b_write_shm(physhim->wlc_hw, offset, v);
} }
u16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset) u16 wlapi_bmac_read_shm(struct phy_shim_info *physhim, uint offset)
{ {
return brcms_b_read_shm(physhim->wlc_hw, offset); return brcms_b_read_shm(physhim->wlc_hw, offset);
} }
void void
wlapi_bmac_mhf(wlc_phy_shim_info_t *physhim, u8 idx, u16 mask, wlapi_bmac_mhf(struct phy_shim_info *physhim, u8 idx, u16 mask,
u16 val, int bands) u16 val, int bands)
{ {
brcms_b_mhf(physhim->wlc_hw, idx, mask, val, bands); brcms_b_mhf(physhim->wlc_hw, idx, mask, val, bands);
} }
void wlapi_bmac_corereset(wlc_phy_shim_info_t *physhim, u32 flags) void wlapi_bmac_corereset(struct phy_shim_info *physhim, u32 flags)
{ {
brcms_b_corereset(physhim->wlc_hw, flags); brcms_b_corereset(physhim->wlc_hw, flags);
} }
void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim) void wlapi_suspend_mac_and_wait(struct phy_shim_info *physhim)
{ {
brcms_c_suspend_mac_and_wait(physhim->wlc); brcms_c_suspend_mac_and_wait(physhim->wlc);
} }
void wlapi_switch_macfreq(wlc_phy_shim_info_t *physhim, u8 spurmode) void wlapi_switch_macfreq(struct phy_shim_info *physhim, u8 spurmode)
{ {
brcms_b_switch_macfreq(physhim->wlc_hw, spurmode); brcms_b_switch_macfreq(physhim->wlc_hw, spurmode);
} }
void wlapi_enable_mac(wlc_phy_shim_info_t *physhim) void wlapi_enable_mac(struct phy_shim_info *physhim)
{ {
brcms_c_enable_mac(physhim->wlc); brcms_c_enable_mac(physhim->wlc);
} }
void wlapi_bmac_mctrl(wlc_phy_shim_info_t *physhim, u32 mask, u32 val) void wlapi_bmac_mctrl(struct phy_shim_info *physhim, u32 mask, u32 val)
{ {
brcms_b_mctrl(physhim->wlc_hw, mask, val); brcms_b_mctrl(physhim->wlc_hw, mask, val);
} }
void wlapi_bmac_phy_reset(wlc_phy_shim_info_t *physhim) void wlapi_bmac_phy_reset(struct phy_shim_info *physhim)
{ {
brcms_b_phy_reset(physhim->wlc_hw); brcms_b_phy_reset(physhim->wlc_hw);
} }
void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, u16 bw) void wlapi_bmac_bw_set(struct phy_shim_info *physhim, u16 bw)
{ {
brcms_b_bw_set(physhim->wlc_hw, bw); brcms_b_bw_set(physhim->wlc_hw, bw);
} }
u16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim) u16 wlapi_bmac_get_txant(struct phy_shim_info *physhim)
{ {
return brcms_b_get_txant(physhim->wlc_hw); return brcms_b_get_txant(physhim->wlc_hw);
} }
void wlapi_bmac_phyclk_fgc(wlc_phy_shim_info_t *physhim, bool clk) void wlapi_bmac_phyclk_fgc(struct phy_shim_info *physhim, bool clk)
{ {
brcms_b_phyclk_fgc(physhim->wlc_hw, clk); brcms_b_phyclk_fgc(physhim->wlc_hw, clk);
} }
void wlapi_bmac_macphyclk_set(wlc_phy_shim_info_t *physhim, bool clk) void wlapi_bmac_macphyclk_set(struct phy_shim_info *physhim, bool clk)
{ {
brcms_b_macphyclk_set(physhim->wlc_hw, clk); brcms_b_macphyclk_set(physhim->wlc_hw, clk);
} }
void wlapi_bmac_core_phypll_ctl(wlc_phy_shim_info_t *physhim, bool on) void wlapi_bmac_core_phypll_ctl(struct phy_shim_info *physhim, bool on)
{ {
brcms_b_core_phypll_ctl(physhim->wlc_hw, on); brcms_b_core_phypll_ctl(physhim->wlc_hw, on);
} }
void wlapi_bmac_core_phypll_reset(wlc_phy_shim_info_t *physhim) void wlapi_bmac_core_phypll_reset(struct phy_shim_info *physhim)
{ {
brcms_b_core_phypll_reset(physhim->wlc_hw); brcms_b_core_phypll_reset(physhim->wlc_hw);
} }
void wlapi_bmac_ucode_wake_override_phyreg_set(wlc_phy_shim_info_t *physhim) void wlapi_bmac_ucode_wake_override_phyreg_set(struct phy_shim_info *physhim)
{ {
brcms_c_ucode_wake_override_set(physhim->wlc_hw, brcms_c_ucode_wake_override_set(physhim->wlc_hw,
WLC_WAKE_OVERRIDE_PHYREG); WLC_WAKE_OVERRIDE_PHYREG);
} }
void wlapi_bmac_ucode_wake_override_phyreg_clear(wlc_phy_shim_info_t *physhim) void wlapi_bmac_ucode_wake_override_phyreg_clear(struct phy_shim_info *physhim)
{ {
brcms_c_ucode_wake_override_clear(physhim->wlc_hw, brcms_c_ucode_wake_override_clear(physhim->wlc_hw,
WLC_WAKE_OVERRIDE_PHYREG); WLC_WAKE_OVERRIDE_PHYREG);
} }
void void
wlapi_bmac_write_template_ram(wlc_phy_shim_info_t *physhim, int offset, wlapi_bmac_write_template_ram(struct phy_shim_info *physhim, int offset,
int len, void *buf) int len, void *buf)
{ {
brcms_b_write_template_ram(physhim->wlc_hw, offset, len, buf); brcms_b_write_template_ram(physhim->wlc_hw, offset, len, buf);
} }
u16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, u8 rate) u16 wlapi_bmac_rate_shm_offset(struct phy_shim_info *physhim, u8 rate)
{ {
return brcms_b_rate_shm_offset(physhim->wlc_hw, rate); return brcms_b_rate_shm_offset(physhim->wlc_hw, rate);
} }
void wlapi_ucode_sample_init(wlc_phy_shim_info_t *physhim) void wlapi_ucode_sample_init(struct phy_shim_info *physhim)
{ {
} }
void void
wlapi_copyfrom_objmem(wlc_phy_shim_info_t *physhim, uint offset, void *buf, wlapi_copyfrom_objmem(struct phy_shim_info *physhim, uint offset, void *buf,
int len, u32 sel) int len, u32 sel)
{ {
brcms_b_copyfrom_objmem(physhim->wlc_hw, offset, buf, len, sel); brcms_b_copyfrom_objmem(physhim->wlc_hw, offset, buf, len, sel);
} }
void void
wlapi_copyto_objmem(wlc_phy_shim_info_t *physhim, uint offset, const void *buf, wlapi_copyto_objmem(struct phy_shim_info *physhim, uint offset, const void *buf,
int l, u32 sel) int l, u32 sel)
{ {
brcms_b_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel); brcms_b_copyto_objmem(physhim->wlc_hw, offset, buf, l, sel);
......
...@@ -108,57 +108,57 @@ ...@@ -108,57 +108,57 @@
#define WLC_N_TXRX_CHAIN0 0 #define WLC_N_TXRX_CHAIN0 0
#define WLC_N_TXRX_CHAIN1 1 #define WLC_N_TXRX_CHAIN1 1
extern wlc_phy_shim_info_t *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw, extern struct phy_shim_info *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw,
void *wl, void *wlc); void *wl, void *wlc);
extern void wlc_phy_shim_detach(wlc_phy_shim_info_t *physhim); extern void wlc_phy_shim_detach(struct phy_shim_info *physhim);
/* PHY to WL utility functions */ /* PHY to WL utility functions */
extern struct wlapi_timer *wlapi_init_timer(wlc_phy_shim_info_t *physhim, extern struct wlapi_timer *wlapi_init_timer(struct phy_shim_info *physhim,
void (*fn) (void *arg), void *arg, void (*fn) (void *arg), void *arg,
const char *name); const char *name);
extern void wlapi_free_timer(wlc_phy_shim_info_t *physhim, extern void wlapi_free_timer(struct phy_shim_info *physhim,
struct wlapi_timer *t); struct wlapi_timer *t);
extern void wlapi_add_timer(wlc_phy_shim_info_t *physhim, extern void wlapi_add_timer(struct phy_shim_info *physhim,
struct wlapi_timer *t, uint ms, int periodic); struct wlapi_timer *t, uint ms, int periodic);
extern bool wlapi_del_timer(wlc_phy_shim_info_t *physhim, extern bool wlapi_del_timer(struct phy_shim_info *physhim,
struct wlapi_timer *t); struct wlapi_timer *t);
extern void wlapi_intrson(wlc_phy_shim_info_t *physhim); extern void wlapi_intrson(struct phy_shim_info *physhim);
extern u32 wlapi_intrsoff(wlc_phy_shim_info_t *physhim); extern u32 wlapi_intrsoff(struct phy_shim_info *physhim);
extern void wlapi_intrsrestore(wlc_phy_shim_info_t *physhim, extern void wlapi_intrsrestore(struct phy_shim_info *physhim,
u32 macintmask); u32 macintmask);
extern void wlapi_bmac_write_shm(wlc_phy_shim_info_t *physhim, uint offset, extern void wlapi_bmac_write_shm(struct phy_shim_info *physhim, uint offset,
u16 v); u16 v);
extern u16 wlapi_bmac_read_shm(wlc_phy_shim_info_t *physhim, uint offset); extern u16 wlapi_bmac_read_shm(struct phy_shim_info *physhim, uint offset);
extern void wlapi_bmac_mhf(wlc_phy_shim_info_t *physhim, u8 idx, extern void wlapi_bmac_mhf(struct phy_shim_info *physhim, u8 idx,
u16 mask, u16 val, int bands); u16 mask, u16 val, int bands);
extern void wlapi_bmac_corereset(wlc_phy_shim_info_t *physhim, u32 flags); extern void wlapi_bmac_corereset(struct phy_shim_info *physhim, u32 flags);
extern void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim); extern void wlapi_suspend_mac_and_wait(struct phy_shim_info *physhim);
extern void wlapi_switch_macfreq(wlc_phy_shim_info_t *physhim, u8 spurmode); extern void wlapi_switch_macfreq(struct phy_shim_info *physhim, u8 spurmode);
extern void wlapi_enable_mac(wlc_phy_shim_info_t *physhim); extern void wlapi_enable_mac(struct phy_shim_info *physhim);
extern void wlapi_bmac_mctrl(wlc_phy_shim_info_t *physhim, u32 mask, extern void wlapi_bmac_mctrl(struct phy_shim_info *physhim, u32 mask,
u32 val); u32 val);
extern void wlapi_bmac_phy_reset(wlc_phy_shim_info_t *physhim); extern void wlapi_bmac_phy_reset(struct phy_shim_info *physhim);
extern void wlapi_bmac_bw_set(wlc_phy_shim_info_t *physhim, u16 bw); extern void wlapi_bmac_bw_set(struct phy_shim_info *physhim, u16 bw);
extern void wlapi_bmac_phyclk_fgc(wlc_phy_shim_info_t *physhim, bool clk); extern void wlapi_bmac_phyclk_fgc(struct phy_shim_info *physhim, bool clk);
extern void wlapi_bmac_macphyclk_set(wlc_phy_shim_info_t *physhim, bool clk); extern void wlapi_bmac_macphyclk_set(struct phy_shim_info *physhim, bool clk);
extern void wlapi_bmac_core_phypll_ctl(wlc_phy_shim_info_t *physhim, bool on); extern void wlapi_bmac_core_phypll_ctl(struct phy_shim_info *physhim, bool on);
extern void wlapi_bmac_core_phypll_reset(wlc_phy_shim_info_t *physhim); extern void wlapi_bmac_core_phypll_reset(struct phy_shim_info *physhim);
extern void wlapi_bmac_ucode_wake_override_phyreg_set(wlc_phy_shim_info_t * extern void wlapi_bmac_ucode_wake_override_phyreg_set(struct phy_shim_info *
physhim); physhim);
extern void wlapi_bmac_ucode_wake_override_phyreg_clear(wlc_phy_shim_info_t * extern void wlapi_bmac_ucode_wake_override_phyreg_clear(struct phy_shim_info *
physhim); physhim);
extern void wlapi_bmac_write_template_ram(wlc_phy_shim_info_t *physhim, int o, extern void wlapi_bmac_write_template_ram(struct phy_shim_info *physhim, int o,
int len, void *buf); int len, void *buf);
extern u16 wlapi_bmac_rate_shm_offset(wlc_phy_shim_info_t *physhim, extern u16 wlapi_bmac_rate_shm_offset(struct phy_shim_info *physhim,
u8 rate); u8 rate);
extern void wlapi_ucode_sample_init(wlc_phy_shim_info_t *physhim); extern void wlapi_ucode_sample_init(struct phy_shim_info *physhim);
extern void wlapi_copyfrom_objmem(wlc_phy_shim_info_t *physhim, uint, extern void wlapi_copyfrom_objmem(struct phy_shim_info *physhim, uint,
void *buf, int, u32 sel); void *buf, int, u32 sel);
extern void wlapi_copyto_objmem(wlc_phy_shim_info_t *physhim, uint, extern void wlapi_copyto_objmem(struct phy_shim_info *physhim, uint,
const void *buf, int, u32); const void *buf, int, u32);
extern void wlapi_high_update_phy_mode(wlc_phy_shim_info_t *physhim, extern void wlapi_high_update_phy_mode(struct phy_shim_info *physhim,
u32 phy_mode); u32 phy_mode);
extern u16 wlapi_bmac_get_txant(wlc_phy_shim_info_t *physhim); extern u16 wlapi_bmac_get_txant(struct phy_shim_info *physhim);
#endif /* _BRCM_PHY_SHIM_H_ */ #endif /* _BRCM_PHY_SHIM_H_ */
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
#define WL_SPURAVOID_ON1 1 #define WL_SPURAVOID_ON1 1
#define WL_SPURAVOID_ON2 2 #define WL_SPURAVOID_ON2 2
struct wlc_tunables { struct brcms_tunables {
int ntxd; /* size of tx descriptor table */ int ntxd; /* size of tx descriptor table */
int nrxd; /* size of rx descriptor table */ int nrxd; /* size of rx descriptor table */
int rxbufsz; /* size of rx buffers to post */ int rxbufsz; /* size of rx buffers to post */
...@@ -124,7 +124,7 @@ struct wlc_tunables { ...@@ -124,7 +124,7 @@ struct wlc_tunables {
int memreserved; /* memory reserved for BMAC's USB dma rx */ int memreserved; /* memory reserved for BMAC's USB dma rx */
}; };
struct wlc_rateset { struct brcms_rateset {
uint count; /* number of rates in rates[] */ uint count; /* number of rates in rates[] */
u8 rates[WLC_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */ u8 rates[WLC_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
u8 htphy_membership; /* HT PHY Membership */ u8 htphy_membership; /* HT PHY Membership */
...@@ -160,7 +160,7 @@ struct rsn_parms { ...@@ -160,7 +160,7 @@ struct rsn_parms {
IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40) IEEE80211_HT_CAP_MAX_AMSDU | IEEE80211_HT_CAP_DSSSCCK40)
/* wlc internal bss_info */ /* wlc internal bss_info */
struct wlc_bss_info { struct brcms_bss_info {
u8 BSSID[ETH_ALEN]; /* network BSSID */ u8 BSSID[ETH_ALEN]; /* network BSSID */
u16 flags; /* flags for internal attributes */ u16 flags; /* flags for internal attributes */
u8 SSID_len; /* the length of SSID */ u8 SSID_len; /* the length of SSID */
...@@ -242,12 +242,12 @@ typedef int (*iovar_fn_t) (void *handle, const struct brcmu_iovar *vi, ...@@ -242,12 +242,12 @@ typedef int (*iovar_fn_t) (void *handle, const struct brcmu_iovar *vi,
* Public portion of "common" os-independent state structure. * Public portion of "common" os-independent state structure.
* The wlc handle points at this. * The wlc handle points at this.
*/ */
struct wlc_pub { struct brcms_pub {
void *wlc; void *wlc;
struct ieee80211_hw *ieee_hw; struct ieee80211_hw *ieee_hw;
struct scb *global_scb; struct scb *global_scb;
scb_ampdu_t *global_ampdu; struct scb_ampdu *global_ampdu;
uint mac80211_state; uint mac80211_state;
uint unit; /* device instance number */ uint unit; /* device instance number */
uint corerev; /* core revision */ uint corerev; /* core revision */
...@@ -255,7 +255,8 @@ struct wlc_pub { ...@@ -255,7 +255,8 @@ struct wlc_pub {
char *vars; /* "environment" name=value */ char *vars; /* "environment" name=value */
bool up; /* interface up and running */ bool up; /* interface up and running */
bool hw_off; /* HW is off */ bool hw_off; /* HW is off */
wlc_tunables_t *tunables; /* tunables: ntxd, nrxd, maxscb, etc. */ /* tunables: ntxd, nrxd, maxscb, etc. */
struct brcms_tunables *tunables;
bool hw_up; /* one time hw up/down(from boot or hibernation) */ bool hw_up; /* one time hw up/down(from boot or hibernation) */
bool _piomode; /* true if pio mode *//* BMAC_NOTE: NEED In both */ bool _piomode; /* true if pio mode *//* BMAC_NOTE: NEED In both */
uint _nbands; /* # bands supported */ uint _nbands; /* # bands supported */
...@@ -570,7 +571,7 @@ extern const u8 wme_fifo2ac[]; ...@@ -570,7 +571,7 @@ extern const u8 wme_fifo2ac[];
#define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */ #define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */
struct wlc_antselcfg { struct brcms_antselcfg {
u8 ant_config[ANT_SELCFG_MAX]; /* antenna configuration */ u8 ant_config[ANT_SELCFG_MAX]; /* antenna configuration */
u8 num_antcfg; /* number of available antenna configurations */ u8 num_antcfg; /* number of available antenna configurations */
}; };
...@@ -615,7 +616,7 @@ extern void brcms_c_set_addrmatch(struct brcms_c_info *wlc, ...@@ -615,7 +616,7 @@ extern void brcms_c_set_addrmatch(struct brcms_c_info *wlc,
extern void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci, extern void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
const struct ieee80211_tx_queue_params *arg, const struct ieee80211_tx_queue_params *arg,
bool suspend); bool suspend);
extern struct wlc_pub *brcms_c_pub(void *wlc); extern struct brcms_pub *brcms_c_pub(void *wlc);
/* common functions for every port */ /* common functions for every port */
extern void brcms_c_mhf(struct brcms_c_info *wlc, u8 idx, u16 mask, u16 val, extern void brcms_c_mhf(struct brcms_c_info *wlc, u8 idx, u16 mask, u16 val,
...@@ -639,10 +640,10 @@ extern int getintvar(char *vars, const char *name); ...@@ -639,10 +640,10 @@ extern int getintvar(char *vars, const char *name);
extern void brcms_c_set_ps_ctrl(struct brcms_c_info *wlc); extern void brcms_c_set_ps_ctrl(struct brcms_c_info *wlc);
extern void brcms_c_mctrl(struct brcms_c_info *wlc, u32 mask, u32 val); extern void brcms_c_mctrl(struct brcms_c_info *wlc, u32 mask, u32 val);
extern int brcms_c_module_register(struct wlc_pub *pub, extern int brcms_c_module_register(struct brcms_pub *pub,
const char *name, void *hdl, const char *name, void *hdl,
watchdog_fn_t watchdog_fn, down_fn_t down_fn); watchdog_fn_t watchdog_fn, down_fn_t down_fn);
extern int brcms_c_module_unregister(struct wlc_pub *pub, const char *name, extern int brcms_c_module_unregister(struct brcms_pub *pub, const char *name,
void *hdl); void *hdl);
extern void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc); extern void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc);
extern void brcms_c_enable_mac(struct brcms_c_info *wlc); extern void brcms_c_enable_mac(struct brcms_c_info *wlc);
......
This diff is collapsed.
This diff is collapsed.
...@@ -47,7 +47,8 @@ struct scb_ampdu { ...@@ -47,7 +47,8 @@ struct scb_ampdu {
* of having mac80211 hold it for us. Also could be made dynamic per tid instead of * of having mac80211 hold it for us. Also could be made dynamic per tid instead of
* static. * static.
*/ */
scb_ampdu_tid_ini_t ini[AMPDU_MAX_SCB_TID]; /* initiator info - per tid (NUMPRIO) */ /* initiator info - per tid (NUMPRIO): */
struct scb_ampdu_tid_ini ini[AMPDU_MAX_SCB_TID];
}; };
#define SCB_MAGIC 0xbeefcafe #define SCB_MAGIC 0xbeefcafe
...@@ -68,7 +69,7 @@ struct scb { ...@@ -68,7 +69,7 @@ struct scb {
*/ */
u16 seqnum[NUMPRIO]; /* WME: driver maintained sw seqnum per priority */ u16 seqnum[NUMPRIO]; /* WME: driver maintained sw seqnum per priority */
scb_ampdu_t scb_ampdu; /* AMPDU state including per tid info */ struct scb_ampdu scb_ampdu; /* AMPDU state including per tid info */
}; };
/* scb flags */ /* scb flags */
......
This diff is collapsed.
This diff is collapsed.
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