Commit 29efb1a9 authored by Brett Rudley's avatar Brett Rudley Committed by Greg Kroah-Hartman

staging: brcm80211: unifdef -UWLC_HIGH_ONLY

Part of BMAC removal.
Signed-off-by: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2cb8ada6
...@@ -122,11 +122,7 @@ typedef struct shared_phy shared_phy_t; ...@@ -122,11 +122,7 @@ typedef struct shared_phy shared_phy_t;
struct phy_pub; struct phy_pub;
#ifdef WLC_HIGH_ONLY
typedef struct wlc_rpc_phy wlc_phy_t;
#else
typedef struct phy_pub wlc_phy_t; typedef struct phy_pub wlc_phy_t;
#endif
typedef struct shared_phy_params { typedef struct shared_phy_params {
void *osh; void *osh;
......
This diff is collapsed.
...@@ -67,12 +67,8 @@ struct wl_info { ...@@ -67,12 +67,8 @@ struct wl_info {
int irq; int irq;
#ifdef WLC_HIGH_ONLY
struct semaphore sem; /* use semaphore to allow sleep */
#else
spinlock_t lock; /* per-device perimeter lock */ spinlock_t lock; /* per-device perimeter lock */
spinlock_t isr_lock; /* per-device ISR synchronization lock */ spinlock_t isr_lock; /* per-device ISR synchronization lock */
#endif
uint bcm_bustype; /* bus type */ uint bcm_bustype; /* bus type */
bool piomode; /* set from insmod argument */ bool piomode; /* set from insmod argument */
void *regsva; /* opaque chip registers virtual address */ void *regsva; /* opaque chip registers virtual address */
...@@ -88,30 +84,12 @@ struct wl_info { ...@@ -88,30 +84,12 @@ struct wl_info {
u32 pci_psstate[16]; /* pci ps-state save/restore */ u32 pci_psstate[16]; /* pci ps-state save/restore */
#endif #endif
/* RPC, handle, lock, txq, workitem */ /* 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 */ uint stats_id; /* the current set of stats */
/* ping-pong stats counters updated by Linux watchdog */ /* ping-pong stats counters updated by Linux watchdog */
struct net_device_stats stats_watchdog[2]; struct net_device_stats stats_watchdog[2];
struct wl_firmware fw; struct wl_firmware fw;
}; };
#ifndef WLC_HIGH_ONLY
#define WL_LOCK(wl) spin_lock_bh(&(wl)->lock) #define WL_LOCK(wl) spin_lock_bh(&(wl)->lock)
#define WL_UNLOCK(wl) spin_unlock_bh(&(wl)->lock) #define WL_UNLOCK(wl) spin_unlock_bh(&(wl)->lock)
...@@ -122,14 +100,6 @@ struct wl_info { ...@@ -122,14 +100,6 @@ struct wl_info {
/* locking under WL_LOCK() to synchronize with wl_isr */ /* locking under WL_LOCK() to synchronize with wl_isr */
#define INT_LOCK(wl, flags) spin_lock_irqsave(&(wl)->isr_lock, flags) #define INT_LOCK(wl, flags) spin_lock_irqsave(&(wl)->isr_lock, flags)
#define INT_UNLOCK(wl, flags) spin_unlock_irqrestore(&(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 */ /* handle forward declaration */
typedef struct wl_info wl_info_t; typedef struct wl_info wl_info_t;
......
...@@ -63,11 +63,6 @@ void wlc_tunables_init(wlc_tunables_t *tunables, uint devid) ...@@ -63,11 +63,6 @@ void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
tunables->ampdudatahiwat = WLC_AMPDUDATAHIWAT; tunables->ampdudatahiwat = WLC_AMPDUDATAHIWAT;
tunables->rxbnd = RXBND; tunables->rxbnd = RXBND;
tunables->txsbnd = TXSBND; 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, static wlc_pub_t *wlc_pub_malloc(struct osl_info *osh, uint unit, uint *err,
......
...@@ -38,10 +38,6 @@ ...@@ -38,10 +38,6 @@
#include <wl_export.h> #include <wl_export.h>
#include <wl_dbg.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_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 */ #define AMPDU_NUM_MPDU_LEGACY 16 /* max number of mpdus in an ampdu to a legacy */
...@@ -126,11 +122,6 @@ struct ampdu_info { ...@@ -126,11 +122,6 @@ struct ampdu_info {
*/ */
wlc_fifo_info_t fifo_tb[NUM_FFPLD_FIFO]; /* table of fifo infos */ 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) #define AMPDU_CLEANUPFLAG_RX (0x1)
...@@ -210,10 +201,6 @@ ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc) ...@@ -210,10 +201,6 @@ ampdu_info_t *wlc_ampdu_attach(wlc_info_t *wlc)
ampdu->rx_factor = AMPDU_RX_FACTOR_32K; ampdu->rx_factor = AMPDU_RX_FACTOR_32K;
else else
ampdu->rx_factor = AMPDU_RX_FACTOR_64K; 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->retry_limit = AMPDU_DEF_RETRY_LIMIT;
ampdu->rr_retry_limit = AMPDU_DEF_RR_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) ...@@ -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) { if (frameid & TXFID_RATE_PROBE_MASK) {
WL_ERROR(("%s: XXX what to do with TXFID_RATE_PROBE_MASK!?\n", __func__)); 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++) for (i = 0; i < count; i++)
wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1), wlc_txfifo(wlc, fifo, pkt[i], i == (count - 1),
ampdu->txpkt_weight); 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) */ /* endif (count) */
...@@ -967,31 +944,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p, ...@@ -967,31 +944,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini); 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, void rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
tx_status_t *txs, u8 mcs); tx_status_t *txs, u8 mcs);
...@@ -1117,11 +1069,6 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p, ...@@ -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]) if (wlc_ffpld_check_txfunfl(wlc, prio2fifo[tid])
> 0) { > 0) {
tx_error = true; 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) { } else if (txs->phyerr) {
......
...@@ -32,9 +32,5 @@ extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu); ...@@ -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, extern u8 wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
ratespec_t rspec, int phylen); ratespec_t rspec, int phylen);
extern void scb_ampdu_cleanup(ampdu_info_t *ampdu, struct scb *scb); 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_ */ #endif /* _wlc_ampdu_h_ */
...@@ -242,16 +242,6 @@ extern void wlc_bmac_retrylimit_upd(wlc_hw_info_t *wlc_hw, u16 SRL, ...@@ -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); 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) */ /* API for BMAC driver (e.g. wlc_phy.c etc) */
......
...@@ -214,15 +214,11 @@ extern const u8 prio2fifo[]; ...@@ -214,15 +214,11 @@ extern const u8 prio2fifo[];
* (some platforms return all 0). * (some platforms return all 0).
* If clocks are present, call the sb routine which will figure out if the device is removed. * 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) \ #define DEVICEREMOVED(wlc) \
((wlc->hw->clk) ? \ ((wlc->hw->clk) ? \
((R_REG(wlc->hw->osh, &wlc->hw->regs->maccontrol) & \ ((R_REG(wlc->hw->osh, &wlc->hw->regs->maccontrol) & \
(MCTL_PSM_JMP_0 | MCTL_IHR_EN)) != MCTL_IHR_EN) : \ (MCTL_PSM_JMP_0 | MCTL_IHR_EN)) != MCTL_IHR_EN) : \
(si_deviceremoved(wlc->hw->sih))) (si_deviceremoved(wlc->hw->sih)))
#endif /* WLC_HIGH_ONLY */
#define WLCWLUNIT(wlc) ((wlc)->pub->unit) #define WLCWLUNIT(wlc) ((wlc)->pub->unit)
...@@ -578,12 +574,6 @@ struct wlc_info { ...@@ -578,12 +574,6 @@ struct wlc_info {
s8 txpwr_local_max; /* regulatory local txpwr max */ s8 txpwr_local_max; /* regulatory local txpwr max */
u8 txpwr_local_constraint; /* local power contraint in dB */ 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 */ ampdu_info_t *ampdu; /* ampdu module handler */
antsel_info_t *asi; /* antsel module handler */ antsel_info_t *asi; /* antsel module handler */
...@@ -843,16 +833,6 @@ struct antsel_info { ...@@ -843,16 +833,6 @@ struct antsel_info {
#endif #endif
/* sum the individual fifo tx pending packet counts */ /* 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] + \ #define TXPKTPENDTOT(wlc) ((wlc)->core->txpktpend[0] + (wlc)->core->txpktpend[1] + \
(wlc)->core->txpktpend[2] + (wlc)->core->txpktpend[3]) (wlc)->core->txpktpend[2] + (wlc)->core->txpktpend[3])
#define TXPKTPENDGET(wlc, fifo) ((wlc)->core->txpktpend[(fifo)]) #define TXPKTPENDGET(wlc, fifo) ((wlc)->core->txpktpend[(fifo)])
...@@ -862,7 +842,6 @@ struct antsel_info { ...@@ -862,7 +842,6 @@ struct antsel_info {
#define TXAVAIL(wlc, fifo) (*(wlc)->core->txavail[(fifo)]) #define TXAVAIL(wlc, fifo) (*(wlc)->core->txavail[(fifo)])
#define GETNEXTTXP(wlc, _queue) \ #define GETNEXTTXP(wlc, _queue) \
dma_getnexttxp((wlc)->hw->di[(_queue)], HNDDMA_RANGE_TRANSMITTED) dma_getnexttxp((wlc)->hw->di[(_queue)], HNDDMA_RANGE_TRANSMITTED)
#endif /* WLC_HIGH_ONLY */
#define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \ #define WLC_IS_MATCH_SSID(wlc, ssid1, ssid2, len1, len2) \
((len1 == len2) && !bcmp(ssid1, ssid2, len1)) ((len1 == len2) && !bcmp(ssid1, ssid2, len1))
......
...@@ -28,29 +28,6 @@ struct wlc_info; ...@@ -28,29 +28,6 @@ struct wlc_info;
#define NRPCTXBUFPOST NTXD #define NRPCTXBUFPOST NTXD
#endif #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 RPCTX_ENAB(pub) (false)
#define wlc_rpctx_attach(pub, wlc) (NULL) #define wlc_rpctx_attach(pub, wlc) (NULL)
#define wlc_rpctx_fifoinit(rpctx, fifo, ntxd) (0) #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); ...@@ -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_txpktpendclr(rpctx, f) do { } while (0)
#define wlc_rpctx_txpktpend(rpctx, f, all) (0) #define wlc_rpctx_txpktpend(rpctx, f, all) (0)
#endif /* WLC_HIGH */
#endif /* _wlc_rpctx_h_ */ #endif /* _wlc_rpctx_h_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment