提交 29efb1a9 编写于 作者: B Brett Rudley 提交者: Greg Kroah-Hartman

staging: brcm80211: unifdef -UWLC_HIGH_ONLY

Part of BMAC removal.
Signed-off-by: NBrett Rudley <brudley@broadcom.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 2cb8ada6
......@@ -122,11 +122,7 @@ typedef struct shared_phy shared_phy_t;
struct phy_pub;
#ifdef WLC_HIGH_ONLY
typedef struct wlc_rpc_phy wlc_phy_t;
#else
typedef struct phy_pub wlc_phy_t;
#endif
typedef struct shared_phy_params {
void *osh;
......
......@@ -67,12 +67,8 @@ struct wl_info {
int irq;
#ifdef WLC_HIGH_ONLY
struct semaphore sem; /* use semaphore to allow sleep */
#else
spinlock_t lock; /* per-device perimeter lock */
spinlock_t isr_lock; /* per-device ISR synchronization lock */
#endif
uint bcm_bustype; /* bus type */
bool piomode; /* set from insmod argument */
void *regsva; /* opaque chip registers virtual address */
......@@ -88,30 +84,12 @@ struct wl_info {
u32 pci_psstate[16]; /* pci ps-state save/restore */
#endif
/* RPC, handle, lock, txq, workitem */
#ifdef WLC_HIGH_ONLY
rpc_info_t *rpc; /* RPC handle */
rpc_tp_info_t *rpc_th; /* RPC transport handle */
wlc_rpc_ctx_t rpc_dispatch_ctx;
bool rpcq_dispatched; /* Avoid scheduling multiple tasks */
spinlock_t rpcq_lock; /* Lock for the queue */
rpc_buf_t *rpcq_head; /* RPC Q */
rpc_buf_t *rpcq_tail; /* Points to the last buf */
bool txq_dispatched; /* Avoid scheduling multiple tasks */
spinlock_t txq_lock; /* Lock for the queue */
struct sk_buff *txq_head; /* TX Q */
struct sk_buff *txq_tail; /* Points to the last buf */
wl_task_t txq_task; /* work queue for wl_start() */
#endif /* WLC_HIGH_ONLY */
uint stats_id; /* the current set of stats */
/* ping-pong stats counters updated by Linux watchdog */
struct net_device_stats stats_watchdog[2];
struct wl_firmware fw;
};
#ifndef WLC_HIGH_ONLY
#define WL_LOCK(wl) spin_lock_bh(&(wl)->lock)
#define WL_UNLOCK(wl) spin_unlock_bh(&(wl)->lock)
......@@ -122,14 +100,6 @@ struct wl_info {
/* locking under WL_LOCK() to synchronize with wl_isr */
#define INT_LOCK(wl, flags) spin_lock_irqsave(&(wl)->isr_lock, flags)
#define INT_UNLOCK(wl, flags) spin_unlock_irqrestore(&(wl)->isr_lock, flags)
#else /* BCMSDIO */
#define WL_LOCK(wl) down(&(wl)->sem)
#define WL_UNLOCK(wl) up(&(wl)->sem)
#define WL_ISRLOCK(wl)
#define WL_ISRUNLOCK(wl)
#endif /* WLC_HIGH_ONLY */
/* handle forward declaration */
typedef struct wl_info wl_info_t;
......
......@@ -63,11 +63,6 @@ void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
tunables->ampdudatahiwat = WLC_AMPDUDATAHIWAT;
tunables->rxbnd = RXBND;
tunables->txsbnd = TXSBND;
#if defined(WLC_HIGH_ONLY) && defined(NTXD_USB_4319)
if (devid == BCM4319_CHIP_ID) {
tunables->ntxd = NTXD_USB_4319;
}
#endif /* WLC_HIGH_ONLY */
}
static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err,
......
......@@ -38,10 +38,6 @@
#include <wl_export.h>
#include <wl_dbg.h>
#ifdef WLC_HIGH_ONLY
#include <bcm_rpc_tp.h>
#include <wlc_rpctx.h>
#endif
#define AMPDU_MAX_MPDU 32 /* max number of mpdus in an ampdu */
#define AMPDU_NUM_MPDU_LEGACY 16 /* max number of mpdus in an ampdu to a legacy */
......@@ -126,11 +122,6 @@ struct ampdu_info {
*/
wlc_fifo_info_t fifo_tb[NUM_FFPLD_FIFO]; /* table of fifo infos */
#ifdef WLC_HIGH_ONLY
void *p;
tx_status_t txs;
bool waiting_status; /* To help sanity checks */
#endif
};
#define AMPDU_CLEANUPFLAG_RX (0x1)
......@@ -210,10 +201,6 @@ ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc)
ampdu->rx_factor = AMPDU_RX_FACTOR_32K;
else
ampdu->rx_factor = AMPDU_RX_FACTOR_64K;
#ifdef WLC_HIGH_ONLY
/* Restrict to smaller rcv size for BMAC dongle */
ampdu->rx_factor = AMPDU_RX_FACTOR_32K;
#endif
ampdu->retry_limit = AMPDU_DEF_RETRY_LIMIT;
ampdu->rr_retry_limit = AMPDU_DEF_RR_RETRY_LIMIT;
......@@ -887,19 +874,9 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
if (frameid & TXFID_RATE_PROBE_MASK) {
WL_ERROR(("%s: XXX what to do with TXFID_RATE_PROBE_MASK!?\n", __func__));
}
#ifdef WLC_HIGH_ONLY
if (wlc->rpc_agg & BCM_RPC_TP_HOST_AGG_AMPDU)
bcm_rpc_tp_agg_set(bcm_rpc_tp_get(wlc->rpc),
BCM_RPC_TP_HOST_AGG_AMPDU, true);
#endif
for (i = 0; i < count; i++)
wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1),
ampdu->txpkt_weight);
#ifdef WLC_HIGH_ONLY
if (wlc->rpc_agg & BCM_RPC_TP_HOST_AGG_AMPDU)
bcm_rpc_tp_agg_set(bcm_rpc_tp_get(wlc->rpc),
BCM_RPC_TP_HOST_AGG_AMPDU, false);
#endif
}
/* endif (count) */
......@@ -967,31 +944,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini);
}
#ifdef WLC_HIGH_ONLY
void wlc_ampdu_txstatus_complete(ampdu_info_t *ampdu, u32 s1, u32 s2)
{
WL_AMPDU_TX(("wl%d: wlc_ampdu_txstatus_complete: High Recvd 0x%x 0x%x p:%p\n", ampdu->wlc->pub->unit, s1, s2, ampdu->p));
ASSERT(ampdu->waiting_status);
/* The packet may have been freed if the SCB went away, if so, then still free the
* DMA chain
*/
if (ampdu->p) {
struct ieee80211_tx_info *tx_info;
struct scb *scb;
tx_info = IEEE80211_SKB_CB(ampdu->p);
scb = (struct scb *)tx_info->control.sta->drv_priv;
wlc_ampdu_dotxstatus_complete(ampdu, scb, ampdu->p, &ampdu->txs,
s1, s2);
ampdu->p = NULL;
}
ampdu->waiting_status = false;
}
#endif /* WLC_HIGH_ONLY */
void rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
tx_status_t *txs, u8 mcs);
......@@ -1117,11 +1069,6 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p,
if (wlc_ffpld_check_txfunfl(wlc, prio2fifo[tid])
> 0) {
tx_error = true;
#ifdef WLC_HIGH_ONLY
/* With BMAC, TX Underflows should not happen */
WL_ERROR(("wl%d: BMAC TX Underflow?",
wlc->pub->unit));
#endif
}
}
} else if (txs->phyerr) {
......
......@@ -32,9 +32,5 @@ extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu);
extern u8 wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
ratespec_t rspec, int phylen);
extern void scb_ampdu_cleanup(ampdu_info_t *ampdu, struct scb *scb);
#ifdef WLC_HIGH_ONLY
extern void wlc_ampdu_txstatus_complete(ampdu_info_t *ampdu, u32 s1,
u32 s2);
#endif
#endif /* _wlc_ampdu_h_ */
......@@ -242,16 +242,6 @@ extern void wlc_bmac_retrylimit_upd(wlc_hw_info_t *wlc_hw, u16 SRL,
extern void wlc_bmac_fifoerrors(wlc_hw_info_t *wlc_hw);
#ifdef WLC_HIGH_ONLY
extern void wlc_bmac_dngl_reboot(rpc_info_t *);
extern void wlc_bmac_dngl_rpc_agg(rpc_info_t *, u16 agg);
extern void wlc_bmac_dngl_rpc_msglevel(rpc_info_t *, u16 level);
extern void wlc_bmac_dngl_rpc_txq_wm_set(rpc_info_t *rpc, u32 wm);
extern void wlc_bmac_dngl_rpc_txq_wm_get(rpc_info_t *rpc, u32 *wm);
extern void wlc_bmac_dngl_rpc_agg_limit_set(rpc_info_t *rpc, u32 val);
extern void wlc_bmac_dngl_rpc_agg_limit_get(rpc_info_t *rpc, u32 *pval);
extern int wlc_bmac_debug_template(wlc_hw_info_t *wlc_hw);
#endif
/* API for BMAC driver (e.g. wlc_phy.c etc) */
......
......@@ -53,23 +53,10 @@
#else
#include "d11ucode_ext.h"
#endif
#ifdef WLC_HIGH_ONLY
#include <bcm_rpc_tp.h>
#include <bcm_rpc.h>
#include <bcm_xdr.h>
#include <wlc_rpc.h>
#include <wlc_rpctx.h>
#endif /* WLC_HIGH_ONLY */
#include <wlc_alloc.h>
#include <net/mac80211.h>
#include <wl_dbg.h>
#ifdef WLC_HIGH_ONLY
#undef R_REG
#undef W_REG
#define R_REG(osh, r) RPC_READ_REG(osh, r)
#define W_REG(osh, r, v) RPC_WRITE_REG(osh, r, v)
#endif
/*
* buffer length needed for wlc_format_ssid
......@@ -109,12 +96,8 @@
/* To inform the ucode of the last mcast frame posted so that it can clear moredata bit */
#define BCMCFID(wlc, fid) wlc_bmac_write_shm((wlc)->hw, M_BCMC_FID, (fid))
#ifndef WLC_HIGH_ONLY
#define WLC_WAR16165(wlc) (BUSTYPE(wlc->pub->sih->bustype) == PCI_BUS && \
(!AP_ENAB(wlc->pub)) && (wlc->war16165))
#else
#define WLC_WAR16165(wlc) (false)
#endif /* WLC_HIGH_ONLY */
/* debug/trace */
uint wl_msg_level =
......@@ -401,22 +384,6 @@ void wlc_reset(wlc_info_t *wlc)
wlc_ampdu_reset(wlc->ampdu);
wlc->txretried = 0;
#ifdef WLC_HIGH_ONLY
/* Need to set a flag(to be cleared asynchronously by BMAC driver with high call)
* in order to prevent wlc_rpctx_txreclaim() from screwing wlc_rpctx_getnexttxp(),
* which could be invoked by already QUEUED high call(s) from BMAC driver before
* wlc_bmac_reset() finishes.
* It's not needed before in monolithic driver model because d11core interrupts would
* have been cleared instantly in wlc_bmac_reset() and no txstatus interrupt
* will come to driver to fetch those flushed dma pkt pointers.
*/
wlc->reset_bmac_pending = true;
wlc_rpctx_txreclaim(wlc->rpctx);
wlc_stf_phy_txant_upd(wlc);
wlc_phy_ant_rxdiv_set(wlc->band->pi, wlc->stf->ant_rx_ovr);
#endif
}
void wlc_fatal_error(wlc_info_t *wlc)
......@@ -1858,10 +1825,6 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
/* propagate *vars* from BMAC driver to high driver */
wlc_bmac_copyfrom_vars(wlc->hw, &pub->vars, &wlc->vars_size);
#ifdef WLC_HIGH_ONLY
WL_TRACE(("nvram : vars %p , vars_size %d\n", pub->vars,
wlc->vars_size));
#endif
/* set maximum allowed duty cycle */
wlc->tx_duty_cycle_ofdm =
......@@ -2139,134 +2102,6 @@ static bool wlc_attach_stf_ant_init(wlc_info_t *wlc)
return true;
}
#ifdef WLC_HIGH_ONLY
/* HIGH_ONLY bmac_attach, which sync over LOW_ONLY bmac_attach states */
int wlc_bmac_attach(wlc_info_t *wlc, u16 vendor, u16 device, uint unit,
bool piomode, struct osl_info *osh, void *regsva,
uint bustype, void *btparam)
{
wlc_bmac_revinfo_t revinfo;
uint idx = 0;
rpc_info_t *rpc = (rpc_info_t *) btparam;
ASSERT(bustype == RPC_BUS);
/* install the rpc handle in the various state structures used by stub RPC functions */
wlc->rpc = rpc;
wlc->hw->rpc = rpc;
wlc->hw->osh = osh;
wlc->regs = 0;
wlc->rpctx = wlc_rpctx_attach(wlc->pub, wlc);
if (wlc->rpctx == NULL)
return -1;
/*
* FIFO 0
* TX: TX_AC_BK_FIFO (TX AC Background data packets)
*/
/* Always initialized */
ASSERT(NRPCTXBUFPOST <= NTXD);
wlc_rpctx_fifoinit(wlc->rpctx, TX_DATA_FIFO, NRPCTXBUFPOST);
wlc_rpctx_fifoinit(wlc->rpctx, TX_CTL_FIFO, NRPCTXBUFPOST);
wlc_rpctx_fifoinit(wlc->rpctx, TX_BCMC_FIFO, NRPCTXBUFPOST);
/* VI and BK inited only if WME */
if (WME_ENAB(wlc->pub)) {
wlc_rpctx_fifoinit(wlc->rpctx, TX_AC_BK_FIFO, NRPCTXBUFPOST);
wlc_rpctx_fifoinit(wlc->rpctx, TX_AC_VI_FIFO, NRPCTXBUFPOST);
}
/* Allocate SB handle */
wlc->pub->sih = osl_malloc(wlc->osh, sizeof(si_t));
if (!wlc->pub->sih)
return -1;
bzero(wlc->pub->sih, sizeof(si_t));
/* sync up revinfo with BMAC */
bzero(&revinfo, sizeof(wlc_bmac_revinfo_t));
if (wlc_bmac_revinfo_get(wlc->hw, &revinfo) != 0)
return -1;
wlc->vendorid = (u16) revinfo.vendorid;
wlc->deviceid = (u16) revinfo.deviceid;
wlc->pub->boardrev = (u16) revinfo.boardrev;
wlc->pub->corerev = revinfo.corerev;
wlc->pub->sromrev = (u8) revinfo.sromrev;
wlc->pub->sih->chiprev = revinfo.chiprev;
wlc->pub->sih->chip = revinfo.chip;
wlc->pub->sih->chippkg = revinfo.chippkg;
wlc->pub->sih->boardtype = revinfo.boardtype;
wlc->pub->sih->boardvendor = revinfo.boardvendor;
wlc->pub->sih->bustype = revinfo.bustype;
wlc->pub->sih->buscoretype = revinfo.buscoretype;
wlc->pub->sih->buscorerev = revinfo.buscorerev;
wlc->pub->sih->issim = (bool) revinfo.issim;
wlc->pub->sih->rpc = rpc;
if (revinfo.nbands == 0 || revinfo.nbands > 2)
return -1;
wlc->pub->_nbands = revinfo.nbands;
for (idx = 0; idx < wlc->pub->_nbands; idx++) {
uint bandunit, bandtype; /* To access bandstate */
wlc_phy_t *pi = osl_malloc(wlc->osh, sizeof(wlc_phy_t));
if (!pi)
return -1;
bzero(pi, sizeof(wlc_phy_t));
pi->rpc = rpc;
bandunit = revinfo.band[idx].bandunit;
bandtype = revinfo.band[idx].bandtype;
wlc->bandstate[bandunit]->radiorev =
(u8) revinfo.band[idx].radiorev;
wlc->bandstate[bandunit]->phytype =
(u16) revinfo.band[idx].phytype;
wlc->bandstate[bandunit]->phyrev =
(u16) revinfo.band[idx].phyrev;
wlc->bandstate[bandunit]->radioid =
(u16) revinfo.band[idx].radioid;
wlc->bandstate[bandunit]->abgphy_encore =
revinfo.band[idx].abgphy_encore;
wlc->bandstate[bandunit]->pi = pi;
wlc->bandstate[bandunit]->bandunit = bandunit;
wlc->bandstate[bandunit]->bandtype = bandtype;
}
/* misc stuff */
return 0;
}
/* Free the convenience handles */
int wlc_bmac_detach(wlc_info_t *wlc)
{
uint idx;
if (wlc->pub->sih) {
osl_mfree(wlc->osh, (void *)wlc->pub->sih, sizeof(si_t));
wlc->pub->sih = NULL;
}
for (idx = 0; idx < MAXBANDS; idx++)
if (wlc->bandstate[idx]->pi) {
kfree(wlc->bandstate[idx]->pi);
wlc->bandstate[idx]->pi = NULL;
}
if (wlc->rpctx) {
wlc_rpctx_detach(wlc->rpctx);
wlc->rpctx = NULL;
}
return 0;
}
#endif /* WLC_HIGH_ONLY */
static void wlc_timers_deinit(wlc_info_t *wlc)
{
......@@ -2335,15 +2170,6 @@ uint wlc_detach(wlc_info_t *wlc)
/* free other state */
#ifdef WLC_HIGH_ONLY
/* High-Only driver has an allocated copy of vars, monolithic just
* references the wlc->hw->vars which is freed in wlc_bmac_detach()
*/
if (wlc->pub->vars) {
kfree(wlc->pub->vars);
wlc->pub->vars = NULL;
}
#endif
#ifdef BCMDBG
if (wlc->country_ie_override) {
......@@ -2677,10 +2503,6 @@ static void wlc_watchdog(void *arg)
#ifdef WLC_LOW
wlc_bmac_watchdog(wlc);
#endif
#ifdef WLC_HIGH_ONLY
/* maintenance */
wlc_bmac_rpc_watchdog(wlc);
#endif
/* occasionally sample mac stat counters to detect 16-bit counter wrap */
if ((WLC_UPDATE_STATS(wlc))
......@@ -2929,9 +2751,6 @@ uint wlc_down(wlc_info_t *wlc)
/* wlc_bmac_down_finish has done wlc_coredisable(). so clk is off */
wlc->clk = false;
#ifdef WLC_HIGH_ONLY
wlc_rpctx_txreclaim(wlc->rpctx);
#endif
/* Verify all packets are flushed from the driver */
if (PKTALLOCED(wlc->osh) != 0) {
......@@ -3395,10 +3214,6 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif)
wlc_set_chanspec(wlc, chspec);
wlc_enable_mac(wlc);
}
#ifdef WLC_HIGH_ONLY
/* delay for channel change */
msleep(50);
#endif
break;
}
......@@ -4629,11 +4444,6 @@ wlc_iovar_op(wlc_info_t *wlc, const char *name,
/* iovar name not found */
if (i >= WLC_MAXMODULES) {
err = BCME_UNSUPPORTED;
#ifdef WLC_HIGH_ONLY
err =
bcmsdh_iovar_op(wlc->btparam, name, params, p_len, arg, len,
set);
#endif
goto exit;
}
......@@ -5195,14 +5005,6 @@ u16 wlc_rate_shm_offset(wlc_info_t *wlc, u8 rate)
}
/* Callback for device removed */
#if defined(WLC_HIGH_ONLY)
void wlc_device_removed(void *arg)
{
wlc_info_t *wlc = (wlc_info_t *) arg;
wlc->device_present = false;
}
#endif /* WLC_HIGH_ONLY */
/*
* Attempts to queue a packet onto a multiple-precedence queue,
......@@ -5467,13 +5269,6 @@ wlc_txfifo(wlc_info_t *wlc, uint fifo, void *p, bool commit, s8 txpktpend)
if (WLC_WAR16165(wlc))
wlc_war16165(wlc, true);
#ifdef WLC_HIGH_ONLY
if (RPCTX_ENAB(wlc->pub)) {
(void)wlc_rpctx_tx(wlc->rpctx, fifo, p, commit, frameid,
txpktpend);
return;
}
#else
/* Bump up pending count for if not using rpc. If rpc is used, this will be handled
* in wlc_bmac_txfifo()
......@@ -5491,7 +5286,6 @@ wlc_txfifo(wlc_info_t *wlc, uint fifo, void *p, bool commit, s8 txpktpend)
if (dma_txfast(wlc->hw->di[fifo], p, commit) < 0) {
WL_ERROR(("wlc_txfifo: fatal, toss frames !!!\n"));
}
#endif /* WLC_HIGH_ONLY */
}
static u16
......@@ -5805,9 +5599,7 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(wlc_info_t *wlc, ratespec_t rspec)
/* phy clock must support 40Mhz if tx descriptor uses it */
if ((phyctl1 & PHY_TXC1_BW_MASK) >= PHY_TXC1_BW_40MHZ) {
ASSERT(CHSPEC_WLC_BW(wlc->chanspec) == WLC_40_MHZ);
#ifndef WLC_HIGH_ONLY
ASSERT(wlc->chanspec == wlc_phy_chanspec_get(wlc->band->pi));
#endif
}
#endif /* BCMDBG */
return phyctl1;
......@@ -5988,13 +5780,6 @@ wlc_d11hdrs_mac80211(wlc_info_t *wlc, struct ieee80211_hw *hw,
if (txrate[1]->idx < 0) {
txrate[1] = txrate[0];
}
#ifdef WLC_HIGH_ONLY
/* Double protection , just in case */
if (txrate[0]->idx > HIGHEST_SINGLE_STREAM_MCS)
txrate[0]->idx = HIGHEST_SINGLE_STREAM_MCS;
if (txrate[1]->idx > HIGHEST_SINGLE_STREAM_MCS)
txrate[1]->idx = HIGHEST_SINGLE_STREAM_MCS;
#endif
for (k = 0; k < hw->max_rates; k++) {
is_mcs[k] =
......@@ -6693,9 +6478,7 @@ void wlc_high_dpc(wlc_info_t *wlc, u32 macintstatus)
if (!pktq_empty(&wlc->active_queue->q))
wlc_send_q(wlc, wlc->active_queue);
#ifndef WLC_HIGH_ONLY
ASSERT(wlc_ps_check(wlc));
#endif
}
static void *wlc_15420war(wlc_info_t *wlc, uint queue)
......@@ -6906,12 +6689,6 @@ wlc_dotxstatus(wlc_info_t *wlc, tx_status_t *txs, u32 frm_tx2)
if (p)
PKTFREE(osh, p, true);
#ifdef WLC_HIGH_ONLY
/* If this is a split driver, do the big-hammer here.
* If this is a monolithic driver, wlc_bmac.c:wlc_dpc() will do the big-hammer.
*/
wl_init(wlc->wl);
#endif
return true;
}
......@@ -8483,9 +8260,6 @@ void wlc_pllreq(wlc_info_t *wlc, bool set, mbool req_bit)
void wlc_reset_bmac_done(wlc_info_t *wlc)
{
#ifdef WLC_HIGH_ONLY
wlc->reset_bmac_pending = false;
#endif
}
void wlc_ht_mimops_cap_update(wlc_info_t *wlc, u8 mimops_mode)
......
......@@ -214,15 +214,11 @@ extern const u8 prio2fifo[];
* (some platforms return all 0).
* If clocks are present, call the sb routine which will figure out if the device is removed.
*/
#ifdef WLC_HIGH_ONLY
#define DEVICEREMOVED(wlc) (!wlc->device_present)
#else
#define DEVICEREMOVED(wlc) \
((wlc->hw->clk) ? \
((R_REG(wlc->hw->osh, &wlc->hw->regs->maccontrol) & \
(MCTL_PSM_JMP_0 | MCTL_IHR_EN)) != MCTL_IHR_EN) : \
(si_deviceremoved(wlc->hw->sih)))
#endif /* WLC_HIGH_ONLY */
#define WLCWLUNIT(wlc) ((wlc)->pub->unit)
......@@ -578,12 +574,6 @@ struct wlc_info {
s8 txpwr_local_max; /* regulatory local txpwr max */
u8 txpwr_local_constraint; /* local power contraint in dB */
#ifdef WLC_HIGH_ONLY
rpctx_info_t *rpctx; /* RPC TX module */
bool reset_bmac_pending; /* bmac reset is in progressing */
u32 rpc_agg; /* host agg: bit 16-31, bmac agg: bit 0-15 */
u32 rpc_msglevel; /* host rpc: bit 16-31, bmac rpc: bit 0-15 */
#endif
ampdu_info_t *ampdu; /* ampdu module handler */
antsel_info_t *asi; /* antsel module handler */
......@@ -843,16 +833,6 @@ struct antsel_info {
#endif
/* sum the individual fifo tx pending packet counts */
#if defined(WLC_HIGH_ONLY)
#define TXPKTPENDTOT(wlc) (wlc_rpctx_txpktpend((wlc)->rpctx, 0, true))
#define TXPKTPENDGET(wlc, fifo) (wlc_rpctx_txpktpend((wlc)->rpctx, (fifo), false))
#define TXPKTPENDINC(wlc, fifo, val) (wlc_rpctx_txpktpendinc((wlc)->rpctx, (fifo), (val)))
#define TXPKTPENDDEC(wlc, fifo, val) (wlc_rpctx_txpktpenddec((wlc)->rpctx, (fifo), (val)))
#define TXPKTPENDCLR(wlc, fifo) (wlc_rpctx_txpktpendclr((wlc)->rpctx, (fifo)))
#define TXAVAIL(wlc, fifo) (wlc_rpctx_txavail((wlc)->rpctx, (fifo)))
#define GETNEXTTXP(wlc, _queue) (wlc_rpctx_getnexttxp((wlc)->rpctx, (_queue)))
#else
#define TXPKTPENDTOT(wlc) ((wlc)->core->txpktpend[0] + (wlc)->core->txpktpend[1] + \
(wlc)->core->txpktpend[2] + (wlc)->core->txpktpend[3])
#define TXPKTPENDGET(wlc, fifo) ((wlc)->core->txpktpend[(fifo)])
......@@ -862,7 +842,6 @@ struct antsel_info {
#define TXAVAIL(wlc, fifo) (*(wlc)->core->txavail[(fifo)])
#define GETNEXTTXP(wlc, _queue) \
dma_getnexttxp((wlc)->hw->di[(_queue)], HNDDMA_RANGE_TRANSMITTED)
#endif /* WLC_HIGH_ONLY */
#define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \
((len1 == len2) && !bcmp(ssid1, ssid2, len1))
......
......@@ -28,29 +28,6 @@ struct wlc_info;
#define NRPCTXBUFPOST NTXD
#endif
#if defined(WLC_HIGH_ONLY)
struct wlc_rpc_phy {
struct rpc_info *rpc;
};
#define RPCTX_ENAB(pub) (true)
extern rpctx_info_t *wlc_rpctx_attach(wlc_pub_t *pub, struct wlc_info *wlc);
extern int wlc_rpctx_fifoinit(rpctx_info_t *rpctx, uint fifo, uint ntxd);
extern void wlc_rpctx_detach(rpctx_info_t *rpctx);
extern int wlc_rpctx_dump(rpctx_info_t *rpctx, struct bcmstrbuf *b);
extern void *wlc_rpctx_getnexttxp(rpctx_info_t *rpctx, uint fifo);
extern void wlc_rpctx_txreclaim(rpctx_info_t *rpctx);
extern uint wlc_rpctx_txavail(rpctx_info_t *rpctx, uint fifo);
extern int wlc_rpctx_pkteng(rpctx_info_t *rpctx, uint fifo, void *p);
extern int wlc_rpctx_tx(rpctx_info_t *rpctx, uint fifo, void *p, bool commit,
u16 frameid, u8 txpktpend);
extern void wlc_rpctx_txpktpendinc(rpctx_info_t *rpctx, uint fifo, u8 val);
extern void wlc_rpctx_txpktpenddec(rpctx_info_t *rpctx, uint fifo, u8 val);
extern void wlc_rpctx_txpktpendclr(rpctx_info_t *rpctx, uint fifo);
extern int wlc_rpctx_txpktpend(rpctx_info_t *rpctx, uint fifo, bool all);
#else
#define RPCTX_ENAB(pub) (false)
#define wlc_rpctx_attach(pub, wlc) (NULL)
#define wlc_rpctx_fifoinit(rpctx, fifo, ntxd) (0)
......@@ -66,6 +43,5 @@ extern int wlc_rpctx_txpktpend(rpctx_info_t *rpctx, uint fifo, bool all);
#define wlc_rpctx_txpktpendclr(rpctx, f) do { } while (0)
#define wlc_rpctx_txpktpend(rpctx, f, all) (0)
#endif /* WLC_HIGH */
#endif /* _wlc_rpctx_h_ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册