staging: brcm80211: replaced wlc_ by brcms_c_
Code cleanup. Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Родитель
c654fce655
Коммит
fe741e5e4d
|
@ -20,8 +20,8 @@
|
|||
#include "main.h"
|
||||
#include "alloc.h"
|
||||
|
||||
static struct wlc_bsscfg *wlc_bsscfg_malloc(uint unit);
|
||||
static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg);
|
||||
static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit);
|
||||
static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg);
|
||||
static struct wlc_pub *wlc_pub_malloc(uint unit,
|
||||
uint *err, uint devid);
|
||||
static void wlc_pub_mfree(struct wlc_pub *pub);
|
||||
|
@ -87,11 +87,11 @@ static void wlc_pub_mfree(struct wlc_pub *pub)
|
|||
kfree(pub);
|
||||
}
|
||||
|
||||
static struct wlc_bsscfg *wlc_bsscfg_malloc(uint unit)
|
||||
static struct brcms_c_bsscfg *wlc_bsscfg_malloc(uint unit)
|
||||
{
|
||||
struct wlc_bsscfg *cfg;
|
||||
struct brcms_c_bsscfg *cfg;
|
||||
|
||||
cfg = kzalloc(sizeof(struct wlc_bsscfg), GFP_ATOMIC);
|
||||
cfg = kzalloc(sizeof(struct brcms_c_bsscfg), GFP_ATOMIC);
|
||||
if (cfg == NULL)
|
||||
goto fail;
|
||||
|
||||
|
@ -106,7 +106,7 @@ static struct wlc_bsscfg *wlc_bsscfg_malloc(uint unit)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg)
|
||||
static void wlc_bsscfg_mfree(struct brcms_c_bsscfg *cfg)
|
||||
{
|
||||
if (cfg == NULL)
|
||||
return;
|
||||
|
@ -116,8 +116,8 @@ static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg)
|
|||
kfree(cfg);
|
||||
}
|
||||
|
||||
static void wlc_bsscfg_ID_assign(struct wlc_info *wlc,
|
||||
struct wlc_bsscfg *bsscfg)
|
||||
static void wlc_bsscfg_ID_assign(struct brcms_c_info *wlc,
|
||||
struct brcms_c_bsscfg *bsscfg)
|
||||
{
|
||||
bsscfg->ID = wlc->next_bsscfg_ID;
|
||||
wlc->next_bsscfg_ID++;
|
||||
|
@ -126,17 +126,17 @@ static void wlc_bsscfg_ID_assign(struct wlc_info *wlc,
|
|||
/*
|
||||
* The common driver entry routine. Error codes should be unique
|
||||
*/
|
||||
struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
||||
struct brcms_c_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
||||
{
|
||||
struct wlc_info *wlc;
|
||||
struct brcms_c_info *wlc;
|
||||
|
||||
wlc = kzalloc(sizeof(struct wlc_info), GFP_ATOMIC);
|
||||
wlc = kzalloc(sizeof(struct brcms_c_info), GFP_ATOMIC);
|
||||
if (wlc == NULL) {
|
||||
*err = 1002;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* allocate struct wlc_pub state structure */
|
||||
/* allocate struct brcms_c_pub state structure */
|
||||
wlc->pub = wlc_pub_malloc(unit, err, devid);
|
||||
if (wlc->pub == NULL) {
|
||||
*err = 1003;
|
||||
|
@ -144,9 +144,9 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
|||
}
|
||||
wlc->pub->wlc = wlc;
|
||||
|
||||
/* allocate struct wlc_hw_info state structure */
|
||||
/* allocate struct brcms_c_hw_info state structure */
|
||||
|
||||
wlc->hw = kzalloc(sizeof(struct wlc_hw_info), GFP_ATOMIC);
|
||||
wlc->hw = kzalloc(sizeof(struct brcms_c_hw_info), GFP_ATOMIC);
|
||||
if (wlc->hw == NULL) {
|
||||
*err = 1005;
|
||||
goto fail;
|
||||
|
@ -154,7 +154,7 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
|||
wlc->hw->wlc = wlc;
|
||||
|
||||
wlc->hw->bandstate[0] =
|
||||
kzalloc(sizeof(struct wlc_hwband) * MAXBANDS, GFP_ATOMIC);
|
||||
kzalloc(sizeof(struct brcms_c_hwband) * MAXBANDS, GFP_ATOMIC);
|
||||
if (wlc->hw->bandstate[0] == NULL) {
|
||||
*err = 1006;
|
||||
goto fail;
|
||||
|
@ -162,9 +162,9 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
|||
int i;
|
||||
|
||||
for (i = 1; i < MAXBANDS; i++) {
|
||||
wlc->hw->bandstate[i] = (struct wlc_hwband *)
|
||||
wlc->hw->bandstate[i] = (struct brcms_c_hwband *)
|
||||
((unsigned long)wlc->hw->bandstate[0] +
|
||||
(sizeof(struct wlc_hwband) * i));
|
||||
(sizeof(struct brcms_c_hwband) * i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,20 +202,21 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
|||
}
|
||||
}
|
||||
|
||||
wlc->protection = kzalloc(sizeof(struct wlc_protection), GFP_ATOMIC);
|
||||
wlc->protection = kzalloc(sizeof(struct brcms_c_protection),
|
||||
GFP_ATOMIC);
|
||||
if (wlc->protection == NULL) {
|
||||
*err = 1016;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
wlc->stf = kzalloc(sizeof(struct wlc_stf), GFP_ATOMIC);
|
||||
wlc->stf = kzalloc(sizeof(struct brcms_c_stf), GFP_ATOMIC);
|
||||
if (wlc->stf == NULL) {
|
||||
*err = 1017;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
wlc->bandstate[0] =
|
||||
kzalloc(sizeof(struct wlcband)*MAXBANDS, GFP_ATOMIC);
|
||||
kzalloc(sizeof(struct brcms_c_band)*MAXBANDS, GFP_ATOMIC);
|
||||
if (wlc->bandstate[0] == NULL) {
|
||||
*err = 1025;
|
||||
goto fail;
|
||||
|
@ -223,13 +224,13 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
|||
int i;
|
||||
|
||||
for (i = 1; i < MAXBANDS; i++) {
|
||||
wlc->bandstate[i] =
|
||||
(struct wlcband *) ((unsigned long)wlc->bandstate[0]
|
||||
+ (sizeof(struct wlcband)*i));
|
||||
wlc->bandstate[i] = (struct brcms_c_band *)
|
||||
((unsigned long)wlc->bandstate[0]
|
||||
+ (sizeof(struct brcms_c_band)*i));
|
||||
}
|
||||
}
|
||||
|
||||
wlc->corestate = kzalloc(sizeof(struct wlccore), GFP_ATOMIC);
|
||||
wlc->corestate = kzalloc(sizeof(struct brcms_c_core), GFP_ATOMIC);
|
||||
if (wlc->corestate == NULL) {
|
||||
*err = 1026;
|
||||
goto fail;
|
||||
|
@ -249,7 +250,7 @@ struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void wlc_detach_mfree(struct wlc_info *wlc)
|
||||
void wlc_detach_mfree(struct brcms_c_info *wlc)
|
||||
{
|
||||
if (wlc == NULL)
|
||||
return;
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
extern struct wlc_info *wlc_attach_malloc(uint unit, uint *err, uint devid);
|
||||
extern void wlc_detach_mfree(struct wlc_info *wlc);
|
||||
extern struct brcms_c_info *wlc_attach_malloc(uint unit, uint *err, uint devid);
|
||||
extern void wlc_detach_mfree(struct brcms_c_info *wlc);
|
||||
|
|
|
@ -72,7 +72,7 @@ typedef struct wlc_fifo_info {
|
|||
|
||||
/* AMPDU module specific state */
|
||||
struct ampdu_info {
|
||||
struct wlc_info *wlc; /* pointer to main wlc structure */
|
||||
struct brcms_c_info *wlc; /* pointer to main wlc structure */
|
||||
int scb_handle; /* scb cubby handle to retrieve data from scb */
|
||||
u8 ini_enable[AMPDU_MAX_SCB_TID]; /* per-tid initiator enable/disable of ampdu */
|
||||
u8 ba_tx_wsize; /* Tx ba window size (in pdu) */
|
||||
|
@ -111,7 +111,7 @@ struct cb_del_ampdu_pars {
|
|||
#define SCB_AMPDU_INI(scb_ampdu, tid) (&(scb_ampdu->ini[tid]))
|
||||
|
||||
static void wlc_ffpld_init(struct ampdu_info *ampdu);
|
||||
static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int f);
|
||||
static int wlc_ffpld_check_txfunfl(struct brcms_c_info *wlc, int f);
|
||||
static void wlc_ffpld_calc_mcs2ampdu_table(struct ampdu_info *ampdu, int f);
|
||||
|
||||
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
|
||||
|
@ -130,7 +130,7 @@ static void wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu,
|
|||
static bool wlc_ampdu_cap(struct ampdu_info *ampdu);
|
||||
static int wlc_ampdu_set(struct ampdu_info *ampdu, bool on);
|
||||
|
||||
struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc)
|
||||
struct ampdu_info *wlc_ampdu_attach(struct brcms_c_info *wlc)
|
||||
{
|
||||
struct ampdu_info *ampdu;
|
||||
int i;
|
||||
|
@ -197,7 +197,7 @@ void wlc_ampdu_detach(struct ampdu_info *ampdu)
|
|||
kfree(ampdu->ini_free[i]);
|
||||
}
|
||||
|
||||
wlc_module_unregister(ampdu->wlc->pub, "ampdu", ampdu);
|
||||
brcms_c_module_unregister(ampdu->wlc->pub, "ampdu", ampdu);
|
||||
kfree(ampdu);
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ static void wlc_ffpld_init(struct ampdu_info *ampdu)
|
|||
* Return 1 if pre-loading not active, -1 if not an underflow event,
|
||||
* 0 if pre-loading module took care of the event.
|
||||
*/
|
||||
static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
|
||||
static int wlc_ffpld_check_txfunfl(struct brcms_c_info *wlc, int fid)
|
||||
{
|
||||
struct ampdu_info *ampdu = wlc->ampdu;
|
||||
u32 phy_rate = MCS_RATE(FFPLD_MAX_MCS, true, false);
|
||||
|
@ -273,7 +273,7 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
|
|||
|
||||
/* return if we got here for a different reason than underflows */
|
||||
cur_txunfl =
|
||||
wlc_read_shm(wlc,
|
||||
brcms_c_read_shm(wlc,
|
||||
M_UCODE_MACSTAT + offsetof(macstat_t, txfunfl[fid]));
|
||||
new_txunfl = (u16) (cur_txunfl - fifo->prev_txfunfl);
|
||||
if (new_txunfl == 0) {
|
||||
|
@ -286,9 +286,8 @@ static int wlc_ffpld_check_txfunfl(struct wlc_info *wlc, int fid)
|
|||
return 1;
|
||||
|
||||
/* check if fifo is big enough */
|
||||
if (wlc_xmtfifo_sz_get(wlc, fid, &xmtfifo_sz)) {
|
||||
if (brcms_c_xmtfifo_sz_get(wlc, fid, &xmtfifo_sz))
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((TXFIFO_SIZE_UNIT * (u32) xmtfifo_sz) <= ampdu->ffpld_rsvd)
|
||||
return 1;
|
||||
|
@ -428,10 +427,10 @@ wlc_ampdu_agg(struct ampdu_info *ampdu, struct scb *scb, struct sk_buff *p,
|
|||
}
|
||||
|
||||
int
|
||||
wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
|
||||
wlc_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
|
||||
struct sk_buff **pdu, int prec)
|
||||
{
|
||||
struct wlc_info *wlc;
|
||||
struct brcms_c_info *wlc;
|
||||
struct sk_buff *p, *pkt[AMPDU_MAX_MPDU];
|
||||
u8 tid, ndelim;
|
||||
int err = 0;
|
||||
|
@ -493,7 +492,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
|
|||
txrate = tx_info->status.rates;
|
||||
|
||||
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||
err = wlc_prep_pdu(wlc, p, &fifo);
|
||||
err = brcms_c_prep_pdu(wlc, p, &fifo);
|
||||
} else {
|
||||
wiphy_err(wiphy, "%s: AMPDU flag is off!\n", __func__);
|
||||
*pdu = NULL;
|
||||
|
@ -643,11 +642,11 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
|
|||
|
||||
if (use_rts || use_cts) {
|
||||
rts_rspec =
|
||||
wlc_rspec_to_rts_rspec(wlc, rspec, false,
|
||||
mimo_ctlchbw);
|
||||
brcms_c_rspec_to_rts_rspec(wlc,
|
||||
rspec, false, mimo_ctlchbw);
|
||||
rts_rspec_fallback =
|
||||
wlc_rspec_to_rts_rspec(wlc, rspec_fallback,
|
||||
false, mimo_ctlchbw);
|
||||
brcms_c_rspec_to_rts_rspec(wlc,
|
||||
rspec_fallback, false, mimo_ctlchbw);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -730,13 +729,14 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
|
|||
/* reset the mixed mode header durations */
|
||||
if (txh->MModeLen) {
|
||||
u16 mmodelen =
|
||||
wlc_calc_lsig_len(wlc, rspec, ampdu_len);
|
||||
brcms_c_calc_lsig_len(wlc, rspec, ampdu_len);
|
||||
txh->MModeLen = cpu_to_le16(mmodelen);
|
||||
preamble_type = WLC_MM_PREAMBLE;
|
||||
}
|
||||
if (txh->MModeFbrLen) {
|
||||
u16 mmfbrlen =
|
||||
wlc_calc_lsig_len(wlc, rspec_fallback, ampdu_len);
|
||||
brcms_c_calc_lsig_len(wlc, rspec_fallback,
|
||||
ampdu_len);
|
||||
txh->MModeFbrLen = cpu_to_le16(mmfbrlen);
|
||||
fbr_preamble_type = WLC_MM_PREAMBLE;
|
||||
}
|
||||
|
@ -763,12 +763,12 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
|
|||
rts_fbr_preamble_type = WLC_SHORT_PREAMBLE;
|
||||
|
||||
durid =
|
||||
wlc_compute_rtscts_dur(wlc, use_cts, rts_rspec,
|
||||
brcms_c_compute_rtscts_dur(wlc, use_cts, rts_rspec,
|
||||
rspec, rts_preamble_type,
|
||||
preamble_type, ampdu_len,
|
||||
true);
|
||||
rts->duration = cpu_to_le16(durid);
|
||||
durid = wlc_compute_rtscts_dur(wlc, use_cts,
|
||||
durid = brcms_c_compute_rtscts_dur(wlc, use_cts,
|
||||
rts_rspec_fallback,
|
||||
rspec_fallback,
|
||||
rts_fbr_preamble_type,
|
||||
|
@ -799,7 +799,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
|
|||
"TXFID_RATE_PROBE_MASK!?\n", __func__);
|
||||
}
|
||||
for (i = 0; i < count; i++)
|
||||
wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1),
|
||||
brcms_c_txfifo(wlc, fifo, pkt[i], i == (count - 1),
|
||||
ampdu->txpkt_weight);
|
||||
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
|
|||
struct sk_buff *p, tx_status_t *txs)
|
||||
{
|
||||
scb_ampdu_t *scb_ampdu;
|
||||
struct wlc_info *wlc = ampdu->wlc;
|
||||
struct brcms_c_info *wlc = ampdu->wlc;
|
||||
scb_ampdu_tid_ini_t *ini;
|
||||
u32 s1 = 0, s2 = 0;
|
||||
struct ieee80211_tx_info *tx_info;
|
||||
|
@ -858,13 +858,13 @@ wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
|
|||
break;
|
||||
p = GETNEXTTXP(wlc, queue);
|
||||
}
|
||||
wlc_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
|
||||
brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
|
||||
}
|
||||
wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini);
|
||||
}
|
||||
|
||||
static void
|
||||
rate_status(struct wlc_info *wlc, struct ieee80211_tx_info *tx_info,
|
||||
rate_status(struct brcms_c_info *wlc, struct ieee80211_tx_info *tx_info,
|
||||
tx_status_t *txs, u8 mcs)
|
||||
{
|
||||
struct ieee80211_tx_rate *txrate = tx_info->status.rates;
|
||||
|
@ -885,7 +885,7 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
|
|||
u32 s1, u32 s2)
|
||||
{
|
||||
scb_ampdu_t *scb_ampdu;
|
||||
struct wlc_info *wlc = ampdu->wlc;
|
||||
struct brcms_c_info *wlc = ampdu->wlc;
|
||||
scb_ampdu_tid_ini_t *ini;
|
||||
u8 bitmap[8], queue, tid;
|
||||
d11txh_t *txh;
|
||||
|
@ -981,9 +981,9 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
|
|||
|
||||
if (WL_ERROR_ON()) {
|
||||
brcmu_prpkt("txpkt (AMPDU)", p);
|
||||
wlc_print_txdesc((d11txh_t *) p->data);
|
||||
brcms_c_print_txdesc((d11txh_t *) p->data);
|
||||
}
|
||||
wlc_print_txstatus(txs);
|
||||
brcms_c_print_txstatus(txs);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1040,8 +1040,9 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
|
|||
ini->txretry[index]++;
|
||||
ini->tx_in_transit--;
|
||||
/* Use high prededence for retransmit to give some punch */
|
||||
/* wlc_txq_enq(wlc, scb, p, WLC_PRIO_TO_PREC(tid)); */
|
||||
wlc_txq_enq(wlc, scb, p,
|
||||
/* brcms_c_txq_enq(wlc, scb, p,
|
||||
* WLC_PRIO_TO_PREC(tid)); */
|
||||
brcms_c_txq_enq(wlc, scb, p,
|
||||
WLC_PRIO_TO_HI_PREC(tid));
|
||||
} else {
|
||||
/* Retry timeout */
|
||||
|
@ -1069,12 +1070,12 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
|
|||
|
||||
p = GETNEXTTXP(wlc, queue);
|
||||
}
|
||||
wlc_send_q(wlc);
|
||||
brcms_c_send_q(wlc);
|
||||
|
||||
/* update rate state */
|
||||
antselid = wlc_antsel_antsel2id(wlc->asi, mimoantsel);
|
||||
|
||||
wlc_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
|
||||
brcms_c_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
|
||||
}
|
||||
|
||||
/* initialize the initiator code for tid */
|
||||
|
@ -1100,7 +1101,7 @@ static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
|
|||
|
||||
static int wlc_ampdu_set(struct ampdu_info *ampdu, bool on)
|
||||
{
|
||||
struct wlc_info *wlc = ampdu->wlc;
|
||||
struct brcms_c_info *wlc = ampdu->wlc;
|
||||
|
||||
wlc->pub->_ampdu = false;
|
||||
|
||||
|
@ -1150,34 +1151,35 @@ static void ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur)
|
|||
}
|
||||
}
|
||||
|
||||
void wlc_ampdu_macaddr_upd(struct wlc_info *wlc)
|
||||
void wlc_ampdu_macaddr_upd(struct brcms_c_info *wlc)
|
||||
{
|
||||
char template[T_RAM_ACCESS_SZ * 2];
|
||||
|
||||
/* driver needs to write the ta in the template; ta is at offset 16 */
|
||||
memset(template, 0, sizeof(template));
|
||||
memcpy(template, wlc->pub->cur_etheraddr, ETH_ALEN);
|
||||
wlc_write_template_ram(wlc, (T_BA_TPL_BASE + 16), (T_RAM_ACCESS_SZ * 2),
|
||||
template);
|
||||
brcms_c_write_template_ram(wlc, (T_BA_TPL_BASE + 16),
|
||||
(T_RAM_ACCESS_SZ * 2),
|
||||
template);
|
||||
}
|
||||
|
||||
bool wlc_aggregatable(struct wlc_info *wlc, u8 tid)
|
||||
bool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid)
|
||||
{
|
||||
return wlc->ampdu->ini_enable[tid];
|
||||
}
|
||||
|
||||
void wlc_ampdu_shm_upd(struct ampdu_info *ampdu)
|
||||
{
|
||||
struct wlc_info *wlc = ampdu->wlc;
|
||||
struct brcms_c_info *wlc = ampdu->wlc;
|
||||
|
||||
/* Extend ucode internal watchdog timer to match larger received frames */
|
||||
if ((ampdu->rx_factor & IEEE80211_HT_AMPDU_PARM_FACTOR) ==
|
||||
IEEE80211_HT_MAX_AMPDU_64K) {
|
||||
wlc_write_shm(wlc, M_MIMO_MAXSYM, MIMO_MAXSYM_MAX);
|
||||
wlc_write_shm(wlc, M_WATCHDOG_8TU, WATCHDOG_8TU_MAX);
|
||||
brcms_c_write_shm(wlc, M_MIMO_MAXSYM, MIMO_MAXSYM_MAX);
|
||||
brcms_c_write_shm(wlc, M_WATCHDOG_8TU, WATCHDOG_8TU_MAX);
|
||||
} else {
|
||||
wlc_write_shm(wlc, M_MIMO_MAXSYM, MIMO_MAXSYM_DEF);
|
||||
wlc_write_shm(wlc, M_WATCHDOG_8TU, WATCHDOG_8TU_DEF);
|
||||
brcms_c_write_shm(wlc, M_MIMO_MAXSYM, MIMO_MAXSYM_DEF);
|
||||
brcms_c_write_shm(wlc, M_WATCHDOG_8TU, WATCHDOG_8TU_DEF);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1215,10 +1217,10 @@ static void dma_cb_fn_ampdu(void *txi, void *arg_a)
|
|||
* When a remote party is no longer available for ampdu communication, any
|
||||
* pending tx ampdu packets in the driver have to be flushed.
|
||||
*/
|
||||
void wlc_ampdu_flush(struct wlc_info *wlc,
|
||||
void wlc_ampdu_flush(struct brcms_c_info *wlc,
|
||||
struct ieee80211_sta *sta, u16 tid)
|
||||
{
|
||||
struct wlc_txq_info *qi = wlc->pkt_queue;
|
||||
struct brcms_c_txq_info *qi = wlc->pkt_queue;
|
||||
struct pktq *pq = &qi->q;
|
||||
int prec;
|
||||
struct cb_del_ampdu_pars ampdu_pars;
|
||||
|
@ -1229,5 +1231,5 @@ void wlc_ampdu_flush(struct wlc_info *wlc,
|
|||
brcmu_pktq_pflush(pq, prec, true, cb_del_ampdu_pkt,
|
||||
(void *)&du_pars);
|
||||
}
|
||||
wlc_inval_dma_pkts(wlc->hw, sta, dma_cb_fn_ampdu);
|
||||
brcms_c_inval_dma_pkts(wlc->hw, sta, dma_cb_fn_ampdu);
|
||||
}
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
#ifndef _BRCM_AMPDU_H_
|
||||
#define _BRCM_AMPDU_H_
|
||||
|
||||
extern struct ampdu_info *wlc_ampdu_attach(struct wlc_info *wlc);
|
||||
extern struct ampdu_info *wlc_ampdu_attach(struct brcms_c_info *wlc);
|
||||
extern void wlc_ampdu_detach(struct ampdu_info *ampdu);
|
||||
extern int wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
|
||||
extern int wlc_sendampdu(struct ampdu_info *ampdu, struct brcms_c_txq_info *qi,
|
||||
struct sk_buff **aggp, int prec);
|
||||
extern void wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
|
||||
struct sk_buff *p, tx_status_t *txs);
|
||||
extern void wlc_ampdu_macaddr_upd(struct wlc_info *wlc);
|
||||
extern void wlc_ampdu_macaddr_upd(struct brcms_c_info *wlc);
|
||||
extern void wlc_ampdu_shm_upd(struct ampdu_info *ampdu);
|
||||
|
||||
#endif /* _BRCM_AMPDU_H_ */
|
||||
|
|
|
@ -81,7 +81,7 @@ const u8 mimo_2x3_div_antselid_tbl[16] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0 /* pat to antselid */
|
||||
};
|
||||
|
||||
struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc)
|
||||
struct antsel_info *wlc_antsel_attach(struct brcms_c_info *wlc)
|
||||
{
|
||||
struct antsel_info *asi;
|
||||
|
||||
|
@ -282,7 +282,7 @@ static u16 wlc_antsel_antcfg2antsel(struct antsel_info *asi, u8 ant_cfg)
|
|||
/* boardlevel antenna selection: ucode interface control */
|
||||
static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel)
|
||||
{
|
||||
struct wlc_info *wlc = asi->wlc;
|
||||
struct brcms_c_info *wlc = asi->wlc;
|
||||
u8 ant_cfg;
|
||||
u16 mimo_antsel;
|
||||
|
||||
|
@ -291,7 +291,7 @@ static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel)
|
|||
*/
|
||||
ant_cfg = antsel->ant_config[ANT_SELCFG_TX_DEF];
|
||||
mimo_antsel = wlc_antsel_antcfg2antsel(asi, ant_cfg);
|
||||
wlc_write_shm(wlc, M_MIMO_ANTSEL_TXDFLT, mimo_antsel);
|
||||
brcms_c_write_shm(wlc, M_MIMO_ANTSEL_TXDFLT, mimo_antsel);
|
||||
/* Update driver stats for currently selected default tx/rx antenna config */
|
||||
asi->antcfg_cur.ant_config[ANT_SELCFG_TX_DEF] = ant_cfg;
|
||||
|
||||
|
@ -300,7 +300,7 @@ static int wlc_antsel_cfgupd(struct antsel_info *asi, wlc_antselcfg_t *antsel)
|
|||
*/
|
||||
ant_cfg = antsel->ant_config[ANT_SELCFG_RX_DEF];
|
||||
mimo_antsel = wlc_antsel_antcfg2antsel(asi, ant_cfg);
|
||||
wlc_write_shm(wlc, M_MIMO_ANTSEL_RXDFLT, mimo_antsel);
|
||||
brcms_c_write_shm(wlc, M_MIMO_ANTSEL_RXDFLT, mimo_antsel);
|
||||
/* Update driver stats for currently selected default tx/rx antenna config */
|
||||
asi->antcfg_cur.ant_config[ANT_SELCFG_RX_DEF] = ant_cfg;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef _BRCM_ANTSEL_H_
|
||||
#define _BRCM_ANTSEL_H_
|
||||
|
||||
extern struct antsel_info *wlc_antsel_attach(struct wlc_info *wlc);
|
||||
extern struct antsel_info *wlc_antsel_attach(struct brcms_c_info *wlc);
|
||||
extern void wlc_antsel_detach(struct antsel_info *asi);
|
||||
extern void wlc_antsel_init(struct antsel_info *asi);
|
||||
extern void wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef,
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -19,7 +19,7 @@
|
|||
#include <brcmu_wifi.h>
|
||||
#include "types.h"
|
||||
|
||||
/* dup state between BMAC(struct wlc_hw_info) and HIGH(struct wlc_info)
|
||||
/* dup state between BMAC(struct brcms_c_hw_info) and HIGH(struct brcms_c_info)
|
||||
driver */
|
||||
struct brcms_b_state {
|
||||
u32 machwcap; /* mac hw capibility */
|
||||
|
@ -71,100 +71,104 @@ enum {
|
|||
IOV_BMAC_LAST
|
||||
};
|
||||
|
||||
extern int brcms_b_attach(struct wlc_info *wlc, u16 vendor, u16 device,
|
||||
extern int brcms_b_attach(struct brcms_c_info *wlc, u16 vendor, u16 device,
|
||||
uint unit, bool piomode, void *regsva, uint bustype,
|
||||
void *btparam);
|
||||
extern int brcms_b_detach(struct wlc_info *wlc);
|
||||
extern int brcms_b_detach(struct brcms_c_info *wlc);
|
||||
extern void brcms_b_watchdog(void *arg);
|
||||
|
||||
/* up/down, reset, clk */
|
||||
extern void brcms_b_copyto_objmem(struct wlc_hw_info *wlc_hw,
|
||||
extern void brcms_b_copyto_objmem(struct brcms_c_hw_info *wlc_hw,
|
||||
uint offset, const void *buf, int len,
|
||||
u32 sel);
|
||||
extern void brcms_b_copyfrom_objmem(struct wlc_hw_info *wlc_hw, uint offset,
|
||||
extern void brcms_b_copyfrom_objmem(struct brcms_c_hw_info *wlc_hw, uint offset,
|
||||
void *buf, int len, u32 sel);
|
||||
#define brcms_b_copyfrom_shm(wlc_hw, offset, buf, len) \
|
||||
brcms_b_copyfrom_objmem(wlc_hw, offset, buf, len, OBJADDR_SHM_SEL)
|
||||
#define brcms_b_copyto_shm(wlc_hw, offset, buf, len) \
|
||||
brcms_b_copyto_objmem(wlc_hw, offset, buf, len, OBJADDR_SHM_SEL)
|
||||
|
||||
extern void brcms_b_core_phypll_reset(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_core_phypll_ctl(struct wlc_hw_info *wlc_hw, bool on);
|
||||
extern void brcms_b_phyclk_fgc(struct wlc_hw_info *wlc_hw, bool clk);
|
||||
extern void brcms_b_macphyclk_set(struct wlc_hw_info *wlc_hw, bool clk);
|
||||
extern void brcms_b_phy_reset(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_corereset(struct wlc_hw_info *wlc_hw, u32 flags);
|
||||
extern void brcms_b_reset(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_init(struct wlc_hw_info *wlc_hw, chanspec_t chanspec,
|
||||
extern void brcms_b_core_phypll_reset(struct brcms_c_hw_info *wlc_hw);
|
||||
extern void brcms_b_core_phypll_ctl(struct brcms_c_hw_info *wlc_hw, bool on);
|
||||
extern void brcms_b_phyclk_fgc(struct brcms_c_hw_info *wlc_hw, bool clk);
|
||||
extern void brcms_b_macphyclk_set(struct brcms_c_hw_info *wlc_hw, bool clk);
|
||||
extern void brcms_b_phy_reset(struct brcms_c_hw_info *wlc_hw);
|
||||
extern void brcms_b_corereset(struct brcms_c_hw_info *wlc_hw, u32 flags);
|
||||
extern void brcms_b_reset(struct brcms_c_hw_info *wlc_hw);
|
||||
extern void brcms_b_init(struct brcms_c_hw_info *wlc_hw, chanspec_t chanspec,
|
||||
bool mute);
|
||||
extern int brcms_b_up_prep(struct wlc_hw_info *wlc_hw);
|
||||
extern int brcms_b_up_finish(struct wlc_hw_info *wlc_hw);
|
||||
extern int brcms_b_bmac_down_prep(struct wlc_hw_info *wlc_hw);
|
||||
extern int brcms_b_down_finish(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_switch_macfreq(struct wlc_hw_info *wlc_hw, u8 spurmode);
|
||||
extern int brcms_b_up_prep(struct brcms_c_hw_info *wlc_hw);
|
||||
extern int brcms_b_up_finish(struct brcms_c_hw_info *wlc_hw);
|
||||
extern int brcms_b_bmac_down_prep(struct brcms_c_hw_info *wlc_hw);
|
||||
extern int brcms_b_down_finish(struct brcms_c_hw_info *wlc_hw);
|
||||
extern void brcms_b_switch_macfreq(struct brcms_c_hw_info *wlc_hw, u8 spurmode);
|
||||
|
||||
/* chanspec, ucode interface */
|
||||
extern void brcms_b_set_chanspec(struct wlc_hw_info *wlc_hw,
|
||||
extern void brcms_b_set_chanspec(struct brcms_c_hw_info *wlc_hw,
|
||||
chanspec_t chanspec,
|
||||
bool mute, struct txpwr_limits *txpwr);
|
||||
|
||||
extern int brcms_b_xmtfifo_sz_get(struct wlc_hw_info *wlc_hw, uint fifo,
|
||||
extern int brcms_b_xmtfifo_sz_get(struct brcms_c_hw_info *wlc_hw, uint fifo,
|
||||
uint *blocks);
|
||||
extern void brcms_b_mhf(struct wlc_hw_info *wlc_hw, u8 idx, u16 mask,
|
||||
extern void brcms_b_mhf(struct brcms_c_hw_info *wlc_hw, u8 idx, u16 mask,
|
||||
u16 val, int bands);
|
||||
extern void brcms_b_mctrl(struct wlc_hw_info *wlc_hw, u32 mask, u32 val);
|
||||
extern u16 brcms_b_mhf_get(struct wlc_hw_info *wlc_hw, u8 idx, int bands);
|
||||
extern void brcms_b_txant_set(struct wlc_hw_info *wlc_hw, u16 phytxant);
|
||||
extern u16 brcms_b_get_txant(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_antsel_type_set(struct wlc_hw_info *wlc_hw,
|
||||
extern void brcms_b_mctrl(struct brcms_c_hw_info *wlc_hw, u32 mask, u32 val);
|
||||
extern u16 brcms_b_mhf_get(struct brcms_c_hw_info *wlc_hw, u8 idx, int bands);
|
||||
extern void brcms_b_txant_set(struct brcms_c_hw_info *wlc_hw, u16 phytxant);
|
||||
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,
|
||||
u8 antsel_type);
|
||||
extern int brcms_b_state_get(struct wlc_hw_info *wlc_hw,
|
||||
extern int brcms_b_state_get(struct brcms_c_hw_info *wlc_hw,
|
||||
brcms_b_state_t *state);
|
||||
extern void brcms_b_write_shm(struct wlc_hw_info *wlc_hw, uint offset, u16 v);
|
||||
extern u16 brcms_b_read_shm(struct wlc_hw_info *wlc_hw, uint offset);
|
||||
extern void brcms_b_write_template_ram(struct wlc_hw_info *wlc_hw, int offset,
|
||||
int len, void *buf);
|
||||
extern void brcms_b_copyfrom_vars(struct wlc_hw_info *wlc_hw, char **buf,
|
||||
extern void brcms_b_write_shm(struct brcms_c_hw_info *wlc_hw, uint offset,
|
||||
u16 v);
|
||||
extern u16 brcms_b_read_shm(struct brcms_c_hw_info *wlc_hw, uint offset);
|
||||
extern void brcms_b_write_template_ram(struct brcms_c_hw_info *wlc_hw,
|
||||
int offset, int len, void *buf);
|
||||
extern void brcms_b_copyfrom_vars(struct brcms_c_hw_info *wlc_hw, char **buf,
|
||||
uint *len);
|
||||
|
||||
extern void brcms_b_hw_etheraddr(struct wlc_hw_info *wlc_hw,
|
||||
extern void brcms_b_hw_etheraddr(struct brcms_c_hw_info *wlc_hw,
|
||||
u8 *ea);
|
||||
|
||||
extern bool brcms_b_radio_read_hwdisabled(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_set_shortslot(struct wlc_hw_info *wlc_hw, bool shortslot);
|
||||
extern void brcms_b_band_stf_ss_set(struct wlc_hw_info *wlc_hw, u8 stf_mode);
|
||||
extern bool brcms_b_radio_read_hwdisabled(struct brcms_c_hw_info *wlc_hw);
|
||||
extern void brcms_b_set_shortslot(struct brcms_c_hw_info *wlc_hw,
|
||||
bool shortslot);
|
||||
extern void brcms_b_band_stf_ss_set(struct brcms_c_hw_info *wlc_hw,
|
||||
u8 stf_mode);
|
||||
|
||||
extern void brcms_b_wait_for_wake(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_wait_for_wake(struct brcms_c_hw_info *wlc_hw);
|
||||
|
||||
extern void wlc_ucode_wake_override_set(struct wlc_hw_info *wlc_hw,
|
||||
extern void wlc_ucode_wake_override_set(struct brcms_c_hw_info *wlc_hw,
|
||||
u32 override_bit);
|
||||
extern void wlc_ucode_wake_override_clear(struct wlc_hw_info *wlc_hw,
|
||||
extern void wlc_ucode_wake_override_clear(struct brcms_c_hw_info *wlc_hw,
|
||||
u32 override_bit);
|
||||
|
||||
extern void brcms_b_set_addrmatch(struct wlc_hw_info *wlc_hw,
|
||||
extern void brcms_b_set_addrmatch(struct brcms_c_hw_info *wlc_hw,
|
||||
int match_reg_offset,
|
||||
const u8 *addr);
|
||||
extern void brcms_b_write_hw_bcntemplates(struct wlc_hw_info *wlc_hw,
|
||||
extern void brcms_b_write_hw_bcntemplates(struct brcms_c_hw_info *wlc_hw,
|
||||
void *bcn, int len, bool both);
|
||||
|
||||
extern void brcms_b_read_tsf(struct wlc_hw_info *wlc_hw, u32 *tsf_l_ptr,
|
||||
extern void brcms_b_read_tsf(struct brcms_c_hw_info *wlc_hw, u32 *tsf_l_ptr,
|
||||
u32 *tsf_h_ptr);
|
||||
extern void brcms_b_set_cwmin(struct wlc_hw_info *wlc_hw, u16 newmin);
|
||||
extern void brcms_b_set_cwmax(struct wlc_hw_info *wlc_hw, u16 newmax);
|
||||
extern void brcms_b_set_cwmin(struct brcms_c_hw_info *wlc_hw, u16 newmin);
|
||||
extern void brcms_b_set_cwmax(struct brcms_c_hw_info *wlc_hw, u16 newmax);
|
||||
|
||||
extern void brcms_b_retrylimit_upd(struct wlc_hw_info *wlc_hw, u16 SRL,
|
||||
extern void brcms_b_retrylimit_upd(struct brcms_c_hw_info *wlc_hw, u16 SRL,
|
||||
u16 LRL);
|
||||
|
||||
extern void brcms_b_fifoerrors(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_b_fifoerrors(struct brcms_c_hw_info *wlc_hw);
|
||||
|
||||
|
||||
/* API for BMAC driver (e.g. wlc_phy.c etc) */
|
||||
|
||||
extern void brcms_b_bw_set(struct wlc_hw_info *wlc_hw, u16 bw);
|
||||
extern void brcms_b_pllreq(struct wlc_hw_info *wlc_hw, bool set,
|
||||
extern void brcms_b_bw_set(struct brcms_c_hw_info *wlc_hw, u16 bw);
|
||||
extern void brcms_b_pllreq(struct brcms_c_hw_info *wlc_hw, bool set,
|
||||
mbool req_bit);
|
||||
extern void brcms_b_hw_up(struct wlc_hw_info *wlc_hw);
|
||||
extern u16 brcms_b_rate_shm_offset(struct wlc_hw_info *wlc_hw, u8 rate);
|
||||
extern void brcms_b_antsel_set(struct wlc_hw_info *wlc_hw, u32 antsel_avail);
|
||||
extern void brcms_b_hw_up(struct brcms_c_hw_info *wlc_hw);
|
||||
extern u16 brcms_b_rate_shm_offset(struct brcms_c_hw_info *wlc_hw, u8 rate);
|
||||
extern void brcms_b_antsel_set(struct brcms_c_hw_info *wlc_hw,
|
||||
u32 antsel_avail);
|
||||
|
||||
#endif /* _BRCM_BOTTOM_MAC_H_ */
|
||||
|
|
|
@ -40,7 +40,7 @@ typedef struct wlc_cm_band {
|
|||
|
||||
struct wlc_cm_info {
|
||||
struct wlc_pub *pub;
|
||||
struct wlc_info *wlc;
|
||||
struct brcms_c_info *wlc;
|
||||
char srom_ccode[WLC_CNTRY_BUF_SZ]; /* Country Code in SROM */
|
||||
uint srom_regrev; /* Regulatory Rev for the SROM ccode */
|
||||
const country_info_t *country; /* current country def */
|
||||
|
@ -77,13 +77,13 @@ static bool wlc_valid_channel20_db(wlc_cm_info_t *wlc_cm, uint val);
|
|||
static bool wlc_valid_channel20_in_band(wlc_cm_info_t *wlc_cm, uint bandunit,
|
||||
uint val);
|
||||
static bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val);
|
||||
static const country_info_t *wlc_country_lookup(struct wlc_info *wlc,
|
||||
static const country_info_t *wlc_country_lookup(struct brcms_c_info *wlc,
|
||||
const char *ccode);
|
||||
static void wlc_locale_get_channels(const locale_info_t *locale,
|
||||
chanvec_t *valid_channels);
|
||||
static const locale_info_t *wlc_get_locale_2g(u8 locale_idx);
|
||||
static const locale_info_t *wlc_get_locale_5g(u8 locale_idx);
|
||||
static bool wlc_japan(struct wlc_info *wlc);
|
||||
static bool wlc_japan(struct brcms_c_info *wlc);
|
||||
static bool wlc_japan_ccode(const char *ccode);
|
||||
static void wlc_channel_min_txpower_limits_with_local_constraint(wlc_cm_info_t *
|
||||
wlc_cm,
|
||||
|
@ -611,7 +611,7 @@ static const locale_mimo_info_t *wlc_get_mimo_5g(u8 locale_idx)
|
|||
return g_mimo_5g_table[locale_idx];
|
||||
}
|
||||
|
||||
wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc)
|
||||
wlc_cm_info_t *wlc_channel_mgr_attach(struct brcms_c_info *wlc)
|
||||
{
|
||||
wlc_cm_info_t *wlc_cm;
|
||||
char country_abbrev[WLC_CNTRY_BUF_SZ];
|
||||
|
@ -718,7 +718,7 @@ wlc_set_country_common(wlc_cm_info_t *wlc_cm,
|
|||
{
|
||||
const locale_mimo_info_t *li_mimo;
|
||||
const locale_info_t *locale;
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
char prev_country_abbrev[WLC_CNTRY_BUF_SZ];
|
||||
|
||||
/* save current country state */
|
||||
|
@ -735,12 +735,12 @@ wlc_set_country_common(wlc_cm_info_t *wlc_cm,
|
|||
/* disable/restore nmode based on country regulations */
|
||||
li_mimo = wlc_get_mimo_2g(country->locale_mimo_2G);
|
||||
if (li_mimo && (li_mimo->flags & WLC_NO_MIMO)) {
|
||||
wlc_set_nmode(wlc, OFF);
|
||||
brcms_c_set_nmode(wlc, OFF);
|
||||
wlc->stf->no_cddstbc = true;
|
||||
} else {
|
||||
wlc->stf->no_cddstbc = false;
|
||||
if (N_ENAB(wlc->pub) != wlc->protection->nmode_user)
|
||||
wlc_set_nmode(wlc, wlc->protection->nmode_user);
|
||||
brcms_c_set_nmode(wlc, wlc->protection->nmode_user);
|
||||
}
|
||||
|
||||
wlc_stf_ss_update(wlc, wlc->bandstate[BAND_2G_INDEX]);
|
||||
|
@ -748,9 +748,9 @@ wlc_set_country_common(wlc_cm_info_t *wlc_cm,
|
|||
/* set or restore gmode as required by regulatory */
|
||||
locale = wlc_get_locale_2g(country->locale_2G);
|
||||
if (locale && (locale->flags & WLC_NO_OFDM)) {
|
||||
wlc_set_gmode(wlc, GMODE_LEGACY_B, false);
|
||||
brcms_c_set_gmode(wlc, GMODE_LEGACY_B, false);
|
||||
} else {
|
||||
wlc_set_gmode(wlc, wlc->protection->gmode_user, false);
|
||||
brcms_c_set_gmode(wlc, wlc->protection->gmode_user, false);
|
||||
}
|
||||
|
||||
wlc_channels_init(wlc_cm, country);
|
||||
|
@ -761,7 +761,7 @@ wlc_set_country_common(wlc_cm_info_t *wlc_cm,
|
|||
/* Lookup a country info structure from a null terminated country code
|
||||
* The lookup is case sensitive.
|
||||
*/
|
||||
static const country_info_t *wlc_country_lookup(struct wlc_info *wlc,
|
||||
static const country_info_t *wlc_country_lookup(struct brcms_c_info *wlc,
|
||||
const char *ccode)
|
||||
{
|
||||
const country_info_t *country;
|
||||
|
@ -780,7 +780,7 @@ static const country_info_t *wlc_countrycode_map(wlc_cm_info_t *wlc_cm,
|
|||
char *mapped_ccode,
|
||||
uint *mapped_regrev)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
const country_info_t *country;
|
||||
uint srom_regrev = wlc_cm->srom_regrev;
|
||||
const char *srom_ccode = wlc_cm->srom_ccode;
|
||||
|
@ -859,9 +859,9 @@ static const country_info_t *wlc_country_lookup_direct(const char *ccode,
|
|||
static int
|
||||
wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
uint i, j;
|
||||
struct wlcband *band;
|
||||
struct brcms_c_band *band;
|
||||
const locale_info_t *li;
|
||||
chanvec_t sup_chan;
|
||||
const locale_mimo_info_t *li_mimo;
|
||||
|
@ -911,7 +911,7 @@ wlc_channels_init(wlc_cm_info_t *wlc_cm, const country_info_t *country)
|
|||
*/
|
||||
static void wlc_channels_commit(wlc_cm_info_t *wlc_cm)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
uint chan;
|
||||
struct txpwr_limits txpwr;
|
||||
|
||||
|
@ -960,9 +960,9 @@ static void wlc_channels_commit(wlc_cm_info_t *wlc_cm)
|
|||
/* reset the quiet channels vector to the union of the restricted and radar channel sets */
|
||||
static void wlc_quiet_channels_reset(wlc_cm_info_t *wlc_cm)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
uint i, j;
|
||||
struct wlcband *band;
|
||||
struct brcms_c_band *band;
|
||||
const chanvec_t *chanvec;
|
||||
|
||||
memset(&wlc_cm->quiet_channels, 0, sizeof(chanvec_t));
|
||||
|
@ -998,7 +998,7 @@ static bool wlc_quiet_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chspec)
|
|||
*/
|
||||
static bool wlc_valid_channel20_db(wlc_cm_info_t *wlc_cm, uint val)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
|
||||
return VALID_CHANNEL20(wlc, val) ||
|
||||
(!wlc->bandlocked
|
||||
|
@ -1016,7 +1016,7 @@ wlc_valid_channel20_in_band(wlc_cm_info_t *wlc_cm, uint bandunit, uint val)
|
|||
/* Is the channel valid for the current locale and current band? */
|
||||
static bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
|
||||
return ((val < MAXCHANNEL) &&
|
||||
isset(wlc_cm->bandstate[wlc->band->bandunit].valid_channels.vec,
|
||||
|
@ -1114,7 +1114,7 @@ void
|
|||
wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
|
||||
u8 local_constraint_qdbm)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
struct txpwr_limits txpwr;
|
||||
|
||||
wlc_channel_reg_limits(wlc_cm, chanspec, &txpwr);
|
||||
|
@ -1248,13 +1248,13 @@ void
|
|||
wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
|
||||
txpwr_limits_t *txpwr)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
uint i;
|
||||
uint chan;
|
||||
int maxpwr;
|
||||
int delta;
|
||||
const country_info_t *country;
|
||||
struct wlcband *band;
|
||||
struct brcms_c_band *band;
|
||||
const locale_info_t *li;
|
||||
int conducted_max;
|
||||
int conducted_ofdm_max;
|
||||
|
@ -1458,7 +1458,7 @@ wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec,
|
|||
}
|
||||
|
||||
/* Returns true if currently set country is Japan or variant */
|
||||
static bool wlc_japan(struct wlc_info *wlc)
|
||||
static bool wlc_japan(struct brcms_c_info *wlc)
|
||||
{
|
||||
return wlc_japan_ccode(wlc->cmi->country_abbrev);
|
||||
}
|
||||
|
@ -1477,7 +1477,7 @@ static bool wlc_japan_ccode(const char *ccode)
|
|||
static bool
|
||||
wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband)
|
||||
{
|
||||
struct wlc_info *wlc = wlc_cm->wlc;
|
||||
struct brcms_c_info *wlc = wlc_cm->wlc;
|
||||
u8 channel = CHSPEC_CHANNEL(chspec);
|
||||
|
||||
/* check the chanspec */
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#define WLC_TXPWR_DB_FACTOR 4 /* conversion for phy txpwr cacluations that use .25 dB units */
|
||||
|
||||
|
||||
struct wlc_info;
|
||||
struct brcms_c_info;
|
||||
|
||||
/* maxpwr mapping to 5GHz band channels:
|
||||
* maxpwr[0] - channels [34-48]
|
||||
|
@ -105,7 +105,7 @@ struct country_info {
|
|||
const u8 locale_mimo_5G; /* 5G mimo info */
|
||||
};
|
||||
|
||||
extern wlc_cm_info_t *wlc_channel_mgr_attach(struct wlc_info *wlc);
|
||||
extern wlc_cm_info_t *wlc_channel_mgr_attach(struct brcms_c_info *wlc);
|
||||
extern void wlc_channel_mgr_detach(wlc_cm_info_t *wlc_cm);
|
||||
|
||||
extern u8 wlc_channel_locale_flags_in_band(wlc_cm_info_t *wlc_cm,
|
||||
|
|
|
@ -165,7 +165,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
|
|||
kfree_skb(skb);
|
||||
goto done;
|
||||
}
|
||||
wlc_sendpkt_mac80211(wl->wlc, skb, hw);
|
||||
brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
|
||||
done:
|
||||
UNLOCK(wl);
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ ieee_set_channel(struct ieee80211_hw *hw, struct ieee80211_channel *chan,
|
|||
switch (type) {
|
||||
case NL80211_CHAN_HT20:
|
||||
case NL80211_CHAN_NO_HT:
|
||||
err = wlc_set(wl->wlc, WLC_SET_CHANNEL, chan->hw_value);
|
||||
err = brcms_c_set(wl->wlc, WLC_SET_CHANNEL, chan->hw_value);
|
||||
break;
|
||||
case NL80211_CHAN_HT40MINUS:
|
||||
case NL80211_CHAN_HT40PLUS:
|
||||
|
@ -273,14 +273,14 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
|
|||
|
||||
LOCK(wl);
|
||||
if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) {
|
||||
if (wlc_set_par(wl->wlc, IOV_BCN_LI_BCN, conf->listen_interval)
|
||||
< 0) {
|
||||
if (brcms_c_set_par(wl->wlc, IOV_BCN_LI_BCN,
|
||||
conf->listen_interval) < 0) {
|
||||
wiphy_err(wiphy, "%s: Error setting listen_interval\n",
|
||||
__func__);
|
||||
err = -EIO;
|
||||
goto config_out;
|
||||
}
|
||||
wlc_get_par(wl->wlc, IOV_BCN_LI_BCN, &new_int);
|
||||
brcms_c_get_par(wl->wlc, IOV_BCN_LI_BCN, &new_int);
|
||||
}
|
||||
if (changed & IEEE80211_CONF_CHANGE_MONITOR)
|
||||
wiphy_err(wiphy, "%s: change monitor mode: %s (implement)\n",
|
||||
|
@ -292,14 +292,14 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
|
|||
"true" : "false");
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_POWER) {
|
||||
if (wlc_set_par(wl->wlc, IOV_QTXPOWER, conf->power_level * 4)
|
||||
< 0) {
|
||||
if (brcms_c_set_par(wl->wlc, IOV_QTXPOWER,
|
||||
conf->power_level * 4) < 0) {
|
||||
wiphy_err(wiphy, "%s: Error setting power_level\n",
|
||||
__func__);
|
||||
err = -EIO;
|
||||
goto config_out;
|
||||
}
|
||||
wlc_get_par(wl->wlc, IOV_QTXPOWER, &new_int);
|
||||
brcms_c_get_par(wl->wlc, IOV_QTXPOWER, &new_int);
|
||||
if (new_int != (conf->power_level * 4))
|
||||
wiphy_err(wiphy, "%s: Power level req != actual, %d %d"
|
||||
"\n", __func__, conf->power_level * 4,
|
||||
|
@ -309,15 +309,15 @@ static int brcms_ops_config(struct ieee80211_hw *hw, u32 changed)
|
|||
err = ieee_set_channel(hw, conf->channel, conf->channel_type);
|
||||
}
|
||||
if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
|
||||
if (wlc_set
|
||||
if (brcms_c_set
|
||||
(wl->wlc, WLC_SET_SRL,
|
||||
conf->short_frame_max_tx_count) < 0) {
|
||||
wiphy_err(wiphy, "%s: Error setting srl\n", __func__);
|
||||
err = -EIO;
|
||||
goto config_out;
|
||||
}
|
||||
if (wlc_set(wl->wlc, WLC_SET_LRL, conf->long_frame_max_tx_count)
|
||||
< 0) {
|
||||
if (brcms_c_set(wl->wlc, WLC_SET_LRL,
|
||||
conf->long_frame_max_tx_count) < 0) {
|
||||
wiphy_err(wiphy, "%s: Error setting lrl\n", __func__);
|
||||
err = -EIO;
|
||||
goto config_out;
|
||||
|
@ -345,7 +345,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|||
wiphy_err(wiphy, "%s: %s: %sassociated\n", KBUILD_MODNAME,
|
||||
__func__, info->assoc ? "" : "dis");
|
||||
LOCK(wl);
|
||||
wlc_associate_upd(wl->wlc, info->assoc);
|
||||
brcms_c_associate_upd(wl->wlc, info->assoc);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
if (changed & BSS_CHANGED_ERP_SLOT) {
|
||||
|
@ -355,7 +355,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|||
else
|
||||
val = 0;
|
||||
LOCK(wl);
|
||||
wlc_set(wl->wlc, WLC_SET_SHORTSLOT_OVERRIDE, val);
|
||||
brcms_c_set(wl->wlc, WLC_SET_SHORTSLOT_OVERRIDE, val);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
|
||||
|
@ -364,11 +364,11 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|||
u16 mode = info->ht_operation_mode;
|
||||
|
||||
LOCK(wl);
|
||||
wlc_protection_upd(wl->wlc, WLC_PROT_N_CFG,
|
||||
brcms_c_protection_upd(wl->wlc, WLC_PROT_N_CFG,
|
||||
mode & IEEE80211_HT_OP_MODE_PROTECTION);
|
||||
wlc_protection_upd(wl->wlc, WLC_PROT_N_NONGF,
|
||||
brcms_c_protection_upd(wl->wlc, WLC_PROT_N_NONGF,
|
||||
mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT);
|
||||
wlc_protection_upd(wl->wlc, WLC_PROT_N_OBSS,
|
||||
brcms_c_protection_upd(wl->wlc, WLC_PROT_N_OBSS,
|
||||
mode & IEEE80211_HT_OP_MODE_NON_HT_STA_PRSNT);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|||
|
||||
/* retrieve the current rates */
|
||||
LOCK(wl);
|
||||
error = wlc_ioctl(wl->wlc, WLC_GET_CURR_RATESET,
|
||||
error = brcms_c_ioctl(wl->wlc, WLC_GET_CURR_RATESET,
|
||||
&rs, sizeof(rs), NULL);
|
||||
UNLOCK(wl);
|
||||
if (error) {
|
||||
|
@ -390,7 +390,7 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|||
return;
|
||||
}
|
||||
br_mask = info->basic_rates;
|
||||
bi = hw->wiphy->bands[wlc_get_curband(wl->wlc)];
|
||||
bi = hw->wiphy->bands[brcms_c_get_curband(wl->wlc)];
|
||||
for (i = 0; i < bi->n_bitrates; i++) {
|
||||
/* convert to internal rate value */
|
||||
rate = (bi->bitrates[i].bitrate << 1) / 10;
|
||||
|
@ -402,19 +402,19 @@ brcms_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|||
|
||||
/* update the rate set */
|
||||
LOCK(wl);
|
||||
wlc_ioctl(wl->wlc, WLC_SET_RATESET, &rs, sizeof(rs), NULL);
|
||||
brcms_c_ioctl(wl->wlc, WLC_SET_RATESET, &rs, sizeof(rs), NULL);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
if (changed & BSS_CHANGED_BEACON_INT) {
|
||||
/* Beacon interval changed */
|
||||
LOCK(wl);
|
||||
wlc_set(wl->wlc, WLC_SET_BCNPRD, info->beacon_int);
|
||||
brcms_c_set(wl->wlc, WLC_SET_BCNPRD, info->beacon_int);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
if (changed & BSS_CHANGED_BSSID) {
|
||||
/* BSSID changed, for whatever reason (IBSS and managed mode) */
|
||||
LOCK(wl);
|
||||
wlc_set_addrmatch(wl->wlc, RCM_BSSID_OFFSET,
|
||||
brcms_c_set_addrmatch(wl->wlc, RCM_BSSID_OFFSET,
|
||||
info->bssid);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
|
@ -486,9 +486,9 @@ brcms_ops_configure_filter(struct ieee80211_hw *hw,
|
|||
LOCK(wl);
|
||||
if (*total_flags & FIF_BCN_PRBRESP_PROMISC) {
|
||||
wl->pub->mac80211_state |= MAC80211_PROMISC_BCNS;
|
||||
wlc_mac_bcn_promisc_change(wl->wlc, 1);
|
||||
brcms_c_mac_bcn_promisc_change(wl->wlc, 1);
|
||||
} else {
|
||||
wlc_mac_bcn_promisc_change(wl->wlc, 0);
|
||||
brcms_c_mac_bcn_promisc_change(wl->wlc, 0);
|
||||
wl->pub->mac80211_state &= ~MAC80211_PROMISC_BCNS;
|
||||
}
|
||||
UNLOCK(wl);
|
||||
|
@ -506,7 +506,7 @@ static void brcms_ops_sw_scan_start(struct ieee80211_hw *hw)
|
|||
{
|
||||
struct brcms_info *wl = hw->priv;
|
||||
LOCK(wl);
|
||||
wlc_scan_start(wl->wlc);
|
||||
brcms_c_scan_start(wl->wlc);
|
||||
UNLOCK(wl);
|
||||
return;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ static void brcms_ops_sw_scan_complete(struct ieee80211_hw *hw)
|
|||
{
|
||||
struct brcms_info *wl = hw->priv;
|
||||
LOCK(wl);
|
||||
wlc_scan_stop(wl->wlc);
|
||||
brcms_c_scan_stop(wl->wlc);
|
||||
UNLOCK(wl);
|
||||
return;
|
||||
}
|
||||
|
@ -563,7 +563,7 @@ brcms_ops_conf_tx(struct ieee80211_hw *hw, u16 queue,
|
|||
struct brcms_info *wl = hw->priv;
|
||||
|
||||
LOCK(wl);
|
||||
wlc_wme_setparams(wl->wlc, queue, params, true);
|
||||
brcms_c_wme_setparams(wl->wlc, queue, params, true);
|
||||
UNLOCK(wl);
|
||||
|
||||
return 0;
|
||||
|
@ -637,7 +637,7 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw,
|
|||
break;
|
||||
case IEEE80211_AMPDU_TX_START:
|
||||
LOCK(wl);
|
||||
status = wlc_aggregatable(wl->wlc, tid);
|
||||
status = brcms_c_aggregatable(wl->wlc, tid);
|
||||
UNLOCK(wl);
|
||||
if (!status) {
|
||||
wiphy_err(wl->wiphy, "START: tid %d is not agg\'able\n",
|
||||
|
@ -673,7 +673,7 @@ static void brcms_ops_rfkill_poll(struct ieee80211_hw *hw)
|
|||
bool blocked;
|
||||
|
||||
LOCK(wl);
|
||||
blocked = wlc_check_radio_disabled(wl->wlc);
|
||||
blocked = brcms_c_check_radio_disabled(wl->wlc);
|
||||
UNLOCK(wl);
|
||||
|
||||
wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, blocked);
|
||||
|
@ -687,7 +687,7 @@ static void brcms_ops_flush(struct ieee80211_hw *hw, bool drop)
|
|||
|
||||
/* wait for packet queue and dma fifos to run empty */
|
||||
LOCK(wl);
|
||||
wlc_wait_for_tx_completion(wl->wlc, drop);
|
||||
brcms_c_wait_for_tx_completion(wl->wlc, drop);
|
||||
UNLOCK(wl);
|
||||
}
|
||||
|
||||
|
@ -797,7 +797,7 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device,
|
|||
}
|
||||
|
||||
/* common load-time initialization */
|
||||
wl->wlc = wlc_attach((void *)wl, vendor, device, unit, false,
|
||||
wl->wlc = brcms_c_attach((void *)wl, vendor, device, unit, false,
|
||||
wl->regsva, wl->bcm_bustype, btparam, &err);
|
||||
brcms_release_fw(wl);
|
||||
if (!wl->wlc) {
|
||||
|
@ -805,11 +805,11 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device,
|
|||
KBUILD_MODNAME, err);
|
||||
goto fail;
|
||||
}
|
||||
wl->pub = wlc_pub(wl->wlc);
|
||||
wl->pub = brcms_c_pub(wl->wlc);
|
||||
|
||||
wl->pub->ieee_hw = hw;
|
||||
|
||||
if (wlc_set_par(wl->wlc, IOV_MPC, 0) < 0) {
|
||||
if (brcms_c_set_par(wl->wlc, IOV_MPC, 0) < 0) {
|
||||
wiphy_err(wl->wiphy, "wl%d: Error setting MPC variable to 0\n",
|
||||
unit);
|
||||
}
|
||||
|
@ -822,7 +822,7 @@ static struct brcms_info *brcms_attach(u16 vendor, u16 device,
|
|||
wl->irq = irq;
|
||||
|
||||
/* register module */
|
||||
wlc_module_register(wl->pub, "linux", wl, wl_linux_watchdog, NULL);
|
||||
brcms_c_module_register(wl->pub, "linux", wl, wl_linux_watchdog, NULL);
|
||||
|
||||
if (ieee_hw_init(hw)) {
|
||||
wiphy_err(wl->wiphy, "wl%d: %s: ieee_hw_init failed!\n", unit,
|
||||
|
@ -1040,9 +1040,8 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw)
|
|||
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL;
|
||||
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
|
||||
|
||||
if (wlc_get(wl->wlc, WLC_GET_PHYLIST, (int *)&phy_list) < 0) {
|
||||
if (brcms_c_get(wl->wlc, WLC_GET_PHYLIST, (int *)&phy_list) < 0)
|
||||
wiphy_err(hw->wiphy, "Phy list failed\n");
|
||||
}
|
||||
|
||||
if (phy_list[0] == 'n' || phy_list[0] == 'c') {
|
||||
if (phy_list[0] == 'c') {
|
||||
|
@ -1078,7 +1077,7 @@ static int ieee_hw_init(struct ieee80211_hw *hw)
|
|||
| IEEE80211_HW_REPORTS_TX_ACK_STATUS
|
||||
| IEEE80211_HW_AMPDU_AGGREGATION;
|
||||
|
||||
hw->extra_tx_headroom = wlc_get_header_len();
|
||||
hw->extra_tx_headroom = brcms_c_get_header_len();
|
||||
hw->queues = N_TX_QUEUES;
|
||||
/* FIXME: this doesn't seem to be used properly in minstrel_ht.
|
||||
* mac80211/status.c:ieee80211_tx_status() checks this value,
|
||||
|
@ -1239,7 +1238,7 @@ static void brcms_remove(struct pci_dev *pdev)
|
|||
}
|
||||
|
||||
LOCK(wl);
|
||||
status = wlc_chipmatch(pdev->vendor, pdev->device);
|
||||
status = brcms_c_chipmatch(pdev->vendor, pdev->device);
|
||||
UNLOCK(wl);
|
||||
if (!status) {
|
||||
wiphy_err(wl->wiphy, "wl: brcms_remove: wlc_chipmatch "
|
||||
|
@ -1337,12 +1336,12 @@ static void brcms_free(struct brcms_info *wl)
|
|||
tasklet_kill(&wl->tasklet);
|
||||
|
||||
if (wl->pub) {
|
||||
wlc_module_unregister(wl->pub, "linux", wl);
|
||||
brcms_c_module_unregister(wl->pub, "linux", wl);
|
||||
}
|
||||
|
||||
/* free common resources */
|
||||
if (wl->wlc) {
|
||||
wlc_detach(wl->wlc);
|
||||
brcms_c_detach(wl->wlc);
|
||||
wl->wlc = NULL;
|
||||
wl->pub = NULL;
|
||||
}
|
||||
|
@ -1407,7 +1406,7 @@ void brcms_init(struct brcms_info *wl)
|
|||
BCMMSG(WL_TO_HW(wl)->wiphy, "wl%d\n", wl->pub->unit);
|
||||
brcms_reset(wl);
|
||||
|
||||
wlc_init(wl->wlc);
|
||||
brcms_c_init(wl->wlc);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1416,7 +1415,7 @@ void brcms_init(struct brcms_info *wl)
|
|||
uint brcms_reset(struct brcms_info *wl)
|
||||
{
|
||||
BCMMSG(WL_TO_HW(wl)->wiphy, "wl%d\n", wl->pub->unit);
|
||||
wlc_reset(wl->wlc);
|
||||
brcms_c_reset(wl->wlc);
|
||||
|
||||
/* dpc will not be rescheduled */
|
||||
wl->resched = 0;
|
||||
|
@ -1433,7 +1432,7 @@ void brcms_intrson(struct brcms_info *wl)
|
|||
unsigned long flags;
|
||||
|
||||
INT_LOCK(wl, flags);
|
||||
wlc_intrson(wl->wlc);
|
||||
brcms_c_intrson(wl->wlc);
|
||||
INT_UNLOCK(wl, flags);
|
||||
}
|
||||
|
||||
|
@ -1451,7 +1450,7 @@ u32 brcms_intrsoff(struct brcms_info *wl)
|
|||
u32 status;
|
||||
|
||||
INT_LOCK(wl, flags);
|
||||
status = wlc_intrsoff(wl->wlc);
|
||||
status = brcms_c_intrsoff(wl->wlc);
|
||||
INT_UNLOCK(wl, flags);
|
||||
return status;
|
||||
}
|
||||
|
@ -1461,7 +1460,7 @@ void brcms_intrsrestore(struct brcms_info *wl, u32 macintmask)
|
|||
unsigned long flags;
|
||||
|
||||
INT_LOCK(wl, flags);
|
||||
wlc_intrsrestore(wl->wlc, macintmask);
|
||||
brcms_c_intrsrestore(wl->wlc, macintmask);
|
||||
INT_UNLOCK(wl, flags);
|
||||
}
|
||||
|
||||
|
@ -1475,7 +1474,7 @@ int brcms_up(struct brcms_info *wl)
|
|||
if (wl->pub->up)
|
||||
return 0;
|
||||
|
||||
error = wlc_up(wl->wlc);
|
||||
error = brcms_c_up(wl->wlc);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
@ -1488,7 +1487,7 @@ void brcms_down(struct brcms_info *wl)
|
|||
uint callbacks, ret_val = 0;
|
||||
|
||||
/* call common down function */
|
||||
ret_val = wlc_down(wl->wlc);
|
||||
ret_val = brcms_c_down(wl->wlc);
|
||||
callbacks = atomic_read(&wl->callbacks) - ret_val;
|
||||
|
||||
/* wait for down callbacks to complete */
|
||||
|
@ -1513,7 +1512,7 @@ static irqreturn_t brcms_isr(int irq, void *dev_id)
|
|||
ISR_LOCK(wl, flags);
|
||||
|
||||
/* call common first level interrupt handler */
|
||||
ours = wlc_isr(wl->wlc, &wantdpc);
|
||||
ours = brcms_c_isr(wl->wlc, &wantdpc);
|
||||
if (ours) {
|
||||
/* if more to do... */
|
||||
if (wantdpc) {
|
||||
|
@ -1543,14 +1542,14 @@ static void brcms_dpc(unsigned long data)
|
|||
unsigned long flags;
|
||||
|
||||
INT_LOCK(wl, flags);
|
||||
wlc_intrsupd(wl->wlc);
|
||||
brcms_c_intrsupd(wl->wlc);
|
||||
INT_UNLOCK(wl, flags);
|
||||
}
|
||||
|
||||
wl->resched = wlc_dpc(wl->wlc, true);
|
||||
wl->resched = brcms_c_dpc(wl->wlc, true);
|
||||
}
|
||||
|
||||
/* wlc_dpc() may bring the driver down */
|
||||
/* brcms_c_dpc() may bring the driver down */
|
||||
if (!wl->pub->up)
|
||||
goto done;
|
||||
|
||||
|
@ -1913,7 +1912,7 @@ int brcms_check_firmwares(struct brcms_info *wl)
|
|||
*/
|
||||
bool brcms_rfkill_set_hw_state(struct brcms_info *wl)
|
||||
{
|
||||
bool blocked = wlc_check_radio_disabled(wl->wlc);
|
||||
bool blocked = brcms_c_check_radio_disabled(wl->wlc);
|
||||
|
||||
UNLOCK(wl);
|
||||
wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, blocked);
|
||||
|
|
|
@ -85,7 +85,7 @@ struct brcms_info {
|
|||
/* misc callbacks */
|
||||
struct brcms_info;
|
||||
struct brcms_if;
|
||||
struct wlc_if;
|
||||
struct brcms_c_if;
|
||||
extern void brcms_init(struct brcms_info *wl);
|
||||
extern uint brcms_reset(struct brcms_info *wl);
|
||||
extern void brcms_intrson(struct brcms_info *wl);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -27,7 +27,7 @@
|
|||
#define WL_HWRXOFF 38 /* chip rx buffer offset */
|
||||
#define INVCHANNEL 255 /* invalid channel */
|
||||
#define MAXCOREREV 28 /* max # supported core revisions (0 .. MAXCOREREV - 1) */
|
||||
#define WLC_MAXMODULES 22 /* max # wlc_module_register() calls */
|
||||
#define WLC_MAXMODULES 22 /* max # brcms_c_module_register() calls */
|
||||
|
||||
#define SEQNUM_SHIFT 4
|
||||
#define AMPDU_DELIMITER_LEN 4
|
||||
|
@ -74,7 +74,7 @@
|
|||
((unsigned)(bits) << field ## _S))
|
||||
|
||||
/* For managing scan result lists */
|
||||
struct wlc_bss_list {
|
||||
struct brcms_c_bss_list {
|
||||
uint count;
|
||||
bool beacon; /* set for beacon, cleared for probe response */
|
||||
wlc_bss_info_t *ptrs[MAXBSS];
|
||||
|
@ -135,7 +135,7 @@ struct wlc_bss_list {
|
|||
(((cfg)->WPA_auth != WPA_AUTH_DISABLED && WSEC_ENABLED((cfg)->wsec)) ? \
|
||||
(cfg)->wsec_portopen : true)
|
||||
|
||||
#define PS_ALLOWED(wlc) wlc_ps_allowed(wlc)
|
||||
#define PS_ALLOWED(wlc) brcms_c_ps_allowed(wlc)
|
||||
|
||||
#define DATA_BLOCK_TX_SUPR (1 << 4)
|
||||
|
||||
|
@ -236,7 +236,7 @@ extern const u8 prio2fifo[];
|
|||
|
||||
#define WLCWLUNIT(wlc) ((wlc)->pub->unit)
|
||||
|
||||
struct wlc_protection {
|
||||
struct brcms_c_protection {
|
||||
bool _g; /* use g spec protection, driver internal */
|
||||
s8 g_override; /* override for use of g spec protection */
|
||||
u8 gmode_user; /* user config gmode, operating band->gmode is different */
|
||||
|
@ -251,7 +251,7 @@ struct wlc_protection {
|
|||
};
|
||||
|
||||
/* anything affects the single/dual streams/antenna operation */
|
||||
struct wlc_stf {
|
||||
struct brcms_c_stf {
|
||||
u8 hw_txchain; /* HW txchain bitmap cfg */
|
||||
u8 txchain; /* txchain bitmap being used */
|
||||
u8 txstreams; /* number of txchains being used */
|
||||
|
@ -295,7 +295,7 @@ struct wlc_stf {
|
|||
/* wlc_bss_info flag bit values */
|
||||
#define WLC_BSS_HT 0x0020 /* BSS is HT (MIMO) capable */
|
||||
|
||||
/* Flags used in wlc_txq_info.stopped */
|
||||
/* Flags used in brcms_c_txq_info.stopped */
|
||||
#define TXQ_STOP_FOR_PRIOFC_MASK 0x000000FF /* per prio flow control bits */
|
||||
#define TXQ_STOP_FOR_PKT_DRAIN 0x00000100 /* stop txq enqueue for packet drain */
|
||||
#define TXQ_STOP_FOR_AMPDU_FLOW_CNTRL 0x00000200 /* stop txq enqueue for ampdu flow control */
|
||||
|
@ -348,7 +348,7 @@ struct wsec_key {
|
|||
/*
|
||||
* core state (mac)
|
||||
*/
|
||||
struct wlccore {
|
||||
struct brcms_c_core {
|
||||
uint coreidx; /* # sb enumerated core */
|
||||
|
||||
/* fifo */
|
||||
|
@ -361,7 +361,7 @@ struct wlccore {
|
|||
/*
|
||||
* band state (phy+ana+radio)
|
||||
*/
|
||||
struct wlcband {
|
||||
struct brcms_c_band {
|
||||
int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */
|
||||
uint bandunit; /* bandstate[] index */
|
||||
|
||||
|
@ -393,7 +393,7 @@ struct wlcband {
|
|||
};
|
||||
|
||||
/* tx completion callback takes 3 args */
|
||||
typedef void (*pkcb_fn_t) (struct wlc_info *wlc, uint txstatus, void *arg);
|
||||
typedef void (*pkcb_fn_t) (struct brcms_c_info *wlc, uint txstatus, void *arg);
|
||||
|
||||
struct pkt_cb {
|
||||
pkcb_fn_t fn; /* function to call when tx frame completes */
|
||||
|
@ -441,8 +441,8 @@ struct wme_param_ie {
|
|||
} __attribute__((packed));
|
||||
|
||||
/* virtual interface */
|
||||
struct wlc_if {
|
||||
struct wlc_if *next;
|
||||
struct brcms_c_if {
|
||||
struct brcms_c_if *next;
|
||||
u8 type; /* WLC_IFTYPE_BSS or WLC_IFTYPE_WDS */
|
||||
u8 index; /* assigned in wl_add_if(), index of the wlif if any,
|
||||
* not necessarily corresponding to bsscfg._idx or
|
||||
|
@ -450,17 +450,19 @@ struct wlc_if {
|
|||
*/
|
||||
u8 flags; /* flags for the interface */
|
||||
struct brcms_if *wlif; /* pointer to wlif */
|
||||
struct wlc_txq_info *qi; /* pointer to associated tx queue */
|
||||
struct brcms_c_txq_info *qi; /* pointer to associated tx queue */
|
||||
union {
|
||||
struct scb *scb; /* pointer to scb if WLC_IFTYPE_WDS */
|
||||
struct wlc_bsscfg *bsscfg; /* pointer to bsscfg if WLC_IFTYPE_BSS */
|
||||
/* pointer to scb if WLC_IFTYPE_WDS */
|
||||
struct scb *scb;
|
||||
/* pointer to bsscfg if WLC_IFTYPE_BSS */
|
||||
struct brcms_c_bsscfg *bsscfg;
|
||||
} u;
|
||||
};
|
||||
|
||||
/* flags for the interface, this interface is linked to a brcms_if */
|
||||
#define WLC_IF_LINKED 0x02
|
||||
|
||||
struct wlc_hwband {
|
||||
struct brcms_c_hwband {
|
||||
int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */
|
||||
uint bandunit; /* bandstate[] index */
|
||||
u16 mhfs[MHFMAX]; /* MHF array shadow */
|
||||
|
@ -477,9 +479,9 @@ struct wlc_hwband {
|
|||
bool abgphy_encore;
|
||||
};
|
||||
|
||||
struct wlc_hw_info {
|
||||
struct brcms_c_hw_info {
|
||||
bool _piomode; /* true if pio mode */
|
||||
struct wlc_info *wlc;
|
||||
struct brcms_c_info *wlc;
|
||||
|
||||
/* fifo */
|
||||
struct dma_pub *di[NFIFO]; /* dma handles, per fifo */
|
||||
|
@ -504,8 +506,9 @@ struct wlc_hw_info {
|
|||
d11regs_t *regs; /* pointer to device registers */
|
||||
void *physhim; /* phy shim layer handler */
|
||||
void *phy_sh; /* pointer to shared phy state */
|
||||
struct wlc_hwband *band;/* pointer to active per-band state */
|
||||
struct wlc_hwband *bandstate[MAXBANDS];/* band state per phy/radio */
|
||||
struct brcms_c_hwband *band;/* pointer to active per-band state */
|
||||
/* band state per phy/radio */
|
||||
struct brcms_c_hwband *bandstate[MAXBANDS];
|
||||
u16 bmac_phytxant; /* cache of high phytxant state */
|
||||
bool shortslot; /* currently using 11g ShortSlot timing */
|
||||
u16 SRL; /* 802.11 dot11ShortRetryLimit */
|
||||
|
@ -558,8 +561,8 @@ struct wlc_hw_info {
|
|||
* if they belong to the same flow of traffic from the device. For multi-channel
|
||||
* operation there are independent TX Queues for each channel.
|
||||
*/
|
||||
struct wlc_txq_info {
|
||||
struct wlc_txq_info *next;
|
||||
struct brcms_c_txq_info {
|
||||
struct brcms_c_txq_info *next;
|
||||
struct pktq q;
|
||||
uint stopped; /* tx flow control bits */
|
||||
};
|
||||
|
@ -567,12 +570,13 @@ struct wlc_txq_info {
|
|||
/*
|
||||
* Principal common (os-independent) software data structure.
|
||||
*/
|
||||
struct wlc_info {
|
||||
struct brcms_c_info {
|
||||
struct wlc_pub *pub; /* pointer to wlc public state */
|
||||
struct brcms_info *wl; /* pointer to os-specific private state */
|
||||
d11regs_t *regs; /* pointer to device registers */
|
||||
|
||||
struct wlc_hw_info *hw; /* HW related state used primarily by BMAC */
|
||||
/* HW related state used primarily by BMAC */
|
||||
struct brcms_c_hw_info *hw;
|
||||
|
||||
/* clock */
|
||||
int clkreq_override; /* setting for clkreq for PCIE : Auto, 0, 1 */
|
||||
|
@ -589,11 +593,11 @@ struct wlc_info {
|
|||
bool clk; /* core is out of reset and has clock */
|
||||
|
||||
/* multiband */
|
||||
struct wlccore *core; /* pointer to active io core */
|
||||
struct wlcband *band; /* pointer to active per-band state */
|
||||
struct wlccore *corestate; /* per-core state (one per hw core) */
|
||||
struct brcms_c_core *core; /* pointer to active io core */
|
||||
struct brcms_c_band *band; /* pointer to active per-band state */
|
||||
struct brcms_c_core *corestate; /* per-core state (one per hw core) */
|
||||
/* per-band state (one per phy/radio): */
|
||||
struct wlcband *bandstate[MAXBANDS];
|
||||
struct brcms_c_band *bandstate[MAXBANDS];
|
||||
|
||||
bool war16165; /* PCI slow clock 16165 war flag */
|
||||
|
||||
|
@ -633,7 +637,7 @@ struct wlc_info {
|
|||
u8 mpc_dlycnt; /* # of watchdog cnt before turn disable radio */
|
||||
u8 mpc_offcnt; /* # of watchdog cnt that radio is disabled */
|
||||
u8 mpc_delay_off; /* delay radio disable by # of watchdog cnt */
|
||||
u8 prev_non_delay_mpc; /* prev state wlc_is_non_delay_mpc */
|
||||
u8 prev_non_delay_mpc; /* prev state brcms_c_is_non_delay_mpc */
|
||||
|
||||
/* timer for watchdog routine */
|
||||
struct brcms_timer *wdtimer;
|
||||
|
@ -674,11 +678,11 @@ struct wlc_info {
|
|||
* BSS Configurations set of BSS configurations, idx 0 is default and
|
||||
* always valid
|
||||
*/
|
||||
struct wlc_bsscfg *bsscfg[WLC_MAXBSSCFG];
|
||||
struct wlc_bsscfg *cfg; /* the primary bsscfg (can be AP or STA) */
|
||||
struct brcms_c_bsscfg *bsscfg[WLC_MAXBSSCFG];
|
||||
struct brcms_c_bsscfg *cfg; /* the primary bsscfg (can be AP or STA) */
|
||||
|
||||
/* tx queue */
|
||||
struct wlc_txq_info *tx_queues; /* common TX Queue list */
|
||||
struct brcms_c_txq_info *tx_queues; /* common TX Queue list */
|
||||
|
||||
/* security */
|
||||
wsec_key_t *wsec_keys[WSEC_MAX_KEYS]; /* dynamic key storage */
|
||||
|
@ -730,10 +734,10 @@ struct wlc_info {
|
|||
s8 shortslot_override; /* 11g ShortSlot override */
|
||||
bool include_legacy_erp; /* include Legacy ERP info elt ID 47 as well as g ID 42 */
|
||||
|
||||
struct wlc_protection *protection;
|
||||
struct brcms_c_protection *protection;
|
||||
s8 PLCPHdr_override; /* 802.11b Preamble Type override */
|
||||
|
||||
struct wlc_stf *stf;
|
||||
struct brcms_c_stf *stf;
|
||||
|
||||
ratespec_t bcn_rspec; /* save bcn ratespec purpose */
|
||||
|
||||
|
@ -744,7 +748,7 @@ struct wlc_info {
|
|||
|
||||
u16 next_bsscfg_ID;
|
||||
|
||||
struct wlc_txq_info *pkt_queue; /* txq for transmit packets */
|
||||
struct brcms_c_txq_info *pkt_queue; /* txq for transmit packets */
|
||||
u32 mpc_dur; /* total time (ms) in mpc mode except for the
|
||||
* portion since radio is turned off last time
|
||||
*/
|
||||
|
@ -756,7 +760,7 @@ struct wlc_info {
|
|||
|
||||
/* antsel module specific state */
|
||||
struct antsel_info {
|
||||
struct wlc_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 */
|
||||
u8 antsel_type; /* Type of boardlevel mimo antenna switch-logic
|
||||
* 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
|
||||
|
@ -768,8 +772,8 @@ struct antsel_info {
|
|||
};
|
||||
|
||||
/* BSS configuration state */
|
||||
struct wlc_bsscfg {
|
||||
struct wlc_info *wlc; /* wlc to which this bsscfg belongs to. */
|
||||
struct brcms_c_bsscfg {
|
||||
struct brcms_c_info *wlc; /* wlc to which this bsscfg belongs to. */
|
||||
bool up; /* is this configuration up operational */
|
||||
bool enable; /* is this configuration enabled */
|
||||
bool associated; /* is BSS in ASSOCIATED state */
|
||||
|
@ -867,140 +871,142 @@ struct wlc_bsscfg {
|
|||
#define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \
|
||||
((len1 == len2) && !memcmp(ssid1, ssid2, len1))
|
||||
|
||||
extern void wlc_fatal_error(struct wlc_info *wlc);
|
||||
extern void wlc_bmac_rpc_watchdog(struct wlc_info *wlc);
|
||||
extern void wlc_recv(struct wlc_info *wlc, struct sk_buff *p);
|
||||
extern bool wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2);
|
||||
extern void wlc_txfifo(struct wlc_info *wlc, uint fifo, struct sk_buff *p,
|
||||
bool commit, s8 txpktpend);
|
||||
extern void wlc_txfifo_complete(struct wlc_info *wlc, uint fifo, s8 txpktpend);
|
||||
extern void wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
|
||||
uint prec);
|
||||
extern void wlc_info_init(struct wlc_info *wlc, int unit);
|
||||
extern void wlc_print_txstatus(tx_status_t *txs);
|
||||
extern int wlc_xmtfifo_sz_get(struct wlc_info *wlc, uint fifo, uint *blocks);
|
||||
extern void wlc_write_template_ram(struct wlc_info *wlc, int offset, int len,
|
||||
void *buf);
|
||||
extern void wlc_write_hw_bcntemplates(struct wlc_info *wlc, void *bcn, int len,
|
||||
bool both);
|
||||
extern void wlc_pllreq(struct wlc_info *wlc, bool set, mbool req_bit);
|
||||
extern void wlc_reset_bmac_done(struct wlc_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_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,
|
||||
u32 frm_tx2);
|
||||
extern void brcms_c_txfifo(struct brcms_c_info *wlc, uint fifo,
|
||||
struct sk_buff *p,
|
||||
bool commit, s8 txpktpend);
|
||||
extern void brcms_c_txfifo_complete(struct brcms_c_info *wlc, uint fifo,
|
||||
s8 txpktpend);
|
||||
extern void brcms_c_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
|
||||
uint prec);
|
||||
extern void brcms_c_info_init(struct brcms_c_info *wlc, int unit);
|
||||
extern void brcms_c_print_txstatus(tx_status_t *txs);
|
||||
extern int brcms_c_xmtfifo_sz_get(struct brcms_c_info *wlc, uint fifo,
|
||||
uint *blocks);
|
||||
extern void brcms_c_write_template_ram(struct brcms_c_info *wlc, int offset,
|
||||
int len, void *buf);
|
||||
extern void brcms_c_write_hw_bcntemplates(struct brcms_c_info *wlc, void *bcn,
|
||||
int len, bool both);
|
||||
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);
|
||||
|
||||
#if defined(BCMDBG)
|
||||
extern void wlc_print_rxh(d11rxhdr_t *rxh);
|
||||
extern void wlc_print_hdrs(struct wlc_info *wlc, const char *prefix, u8 *frame,
|
||||
d11txh_t *txh, d11rxhdr_t *rxh, uint len);
|
||||
extern void wlc_print_txdesc(d11txh_t *txh);
|
||||
extern void brcms_c_print_rxh(d11rxhdr_t *rxh);
|
||||
extern void brcms_c_print_txdesc(d11txh_t *txh);
|
||||
#else
|
||||
#define wlc_print_txdesc(a)
|
||||
#endif
|
||||
#if defined(BCMDBG)
|
||||
extern void wlc_print_dot11_mac_hdr(u8 *buf, int len);
|
||||
#define brcms_c_print_txdesc(a)
|
||||
#endif
|
||||
|
||||
extern void wlc_setxband(struct wlc_hw_info *wlc_hw, uint bandunit);
|
||||
extern void wlc_coredisable(struct wlc_hw_info *wlc_hw);
|
||||
extern void brcms_c_setxband(struct brcms_c_hw_info *wlc_hw, uint bandunit);
|
||||
extern void brcms_c_coredisable(struct brcms_c_hw_info *wlc_hw);
|
||||
|
||||
extern bool wlc_valid_rate(struct wlc_info *wlc, ratespec_t rate, int band,
|
||||
bool verbose);
|
||||
extern void wlc_ap_upd(struct wlc_info *wlc);
|
||||
extern bool brcms_c_valid_rate(struct brcms_c_info *wlc, ratespec_t rate,
|
||||
int band, bool verbose);
|
||||
extern void brcms_c_ap_upd(struct brcms_c_info *wlc);
|
||||
|
||||
/* helper functions */
|
||||
extern void wlc_shm_ssid_upd(struct wlc_info *wlc, struct wlc_bsscfg *cfg);
|
||||
extern int wlc_set_gmode(struct wlc_info *wlc, u8 gmode, bool config);
|
||||
extern void brcms_c_shm_ssid_upd(struct brcms_c_info *wlc,
|
||||
struct brcms_c_bsscfg *cfg);
|
||||
extern int brcms_c_set_gmode(struct brcms_c_info *wlc, u8 gmode, bool config);
|
||||
|
||||
extern void wlc_mac_bcn_promisc_change(struct wlc_info *wlc, bool promisc);
|
||||
extern void wlc_mac_bcn_promisc(struct wlc_info *wlc);
|
||||
extern void wlc_mac_promisc(struct wlc_info *wlc);
|
||||
extern void wlc_txflowcontrol(struct wlc_info *wlc, struct wlc_txq_info *qi,
|
||||
bool on, int prio);
|
||||
extern void wlc_txflowcontrol_override(struct wlc_info *wlc,
|
||||
struct wlc_txq_info *qi,
|
||||
extern void brcms_c_mac_bcn_promisc_change(struct brcms_c_info *wlc,
|
||||
bool promisc);
|
||||
extern void brcms_c_mac_bcn_promisc(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_mac_promisc(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_txflowcontrol(struct brcms_c_info *wlc,
|
||||
struct brcms_c_txq_info *qi,
|
||||
bool on, int prio);
|
||||
extern void brcms_c_txflowcontrol_override(struct brcms_c_info *wlc,
|
||||
struct brcms_c_txq_info *qi,
|
||||
bool on, uint override);
|
||||
extern bool wlc_txflowcontrol_prio_isset(struct wlc_info *wlc,
|
||||
struct wlc_txq_info *qi, int prio);
|
||||
extern void wlc_send_q(struct wlc_info *wlc);
|
||||
extern int wlc_prep_pdu(struct wlc_info *wlc, struct sk_buff *pdu, uint *fifo);
|
||||
extern bool brcms_c_txflowcontrol_prio_isset(struct brcms_c_info *wlc,
|
||||
struct brcms_c_txq_info *qi,
|
||||
int prio);
|
||||
extern void brcms_c_send_q(struct brcms_c_info *wlc);
|
||||
extern int brcms_c_prep_pdu(struct brcms_c_info *wlc, struct sk_buff *pdu,
|
||||
uint *fifo);
|
||||
|
||||
extern u16 wlc_calc_lsig_len(struct wlc_info *wlc, ratespec_t ratespec,
|
||||
extern u16 brcms_c_calc_lsig_len(struct brcms_c_info *wlc, ratespec_t ratespec,
|
||||
uint mac_len);
|
||||
extern ratespec_t wlc_rspec_to_rts_rspec(struct wlc_info *wlc, ratespec_t rspec,
|
||||
bool use_rspec, u16 mimo_ctlchbw);
|
||||
extern u16 wlc_compute_rtscts_dur(struct wlc_info *wlc, bool cts_only,
|
||||
ratespec_t rts_rate, ratespec_t frame_rate,
|
||||
u8 rts_preamble_type,
|
||||
u8 frame_preamble_type, uint frame_len,
|
||||
bool ba);
|
||||
extern ratespec_t brcms_c_rspec_to_rts_rspec(struct brcms_c_info *wlc,
|
||||
ratespec_t rspec,
|
||||
bool use_rspec, u16 mimo_ctlchbw);
|
||||
extern u16 brcms_c_compute_rtscts_dur(struct brcms_c_info *wlc, bool cts_only,
|
||||
ratespec_t rts_rate,
|
||||
ratespec_t frame_rate,
|
||||
u8 rts_preamble_type,
|
||||
u8 frame_preamble_type, uint frame_len,
|
||||
bool ba);
|
||||
|
||||
extern void wlc_tbtt(struct wlc_info *wlc);
|
||||
extern void wlc_inval_dma_pkts(struct wlc_hw_info *hw,
|
||||
extern void brcms_c_tbtt(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_inval_dma_pkts(struct brcms_c_hw_info *hw,
|
||||
struct ieee80211_sta *sta,
|
||||
void (*dma_callback_fn));
|
||||
|
||||
#if defined(BCMDBG)
|
||||
extern void wlc_dump_ie(struct wlc_info *wlc, struct brcmu_tlv *ie,
|
||||
struct brcmu_strbuf *b);
|
||||
#endif
|
||||
|
||||
extern void wlc_reprate_init(struct wlc_info *wlc);
|
||||
extern void wlc_bsscfg_reprate_init(struct wlc_bsscfg *bsscfg);
|
||||
extern void brcms_c_reprate_init(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_bsscfg_reprate_init(struct brcms_c_bsscfg *bsscfg);
|
||||
|
||||
/* Shared memory access */
|
||||
extern void wlc_write_shm(struct wlc_info *wlc, uint offset, u16 v);
|
||||
extern u16 wlc_read_shm(struct wlc_info *wlc, uint offset);
|
||||
extern void wlc_copyto_shm(struct wlc_info *wlc, uint offset, const void *buf,
|
||||
int len);
|
||||
extern void brcms_c_write_shm(struct brcms_c_info *wlc, uint offset, u16 v);
|
||||
extern u16 brcms_c_read_shm(struct brcms_c_info *wlc, uint offset);
|
||||
extern void brcms_c_copyto_shm(struct brcms_c_info *wlc, uint offset,
|
||||
const void *buf, int len);
|
||||
|
||||
extern void wlc_update_beacon(struct wlc_info *wlc);
|
||||
extern void wlc_bss_update_beacon(struct wlc_info *wlc,
|
||||
struct wlc_bsscfg *bsscfg);
|
||||
extern void brcms_c_update_beacon(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_bss_update_beacon(struct brcms_c_info *wlc,
|
||||
struct brcms_c_bsscfg *bsscfg);
|
||||
|
||||
extern void wlc_update_probe_resp(struct wlc_info *wlc, bool suspend);
|
||||
extern void wlc_bss_update_probe_resp(struct wlc_info *wlc,
|
||||
struct wlc_bsscfg *cfg, bool suspend);
|
||||
|
||||
extern bool wlc_ismpc(struct wlc_info *wlc);
|
||||
extern bool wlc_is_non_delay_mpc(struct wlc_info *wlc);
|
||||
extern void wlc_radio_mpc_upd(struct wlc_info *wlc);
|
||||
extern bool wlc_prec_enq(struct wlc_info *wlc, struct pktq *q, void *pkt,
|
||||
int prec);
|
||||
extern bool wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q,
|
||||
extern void brcms_c_update_probe_resp(struct brcms_c_info *wlc, bool suspend);
|
||||
extern void brcms_c_bss_update_probe_resp(struct brcms_c_info *wlc,
|
||||
struct brcms_c_bsscfg *cfg,
|
||||
bool suspend);
|
||||
extern bool brcms_c_ismpc(struct brcms_c_info *wlc);
|
||||
extern bool brcms_c_is_non_delay_mpc(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_radio_mpc_upd(struct brcms_c_info *wlc);
|
||||
extern bool brcms_c_prec_enq(struct brcms_c_info *wlc, struct pktq *q,
|
||||
void *pkt, int prec);
|
||||
extern bool brcms_c_prec_enq_head(struct brcms_c_info *wlc, struct pktq *q,
|
||||
struct sk_buff *pkt, int prec, bool head);
|
||||
extern u16 wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec);
|
||||
extern void wlc_compute_plcp(struct wlc_info *wlc, ratespec_t rate, uint length,
|
||||
u8 *plcp);
|
||||
extern uint wlc_calc_frame_time(struct wlc_info *wlc, ratespec_t ratespec,
|
||||
u8 preamble_type, uint mac_len);
|
||||
extern u16 brcms_c_phytxctl1_calc(struct brcms_c_info *wlc, ratespec_t rspec);
|
||||
extern void brcms_c_compute_plcp(struct brcms_c_info *wlc, ratespec_t rate,
|
||||
uint length, u8 *plcp);
|
||||
extern uint brcms_c_calc_frame_time(struct brcms_c_info *wlc,
|
||||
ratespec_t ratespec,
|
||||
u8 preamble_type, uint mac_len);
|
||||
|
||||
extern void wlc_set_chanspec(struct wlc_info *wlc, chanspec_t chanspec);
|
||||
extern void brcms_c_set_chanspec(struct brcms_c_info *wlc,
|
||||
chanspec_t chanspec);
|
||||
|
||||
extern bool wlc_timers_init(struct wlc_info *wlc, int unit);
|
||||
extern bool brcms_c_timers_init(struct brcms_c_info *wlc, int unit);
|
||||
|
||||
#if defined(BCMDBG)
|
||||
extern void wlc_print_ies(struct wlc_info *wlc, u8 *ies, uint ies_len);
|
||||
#endif
|
||||
|
||||
extern int wlc_set_nmode(struct wlc_info *wlc, s32 nmode);
|
||||
extern void wlc_mimops_action_ht_send(struct wlc_info *wlc,
|
||||
struct wlc_bsscfg *bsscfg,
|
||||
extern int brcms_c_set_nmode(struct brcms_c_info *wlc, s32 nmode);
|
||||
extern void brcms_c_mimops_action_ht_send(struct brcms_c_info *wlc,
|
||||
struct brcms_c_bsscfg *bsscfg,
|
||||
u8 mimops_mode);
|
||||
|
||||
extern void wlc_switch_shortslot(struct wlc_info *wlc, bool shortslot);
|
||||
extern void wlc_set_bssid(struct wlc_bsscfg *cfg);
|
||||
extern void wlc_edcf_setparams(struct wlc_info *wlc, bool suspend);
|
||||
extern void brcms_c_switch_shortslot(struct brcms_c_info *wlc, bool shortslot);
|
||||
extern void brcms_c_set_bssid(struct brcms_c_bsscfg *cfg);
|
||||
extern void brcms_c_edcf_setparams(struct brcms_c_info *wlc, bool suspend);
|
||||
|
||||
extern void wlc_set_ratetable(struct wlc_info *wlc);
|
||||
extern int wlc_set_mac(struct wlc_bsscfg *cfg);
|
||||
extern void wlc_beacon_phytxctl_txant_upd(struct wlc_info *wlc,
|
||||
extern void brcms_c_set_ratetable(struct brcms_c_info *wlc);
|
||||
extern int brcms_c_set_mac(struct brcms_c_bsscfg *cfg);
|
||||
extern void brcms_c_beacon_phytxctl_txant_upd(struct brcms_c_info *wlc,
|
||||
ratespec_t bcn_rate);
|
||||
extern void wlc_mod_prb_rsp_rate_table(struct wlc_info *wlc, uint frame_len);
|
||||
extern ratespec_t wlc_lowest_basic_rspec(struct wlc_info *wlc,
|
||||
wlc_rateset_t *rs);
|
||||
extern void wlc_radio_disable(struct wlc_info *wlc);
|
||||
extern void wlc_bcn_li_upd(struct wlc_info *wlc);
|
||||
extern void wlc_set_home_chanspec(struct wlc_info *wlc, chanspec_t chanspec);
|
||||
extern bool wlc_ps_allowed(struct wlc_info *wlc);
|
||||
extern bool wlc_stay_awake(struct wlc_info *wlc);
|
||||
extern void wlc_wme_initparams_sta(struct wlc_info *wlc, wme_param_ie_t *pe);
|
||||
extern void brcms_c_mod_prb_rsp_rate_table(struct brcms_c_info *wlc,
|
||||
uint frame_len);
|
||||
extern ratespec_t brcms_c_lowest_basic_rspec(struct brcms_c_info *wlc,
|
||||
wlc_rateset_t *rs);
|
||||
extern void brcms_c_radio_disable(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_bcn_li_upd(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_set_home_chanspec(struct brcms_c_info *wlc,
|
||||
chanspec_t chanspec);
|
||||
extern bool brcms_c_ps_allowed(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,
|
||||
wme_param_ie_t *pe);
|
||||
|
||||
#endif /* _BRCM_MAIN_H_ */
|
||||
|
|
|
@ -49,7 +49,7 @@ struct wlc_phy_srom_fem {
|
|||
u8 antswctrllut; /* antswctrl lookup table configuration: 32 possible choices */
|
||||
};
|
||||
|
||||
struct wlc_hw_info;
|
||||
struct brcms_c_hw_info;
|
||||
typedef void (*initfn_t) (phy_info_t *);
|
||||
typedef void (*chansetfn_t) (phy_info_t *, chanspec_t);
|
||||
typedef int (*longtrnfn_t) (phy_info_t *, int);
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
/* PHY SHIM module specific state */
|
||||
struct wlc_phy_shim_info {
|
||||
struct wlc_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 *wl; /* pointer to os-specific private state */
|
||||
};
|
||||
|
||||
wlc_phy_shim_info_t *wlc_phy_shim_attach(struct wlc_hw_info *wlc_hw,
|
||||
wlc_phy_shim_info_t *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw,
|
||||
void *wl, void *wlc) {
|
||||
wlc_phy_shim_info_t *physhim = NULL;
|
||||
|
||||
|
@ -122,7 +122,7 @@ void wlapi_bmac_corereset(wlc_phy_shim_info_t *physhim, u32 flags)
|
|||
|
||||
void wlapi_suspend_mac_and_wait(wlc_phy_shim_info_t *physhim)
|
||||
{
|
||||
wlc_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)
|
||||
|
@ -132,7 +132,7 @@ void wlapi_switch_macfreq(wlc_phy_shim_info_t *physhim, u8 spurmode)
|
|||
|
||||
void wlapi_enable_mac(wlc_phy_shim_info_t *physhim)
|
||||
{
|
||||
wlc_enable_mac(physhim->wlc);
|
||||
brcms_c_enable_mac(physhim->wlc);
|
||||
}
|
||||
|
||||
void wlapi_bmac_mctrl(wlc_phy_shim_info_t *physhim, u32 mask, u32 val)
|
||||
|
|
|
@ -109,9 +109,9 @@
|
|||
#define WLC_N_TXRX_CHAIN1 1
|
||||
|
||||
/* Forward declarations */
|
||||
struct wlc_hw_info;
|
||||
struct brcms_c_hw_info;
|
||||
|
||||
extern wlc_phy_shim_info_t *wlc_phy_shim_attach(struct wlc_hw_info *wlc_hw,
|
||||
extern wlc_phy_shim_info_t *wlc_phy_shim_attach(struct brcms_c_hw_info *wlc_hw,
|
||||
void *wl, void *wlc);
|
||||
extern void wlc_phy_shim_detach(wlc_phy_shim_info_t *physhim);
|
||||
|
||||
|
|
|
@ -188,9 +188,9 @@ struct wlc_bss_info {
|
|||
};
|
||||
|
||||
/* forward declarations */
|
||||
struct wlc_if;
|
||||
struct brcms_c_if;
|
||||
|
||||
/* wlc_ioctl error codes */
|
||||
/* brcms_c_ioctl error codes */
|
||||
#define WLC_ENOIOCTL 1 /* No such Ioctl */
|
||||
#define WLC_EINVAL 2 /* Invalid value */
|
||||
#define WLC_ETOOSMALL 3 /* Value too small */
|
||||
|
@ -231,14 +231,14 @@ typedef int (*dump_fn_t) (void *handle, struct brcmu_strbuf *b);
|
|||
* params/plen - parameters and length for a get, input only.
|
||||
* arg/len - buffer and length for value to be set or retrieved, input or output.
|
||||
* vsize - value size, valid for integer type only.
|
||||
* wlcif - interface context (wlc_if pointer)
|
||||
* wlcif - interface context (brcms_c_if pointer)
|
||||
*
|
||||
* All pointers may point into the same buffer.
|
||||
*/
|
||||
typedef int (*iovar_fn_t) (void *handle, const struct brcmu_iovar *vi,
|
||||
u32 actionid, const char *name, void *params,
|
||||
uint plen, void *arg, int alen, int vsize,
|
||||
struct wlc_if *wlcif);
|
||||
struct brcms_c_if *wlcif);
|
||||
|
||||
#define MAC80211_PROMISC_BCNS (1 << 0)
|
||||
#define MAC80211_SCAN (1 << 1)
|
||||
|
@ -387,10 +387,10 @@ enum wlc_par_id {
|
|||
/* forward declare and use the struct notation so we don't have to
|
||||
* have it defined if not necessary.
|
||||
*/
|
||||
struct wlc_info;
|
||||
struct wlc_hw_info;
|
||||
struct wlc_bsscfg;
|
||||
struct wlc_if;
|
||||
struct brcms_c_info;
|
||||
struct brcms_c_hw_info;
|
||||
struct brcms_c_bsscfg;
|
||||
struct brcms_c_if;
|
||||
|
||||
/***********************************************
|
||||
* Feature-related macros to optimize out code *
|
||||
|
@ -589,77 +589,85 @@ struct wlc_antselcfg {
|
|||
};
|
||||
|
||||
/* common functions for every port */
|
||||
extern void *wlc_attach(struct brcms_info *wl, u16 vendor, u16 device,
|
||||
extern void *brcms_c_attach(struct brcms_info *wl, u16 vendor, u16 device,
|
||||
uint unit, bool piomode, void *regsva, uint bustype,
|
||||
void *btparam, uint *perr);
|
||||
extern uint wlc_detach(struct wlc_info *wlc);
|
||||
extern int wlc_up(struct wlc_info *wlc);
|
||||
extern uint wlc_down(struct wlc_info *wlc);
|
||||
extern uint brcms_c_detach(struct brcms_c_info *wlc);
|
||||
extern int brcms_c_up(struct brcms_c_info *wlc);
|
||||
extern uint brcms_c_down(struct brcms_c_info *wlc);
|
||||
|
||||
extern int wlc_set(struct wlc_info *wlc, int cmd, int arg);
|
||||
extern int wlc_get(struct wlc_info *wlc, int cmd, int *arg);
|
||||
extern bool wlc_chipmatch(u16 vendor, u16 device);
|
||||
extern void wlc_init(struct wlc_info *wlc);
|
||||
extern void wlc_reset(struct wlc_info *wlc);
|
||||
extern int brcms_c_set(struct brcms_c_info *wlc, int cmd, int arg);
|
||||
extern int brcms_c_get(struct brcms_c_info *wlc, int cmd, int *arg);
|
||||
extern bool brcms_c_chipmatch(u16 vendor, u16 device);
|
||||
extern void brcms_c_init(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_reset(struct brcms_c_info *wlc);
|
||||
|
||||
extern void wlc_intrson(struct wlc_info *wlc);
|
||||
extern u32 wlc_intrsoff(struct wlc_info *wlc);
|
||||
extern void wlc_intrsrestore(struct wlc_info *wlc, u32 macintmask);
|
||||
extern bool wlc_intrsupd(struct wlc_info *wlc);
|
||||
extern bool wlc_isr(struct wlc_info *wlc, bool *wantdpc);
|
||||
extern bool wlc_dpc(struct wlc_info *wlc, bool bounded);
|
||||
extern bool wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
|
||||
struct ieee80211_hw *hw);
|
||||
extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
|
||||
struct wlc_if *wlcif);
|
||||
extern bool wlc_aggregatable(struct wlc_info *wlc, u8 tid);
|
||||
extern void brcms_c_intrson(struct brcms_c_info *wlc);
|
||||
extern u32 brcms_c_intrsoff(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_intrsrestore(struct brcms_c_info *wlc, u32 macintmask);
|
||||
extern bool brcms_c_intrsupd(struct brcms_c_info *wlc);
|
||||
extern bool brcms_c_isr(struct brcms_c_info *wlc, bool *wantdpc);
|
||||
extern bool brcms_c_dpc(struct brcms_c_info *wlc, bool bounded);
|
||||
extern bool brcms_c_sendpkt_mac80211(struct brcms_c_info *wlc,
|
||||
struct sk_buff *sdu,
|
||||
struct ieee80211_hw *hw);
|
||||
extern int brcms_c_ioctl(struct brcms_c_info *wlc, int cmd, void *arg, int len,
|
||||
struct brcms_c_if *wlcif);
|
||||
extern bool brcms_c_aggregatable(struct brcms_c_info *wlc, u8 tid);
|
||||
|
||||
/* helper functions */
|
||||
extern void wlc_statsupd(struct wlc_info *wlc);
|
||||
extern void wlc_protection_upd(struct wlc_info *wlc, uint idx, int val);
|
||||
extern int wlc_get_header_len(void);
|
||||
extern void wlc_mac_bcn_promisc_change(struct wlc_info *wlc, bool promisc);
|
||||
extern void wlc_set_addrmatch(struct wlc_info *wlc, int match_reg_offset,
|
||||
const u8 *addr);
|
||||
extern void wlc_wme_setparams(struct wlc_info *wlc, u16 aci,
|
||||
extern void brcms_c_statsupd(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_protection_upd(struct brcms_c_info *wlc, uint idx,
|
||||
int val);
|
||||
extern int brcms_c_get_header_len(void);
|
||||
extern void brcms_c_mac_bcn_promisc_change(struct brcms_c_info *wlc,
|
||||
bool promisc);
|
||||
extern void brcms_c_set_addrmatch(struct brcms_c_info *wlc,
|
||||
int match_reg_offset,
|
||||
const u8 *addr);
|
||||
extern void brcms_c_wme_setparams(struct brcms_c_info *wlc, u16 aci,
|
||||
const struct ieee80211_tx_queue_params *arg,
|
||||
bool suspend);
|
||||
extern struct wlc_pub *wlc_pub(void *wlc);
|
||||
extern struct wlc_pub *brcms_c_pub(void *wlc);
|
||||
|
||||
/* common functions for every port */
|
||||
extern void wlc_mhf(struct wlc_info *wlc, u8 idx, u16 mask, u16 val,
|
||||
extern void brcms_c_mhf(struct brcms_c_info *wlc, u8 idx, u16 mask, u16 val,
|
||||
int bands);
|
||||
extern void wlc_rate_lookup_init(struct wlc_info *wlc, wlc_rateset_t *rateset);
|
||||
extern void wlc_default_rateset(struct wlc_info *wlc, wlc_rateset_t *rs);
|
||||
extern void wlc_rate_lookup_init(struct brcms_c_info *wlc,
|
||||
wlc_rateset_t *rateset);
|
||||
extern void brcms_default_rateset(struct brcms_c_info *wlc, wlc_rateset_t *rs);
|
||||
|
||||
struct ieee80211_sta;
|
||||
extern void wlc_ampdu_flush(struct wlc_info *wlc, struct ieee80211_sta *sta,
|
||||
u16 tid);
|
||||
extern int wlc_set_par(struct wlc_info *wlc, enum wlc_par_id par_id, int val);
|
||||
extern int wlc_get_par(struct wlc_info *wlc, enum wlc_par_id par_id, int *ret_int_ptr);
|
||||
extern void wlc_ampdu_flush(struct brcms_c_info *wlc,
|
||||
struct ieee80211_sta *sta, u16 tid);
|
||||
extern int brcms_c_set_par(struct brcms_c_info *wlc, enum wlc_par_id par_id,
|
||||
int val);
|
||||
extern int brcms_c_get_par(struct brcms_c_info *wlc, enum wlc_par_id par_id,
|
||||
int *ret_int_ptr);
|
||||
extern char *getvar(char *vars, const char *name);
|
||||
extern int getintvar(char *vars, const char *name);
|
||||
|
||||
/* wlc_phy.c helper functions */
|
||||
extern void wlc_set_ps_ctrl(struct wlc_info *wlc);
|
||||
extern void wlc_mctrl(struct wlc_info *wlc, u32 mask, u32 val);
|
||||
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 int wlc_module_register(struct wlc_pub *pub,
|
||||
extern int brcms_c_module_register(struct wlc_pub *pub,
|
||||
const char *name, void *hdl,
|
||||
watchdog_fn_t watchdog_fn, down_fn_t down_fn);
|
||||
extern int wlc_module_unregister(struct wlc_pub *pub, const char *name,
|
||||
extern int brcms_c_module_unregister(struct wlc_pub *pub, const char *name,
|
||||
void *hdl);
|
||||
extern void wlc_suspend_mac_and_wait(struct wlc_info *wlc);
|
||||
extern void wlc_enable_mac(struct wlc_info *wlc);
|
||||
extern void wlc_associate_upd(struct wlc_info *wlc, bool state);
|
||||
extern void wlc_scan_start(struct wlc_info *wlc);
|
||||
extern void wlc_scan_stop(struct wlc_info *wlc);
|
||||
extern int wlc_get_curband(struct wlc_info *wlc);
|
||||
extern void wlc_wait_for_tx_completion(struct wlc_info *wlc, bool drop);
|
||||
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_associate_upd(struct brcms_c_info *wlc, bool state);
|
||||
extern void brcms_c_scan_start(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_scan_stop(struct brcms_c_info *wlc);
|
||||
extern int brcms_c_get_curband(struct brcms_c_info *wlc);
|
||||
extern void brcms_c_wait_for_tx_completion(struct brcms_c_info *wlc,
|
||||
bool drop);
|
||||
|
||||
/* helper functions */
|
||||
extern bool wlc_check_radio_disabled(struct wlc_info *wlc);
|
||||
extern bool wlc_radio_monitor_stop(struct wlc_info *wlc);
|
||||
extern bool brcms_c_check_radio_disabled(struct brcms_c_info *wlc);
|
||||
extern bool wlc_radio_monitor_stop(struct brcms_c_info *wlc);
|
||||
|
||||
#define MAXBANDS 2 /* Maximum #of bands */
|
||||
/* bandstate array indices */
|
||||
|
|
|
@ -31,13 +31,13 @@
|
|||
#define WLC_STF_SS_STBC_RX(wlc) (WLCISNPHY(wlc->band) && \
|
||||
NREV_GT(wlc->band->phyrev, 3) && NREV_LE(wlc->band->phyrev, 6))
|
||||
|
||||
static bool wlc_stf_stbc_tx_set(struct wlc_info *wlc, s32 int_val);
|
||||
static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 val);
|
||||
static int wlc_stf_spatial_policy_set(struct wlc_info *wlc, int val);
|
||||
static void wlc_stf_stbc_rx_ht_update(struct wlc_info *wlc, int val);
|
||||
static bool wlc_stf_stbc_tx_set(struct brcms_c_info *wlc, s32 int_val);
|
||||
static int wlc_stf_txcore_set(struct brcms_c_info *wlc, u8 Nsts, u8 val);
|
||||
static int wlc_stf_spatial_policy_set(struct brcms_c_info *wlc, int val);
|
||||
static void wlc_stf_stbc_rx_ht_update(struct brcms_c_info *wlc, int val);
|
||||
|
||||
static void _wlc_stf_phy_txant_upd(struct wlc_info *wlc);
|
||||
static u16 _wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec);
|
||||
static void _wlc_stf_phy_txant_upd(struct brcms_c_info *wlc);
|
||||
static u16 _wlc_stf_phytxchain_sel(struct brcms_c_info *wlc, ratespec_t rspec);
|
||||
|
||||
#define NSTS_1 1
|
||||
#define NSTS_2 2
|
||||
|
@ -51,7 +51,7 @@ const u8 txcore_default[5] = {
|
|||
(0x0f) /* For Nsts = 4, enable all cores */
|
||||
};
|
||||
|
||||
static void wlc_stf_stbc_rx_ht_update(struct wlc_info *wlc, int val)
|
||||
static void wlc_stf_stbc_rx_ht_update(struct brcms_c_info *wlc, int val)
|
||||
{
|
||||
/* MIMOPHYs rev3-6 cannot receive STBC with only one rx core active */
|
||||
if (WLC_STF_SS_STBC_RX(wlc)) {
|
||||
|
@ -63,13 +63,13 @@ static void wlc_stf_stbc_rx_ht_update(struct wlc_info *wlc, int val)
|
|||
wlc->ht_cap.cap_info |= (val << IEEE80211_HT_CAP_RX_STBC_SHIFT);
|
||||
|
||||
if (wlc->pub->up) {
|
||||
wlc_update_beacon(wlc);
|
||||
wlc_update_probe_resp(wlc, true);
|
||||
brcms_c_update_beacon(wlc);
|
||||
brcms_c_update_probe_resp(wlc, true);
|
||||
}
|
||||
}
|
||||
|
||||
/* every WLC_TEMPSENSE_PERIOD seconds temperature check to decide whether to turn on/off txchain */
|
||||
void wlc_tempsense_upd(struct wlc_info *wlc)
|
||||
void wlc_tempsense_upd(struct brcms_c_info *wlc)
|
||||
{
|
||||
wlc_phy_t *pi = wlc->band->pi;
|
||||
uint active_chains, txchain;
|
||||
|
@ -93,7 +93,7 @@ void wlc_tempsense_upd(struct wlc_info *wlc)
|
|||
}
|
||||
|
||||
void
|
||||
wlc_stf_ss_algo_channel_get(struct wlc_info *wlc, u16 *ss_algo_channel,
|
||||
wlc_stf_ss_algo_channel_get(struct brcms_c_info *wlc, u16 *ss_algo_channel,
|
||||
chanspec_t chanspec)
|
||||
{
|
||||
tx_power_t power;
|
||||
|
@ -134,7 +134,7 @@ wlc_stf_ss_algo_channel_get(struct wlc_info *wlc, u16 *ss_algo_channel,
|
|||
setbit(ss_algo_channel, PHY_TXC1_MODE_STBC);
|
||||
}
|
||||
|
||||
static bool wlc_stf_stbc_tx_set(struct wlc_info *wlc, s32 int_val)
|
||||
static bool wlc_stf_stbc_tx_set(struct brcms_c_info *wlc, s32 int_val)
|
||||
{
|
||||
if ((int_val != AUTO) && (int_val != OFF) && (int_val != ON)) {
|
||||
return false;
|
||||
|
@ -155,7 +155,7 @@ static bool wlc_stf_stbc_tx_set(struct wlc_info *wlc, s32 int_val)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool wlc_stf_stbc_rx_set(struct wlc_info *wlc, s32 int_val)
|
||||
bool wlc_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val)
|
||||
{
|
||||
if ((int_val != HT_CAP_RX_STBC_NO)
|
||||
&& (int_val != HT_CAP_RX_STBC_ONE_STREAM)) {
|
||||
|
@ -172,7 +172,7 @@ bool wlc_stf_stbc_rx_set(struct wlc_info *wlc, s32 int_val)
|
|||
return true;
|
||||
}
|
||||
|
||||
static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 core_mask)
|
||||
static int wlc_stf_txcore_set(struct brcms_c_info *wlc, u8 Nsts, u8 core_mask)
|
||||
{
|
||||
BCMMSG(wlc->wiphy, "wl%d: Nsts %d core_mask %x\n",
|
||||
wlc->pub->unit, Nsts, core_mask);
|
||||
|
@ -196,16 +196,16 @@ static int wlc_stf_txcore_set(struct wlc_info *wlc, u8 Nsts, u8 core_mask)
|
|||
wlc->stf->phytxant = core_mask << PHY_TXC_ANT_SHIFT;
|
||||
brcms_b_txant_set(wlc->hw, wlc->stf->phytxant);
|
||||
if (wlc->clk) {
|
||||
wlc_suspend_mac_and_wait(wlc);
|
||||
wlc_beacon_phytxctl_txant_upd(wlc, wlc->bcn_rspec);
|
||||
wlc_enable_mac(wlc);
|
||||
brcms_c_suspend_mac_and_wait(wlc);
|
||||
brcms_c_beacon_phytxctl_txant_upd(wlc, wlc->bcn_rspec);
|
||||
brcms_c_enable_mac(wlc);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wlc_stf_spatial_policy_set(struct wlc_info *wlc, int val)
|
||||
static int wlc_stf_spatial_policy_set(struct brcms_c_info *wlc, int val)
|
||||
{
|
||||
int i;
|
||||
u8 core_mask = 0;
|
||||
|
@ -221,7 +221,7 @@ static int wlc_stf_spatial_policy_set(struct wlc_info *wlc, int val)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int wlc_stf_txchain_set(struct wlc_info *wlc, s32 int_val, bool force)
|
||||
int wlc_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val, bool force)
|
||||
{
|
||||
u8 txchain = (u8) int_val;
|
||||
u8 txstreams;
|
||||
|
@ -288,7 +288,7 @@ int wlc_stf_txchain_set(struct wlc_info *wlc, s32 int_val, bool force)
|
|||
}
|
||||
|
||||
/* update wlc->stf->ss_opmode which represents the operational stf_ss mode we're using */
|
||||
int wlc_stf_ss_update(struct wlc_info *wlc, struct wlcband *band)
|
||||
int wlc_stf_ss_update(struct brcms_c_info *wlc, struct brcms_c_band *band)
|
||||
{
|
||||
int ret_code = 0;
|
||||
u8 prev_stf_ss;
|
||||
|
@ -320,7 +320,7 @@ int wlc_stf_ss_update(struct wlc_info *wlc, struct wlcband *band)
|
|||
return ret_code;
|
||||
}
|
||||
|
||||
int wlc_stf_attach(struct wlc_info *wlc)
|
||||
int wlc_stf_attach(struct brcms_c_info *wlc)
|
||||
{
|
||||
wlc->bandstate[BAND_2G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_SISO;
|
||||
wlc->bandstate[BAND_5G_INDEX]->band_stf_ss_mode = PHY_TXC1_MODE_CDD;
|
||||
|
@ -343,7 +343,7 @@ int wlc_stf_attach(struct wlc_info *wlc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void wlc_stf_detach(struct wlc_info *wlc)
|
||||
void wlc_stf_detach(struct brcms_c_info *wlc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ void wlc_stf_detach(struct wlc_info *wlc)
|
|||
* do tx-antenna selection for SISO transmissions
|
||||
* for NREV>=7, bit 6 and bit 7 mean antenna 0 and 1 respectively, nit6+bit7 means both cores active
|
||||
*/
|
||||
static void _wlc_stf_phy_txant_upd(struct wlc_info *wlc)
|
||||
static void _wlc_stf_phy_txant_upd(struct brcms_c_info *wlc)
|
||||
{
|
||||
s8 txant;
|
||||
|
||||
|
@ -399,12 +399,12 @@ static void _wlc_stf_phy_txant_upd(struct wlc_info *wlc)
|
|||
brcms_b_txant_set(wlc->hw, wlc->stf->phytxant);
|
||||
}
|
||||
|
||||
void wlc_stf_phy_txant_upd(struct wlc_info *wlc)
|
||||
void wlc_stf_phy_txant_upd(struct brcms_c_info *wlc)
|
||||
{
|
||||
_wlc_stf_phy_txant_upd(wlc);
|
||||
}
|
||||
|
||||
void wlc_stf_phy_chain_calc(struct wlc_info *wlc)
|
||||
void wlc_stf_phy_chain_calc(struct brcms_c_info *wlc)
|
||||
{
|
||||
/* get available rx/tx chains */
|
||||
wlc->stf->hw_txchain = (u8) getintvar(wlc->pub->vars, "txchain");
|
||||
|
@ -441,7 +441,7 @@ void wlc_stf_phy_chain_calc(struct wlc_info *wlc)
|
|||
wlc_stf_spatial_policy_set(wlc, MIN_SPATIAL_EXPANSION);
|
||||
}
|
||||
|
||||
static u16 _wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec)
|
||||
static u16 _wlc_stf_phytxchain_sel(struct brcms_c_info *wlc, ratespec_t rspec)
|
||||
{
|
||||
u16 phytxant = wlc->stf->phytxant;
|
||||
|
||||
|
@ -453,12 +453,12 @@ static u16 _wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec)
|
|||
return phytxant;
|
||||
}
|
||||
|
||||
u16 wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec)
|
||||
u16 wlc_stf_phytxchain_sel(struct brcms_c_info *wlc, ratespec_t rspec)
|
||||
{
|
||||
return _wlc_stf_phytxchain_sel(wlc, rspec);
|
||||
}
|
||||
|
||||
u16 wlc_stf_d11hdrs_phyctl_txant(struct wlc_info *wlc, ratespec_t rspec)
|
||||
u16 wlc_stf_d11hdrs_phyctl_txant(struct brcms_c_info *wlc, ratespec_t rspec)
|
||||
{
|
||||
u16 phytxant = wlc->stf->phytxant;
|
||||
u16 mask = PHY_TXC_ANT_MASK;
|
||||
|
|
|
@ -19,20 +19,23 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
extern int wlc_stf_attach(struct wlc_info *wlc);
|
||||
extern void wlc_stf_detach(struct wlc_info *wlc);
|
||||
extern int wlc_stf_attach(struct brcms_c_info *wlc);
|
||||
extern void wlc_stf_detach(struct brcms_c_info *wlc);
|
||||
|
||||
extern void wlc_tempsense_upd(struct wlc_info *wlc);
|
||||
extern void wlc_stf_ss_algo_channel_get(struct wlc_info *wlc,
|
||||
extern void wlc_tempsense_upd(struct brcms_c_info *wlc);
|
||||
extern void wlc_stf_ss_algo_channel_get(struct brcms_c_info *wlc,
|
||||
u16 *ss_algo_channel,
|
||||
chanspec_t chanspec);
|
||||
extern int wlc_stf_ss_update(struct wlc_info *wlc, struct wlcband *band);
|
||||
extern void wlc_stf_phy_txant_upd(struct wlc_info *wlc);
|
||||
extern int wlc_stf_txchain_set(struct wlc_info *wlc, s32 int_val, bool force);
|
||||
extern bool wlc_stf_stbc_rx_set(struct wlc_info *wlc, s32 int_val);
|
||||
extern void wlc_stf_phy_txant_upd(struct wlc_info *wlc);
|
||||
extern void wlc_stf_phy_chain_calc(struct wlc_info *wlc);
|
||||
extern u16 wlc_stf_phytxchain_sel(struct wlc_info *wlc, ratespec_t rspec);
|
||||
extern u16 wlc_stf_d11hdrs_phyctl_txant(struct wlc_info *wlc, ratespec_t rspec);
|
||||
extern int wlc_stf_ss_update(struct brcms_c_info *wlc,
|
||||
struct brcms_c_band *band);
|
||||
extern void wlc_stf_phy_txant_upd(struct brcms_c_info *wlc);
|
||||
extern int wlc_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val,
|
||||
bool force);
|
||||
extern bool wlc_stf_stbc_rx_set(struct brcms_c_info *wlc, s32 int_val);
|
||||
extern void wlc_stf_phy_txant_upd(struct brcms_c_info *wlc);
|
||||
extern void wlc_stf_phy_chain_calc(struct brcms_c_info *wlc);
|
||||
extern u16 wlc_stf_phytxchain_sel(struct brcms_c_info *wlc, ratespec_t rspec);
|
||||
extern u16 wlc_stf_d11hdrs_phyctl_txant(struct brcms_c_info *wlc,
|
||||
ratespec_t rspec);
|
||||
|
||||
#endif /* _BRCM_STF_H_ */
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
* Defaults for tunables (e.g. sizing constants)
|
||||
*
|
||||
* For each new tunable, add a member to the end
|
||||
* of wlc_tunables_t in wlc_pub.h to enable
|
||||
* of wlc_tunables_t in brcms_c_pub.h to enable
|
||||
* runtime checks of tunable values. (Directly
|
||||
* using the macros in code invalidates ROM code)
|
||||
*
|
||||
|
@ -235,7 +235,7 @@
|
|||
#define WLC_AMPDUDATAHIWAT 255
|
||||
|
||||
/* bounded rx loops */
|
||||
#define RXBND 8 /* max # frames to process in wlc_recv() */
|
||||
#define RXBND 8 /* max # frames to process in brcms_c_recv() */
|
||||
#define TXSBND 8 /* max # tx status to process in wlc_txstatus() */
|
||||
|
||||
#define WLBANDINITFN(_fn) _fn
|
||||
|
@ -355,22 +355,22 @@ typedef u32 mbool;
|
|||
/* forward declarations */
|
||||
struct sk_buff;
|
||||
struct brcms_info;
|
||||
struct wlc_info;
|
||||
struct wlc_hw_info;
|
||||
struct wlc_if;
|
||||
struct brcms_c_info;
|
||||
struct brcms_c_hw_info;
|
||||
struct brcms_c_if;
|
||||
struct brcms_if;
|
||||
struct ampdu_info;
|
||||
struct antsel_info;
|
||||
struct bmac_pmq;
|
||||
struct d11init;
|
||||
struct dma_pub;
|
||||
struct wlc_bsscfg;
|
||||
struct brcms_c_bsscfg;
|
||||
struct brcmu_strbuf;
|
||||
struct si_pub;
|
||||
struct wiphy;
|
||||
struct brcmu_iovar;
|
||||
struct wlc_txq_info;
|
||||
struct wlcband;
|
||||
struct brcms_c_txq_info;
|
||||
struct brcms_c_band;
|
||||
|
||||
typedef struct gpioh_item gpioh_item_t;
|
||||
typedef struct si_info si_info_t;
|
||||
|
|
Загрузка…
Ссылка в новой задаче