#define BRCMS_HWRXOFF 38 /* chip rx buffer offset */
-#define OSL_SYSUPTIME() ((u32)jiffies * (1000 / HZ))
-
/*
* driver maintains internal 'tick'(wlc->pub->now) which increments in 1s
* OS timer(soft watchdog) it is not a wall clock and won't increment when
* inits to populate a bogus beacon.
*/
if (BRCMS_PHY_11N_CAP(wlc->band))
- brcms_c_write_shm(wlc, M_BCN_TXTSF_OFFSET,
- wlc->band->bcntsfoff);
+ brcms_c_write_shm(wlc, M_BCN_TXTSF_OFFSET, 0);
}
} else {
/* disable an active IBSS if we are not on the home channel */
void brcms_c_mac_bcn_promisc(struct brcms_c_info *wlc)
{
- if (wlc->bcnmisc_ibss || wlc->bcnmisc_scan || wlc->bcnmisc_monitor)
+ if (wlc->bcnmisc_monitor)
brcms_c_mctrl(wlc, MCTL_BCNS_PROMISC, MCTL_BCNS_PROMISC);
else
brcms_c_mctrl(wlc, MCTL_BCNS_PROMISC, 0);
WL_RADIO_MPC_DISABLE);
if (wlc->mpc && brcms_c_ismpc(wlc))
wlc->mpc_offcnt = 0;
- wlc->mpc_laston_ts = OSL_SYSUPTIME();
}
}
if (BRCMS_SGI_CAP_PHY(wlc)) {
brcms_c_ht_update_sgi_rx(wlc, (BRCMS_N_SGI_20 |
BRCMS_N_SGI_40));
- wlc->sgi_tx = AUTO;
} else if (BRCMS_ISSSLPNPHY(wlc->band)) {
brcms_c_ht_update_sgi_rx(wlc, (BRCMS_N_SGI_20 |
BRCMS_N_SGI_40));
- wlc->sgi_tx = AUTO;
} else {
brcms_c_ht_update_sgi_rx(wlc, 0);
- wlc->sgi_tx = OFF;
}
/* *******nvram 11n config overrides Start ********* */
- /* apply the sgi override from nvram conf */
- if (n_disabled & WLFEATURE_DISABLE_11N_SGI_TX)
- wlc->sgi_tx = OFF;
-
if (n_disabled & WLFEATURE_DISABLE_11N_SGI_RX)
brcms_c_ht_update_sgi_rx(wlc, 0);
wlc->mpc_dlycnt = BRCMS_MPC_MAX_DELAYCNT;
else
wlc->mpc_dlycnt = BRCMS_MPC_MIN_DELAYCNT;
- wlc->mpc_dur += OSL_SYSUPTIME() - wlc->mpc_laston_ts;
}
/*
* Below logic is meant to capture the transition from mpc off
if (config == true)
brcms_c_protection_upd(wlc, BRCMS_PROT_G_USER, gmode);
- /* Clear supported rates filter */
- memset(&wlc->sup_rates_override, 0, sizeof(struct brcms_c_rateset));
-
/* Clear rateset override */
memset(&rs, 0, sizeof(struct brcms_c_rateset));
if (eprec >= 0) {
bool discard_oldest;
- discard_oldest = ac_bitmap_tst(wlc->wme_dp, eprec);
+ discard_oldest = ac_bitmap_tst(0, eprec);
/* Refuse newer packet unless configured to discard oldest */
if (eprec == prec && !discard_oldest) {
u16 CWmin; /* minimum size of contention window, in unit of aSlotTime */
u16 CWmax; /* maximum size of contention window, in unit of aSlotTime */
- u16 bcntsfoff; /* beacon tsf offset */
-};
-
-struct pkt_cb {
- /* function to call when tx frame completes */
- /* tx completion callback takes 3 args */
- void (*fn)(struct brcms_c_info *wlc, uint txstatus, void *arg);
-
- void *arg; /* void arg for fn */
- u8 nextidx; /* index of next call back if threading */
- bool entered; /* recursion check */
};
/* module control blocks */
struct modulecb {
/* module name : NULL indicates empty array member */
char name[32];
- /* iovar table */
- const struct brcmu_iovar *iovars;
/* handle passed when handler 'doiovar' is called */
struct brcms_info *hdl;
- /* IOVar handler
- *
- * handle - a pointer value registered with the function
- * vi - iovar_info that was looked up
- * actionid - action ID, calculated by IOV_GVAL() and IOV_SVAL()
- * based on varid.
- * name - the actual iovar name
- * 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 (brcms_c_if pointer)
- *
- * All pointers may point into the same buffer.
- */
- int (*iovar_fn)(void *handle, const struct brcmu_iovar *vi,
- u32 actionid, const char *name, void *params,
- uint plen, void *arg, int alen, int vsize);
-
int (*down_fn)(void *handle); /* down handler. Note: the int returned
* by the down function is a count of the
* number of timers that could not be
* wdtimer: timer for watchdog routine.
* radio_timer: timer for hw radio button monitor routine.
* monitor: monitor (MPDU sniffing) mode.
- * bcnmisc_ibss: bcns promisc mode override for IBSS.
- * bcnmisc_scan: bcns promisc mode override for scan.
* bcnmisc_monitor: bcns promisc mode override for monitor.
* _rifs: enable per-packet rifs.
- * sgi_tx: sgi tx.
* bcn_li_bcn: beacon listen interval in # beacons.
* bcn_li_dtim: beacon listen interval in # dtims.
* WDarmed: watchdog timer is armed.
* WDlast: last time wlc_watchdog() was called.
- * wme_dp: AC bitmap. Discard (oldest first) policy per AC.
* edcf_txop[AC_COUNT]: current txop for each ac.
* wme_param_ie: on STA contains parameters in use locally, and on AP
* contains parameters advertised
* autocountry_default: initial country for 802.11d auto-country mode.
* prb_resp_timeout: do not send prb resp if request older
* than this, 0 = disable.
- * sup_rates_override: use only these rates in 11g supported rates if specified.
* home_chanspec: shared home chanspec.
* chanspec: target operational channel.
* usr_fragthresh: user configured fragmentation threshold.
* tx_duty_cycle_ofdm: maximum allowed duty cycle for OFDM.
* tx_duty_cycle_cck: maximum allowed duty cycle for CCK.
* pkt_queue: txq for transmit packets.
- * mpc_dur: total time (ms) in mpc mode except for the portion since
- * radio is turned off last time.
- * mpc_laston_ts: timestamp (ms) when radio is turned off last time.
* wiphy:
*/
struct brcms_c_info {
/* promiscuous */
bool monitor;
- bool bcnmisc_ibss;
- bool bcnmisc_scan;
bool bcnmisc_monitor;
/* driver feature */
bool _rifs;
- s8 sgi_tx;
/* AP-STA synchronization, power save */
u8 bcn_li_bcn;
u32 WDlast;
/* WME */
- u8 wme_dp;
u16 edcf_txop[AC_COUNT];
struct wme_param_ie wme_param_ie;
char country_default[BRCM_CNTRY_BUF_SZ];
char autocountry_default[BRCM_CNTRY_BUF_SZ];
u16 prb_resp_timeout;
- struct brcms_c_rateset sup_rates_override;
u16 home_chanspec;
u16 tx_duty_cycle_cck;
struct brcms_txq_info *pkt_queue;
- u32 mpc_dur;
- u32 mpc_laston_ts;
struct wiphy *wiphy;
};