Commit 501c0934 authored by Brett Rudley's avatar Brett Rudley Committed by Greg Kroah-Hartman

staging: brcm80211: unifdef -DWLC_LOW

Part of BMAC removal.
Signed-off-by: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 02db6b47
...@@ -53,9 +53,7 @@ typedef struct rpc_transport_info rpc_tp_info_t; ...@@ -53,9 +53,7 @@ typedef struct rpc_transport_info rpc_tp_info_t;
typedef void (*rpc_tx_complete_fn_t) (void *, rpc_buf_t *, int status); typedef void (*rpc_tx_complete_fn_t) (void *, rpc_buf_t *, int status);
typedef void (*rpc_rx_fn_t) (void *, rpc_buf_t *); typedef void (*rpc_rx_fn_t) (void *, rpc_buf_t *);
#ifdef WLC_LOW
typedef void (*rpc_txflowctl_cb_t) (void *ctx, bool on); typedef void (*rpc_txflowctl_cb_t) (void *ctx, bool on);
#endif
extern rpc_tp_info_t *bcm_rpc_tp_attach(struct osl_info *osh, void *bus); extern rpc_tp_info_t *bcm_rpc_tp_attach(struct osl_info *osh, void *bus);
extern void bcm_rpc_tp_detach(rpc_tp_info_t *rpcb); extern void bcm_rpc_tp_detach(rpc_tp_info_t *rpcb);
...@@ -94,7 +92,6 @@ extern int bcm_rpc_tp_get_device_speed(rpc_tp_info_t *rpc_th); ...@@ -94,7 +92,6 @@ extern int bcm_rpc_tp_get_device_speed(rpc_tp_info_t *rpc_th);
extern int bcm_rpc_tp_dump(rpc_tp_info_t *rpcb, struct bcmstrbuf *b); extern int bcm_rpc_tp_dump(rpc_tp_info_t *rpcb, struct bcmstrbuf *b);
#endif #endif
#ifdef WLC_LOW
/* intercept USB pkt to parse RPC header: USB driver rx-> wl_send -> this -> wl driver */ /* intercept USB pkt to parse RPC header: USB driver rx-> wl_send -> this -> wl driver */
extern void bcm_rpc_tp_rx_from_dnglbus(rpc_tp_info_t *rpc_th, struct lbuf *lb); extern void bcm_rpc_tp_rx_from_dnglbus(rpc_tp_info_t *rpc_th, struct lbuf *lb);
...@@ -110,7 +107,6 @@ extern void bcm_rpc_tp_txq_wm_set(rpc_tp_info_t *rpc_th, u8 hiwm, ...@@ -110,7 +107,6 @@ extern void bcm_rpc_tp_txq_wm_set(rpc_tp_info_t *rpc_th, u8 hiwm,
u8 lowm); u8 lowm);
extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, u8 *hiwm, extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, u8 *hiwm,
u8 *lowm); u8 *lowm);
#endif /* WLC_LOW */
extern void bcm_rpc_tp_agg_set(rpc_tp_info_t *rpcb, u32 reason, bool set); extern void bcm_rpc_tp_agg_set(rpc_tp_info_t *rpcb, u32 reason, bool set);
extern void bcm_rpc_tp_agg_limit_set(rpc_tp_info_t *rpc_th, u8 sf, extern void bcm_rpc_tp_agg_limit_set(rpc_tp_info_t *rpc_th, u8 sf,
......
...@@ -19,9 +19,6 @@ ...@@ -19,9 +19,6 @@
#include <hndsoc.h> #include <hndsoc.h>
#if !defined(WLC_LOW)
#include "bcm_rpc.h"
#endif
/* /*
* Data structure to export all chip specific common variables * Data structure to export all chip specific common variables
* public (read-only) portion of siutils handle returned by si_attach() * public (read-only) portion of siutils handle returned by si_attach()
...@@ -50,19 +47,12 @@ struct si_pub { ...@@ -50,19 +47,12 @@ struct si_pub {
uint socirev; /* SOC interconnect rev */ uint socirev; /* SOC interconnect rev */
bool pci_pr32414; bool pci_pr32414;
#if !defined(WLC_LOW)
rpc_info_t *rpc;
#endif
}; };
/* for HIGH_ONLY driver, the si_t must be writable to allow states sync from BMAC to HIGH driver /* for HIGH_ONLY driver, the si_t must be writable to allow states sync from BMAC to HIGH driver
* for monolithic driver, it is readonly to prevent accident change * for monolithic driver, it is readonly to prevent accident change
*/ */
#if !defined(WLC_LOW)
typedef struct si_pub si_t;
#else
typedef const struct si_pub si_t; typedef const struct si_pub si_t;
#endif
/* /*
* Many of the routines below take an 'sih' handle as their first arg. * Many of the routines below take an 'sih' handle as their first arg.
......
...@@ -146,7 +146,6 @@ typedef struct shared_phy_params { ...@@ -146,7 +146,6 @@ typedef struct shared_phy_params {
u32 boardflags2; u32 boardflags2;
} shared_phy_params_t; } shared_phy_params_t;
#ifdef WLC_LOW
extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp); extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp);
extern void wlc_phy_shared_detach(shared_phy_t *phy_sh); extern void wlc_phy_shared_detach(shared_phy_t *phy_sh);
...@@ -185,7 +184,6 @@ extern void wlc_phy_set_deaf(wlc_phy_t *ppi, bool user_flag); ...@@ -185,7 +184,6 @@ extern void wlc_phy_set_deaf(wlc_phy_t *ppi, bool user_flag);
extern void wlc_phy_switch_radio(wlc_phy_t *ppi, bool on); extern void wlc_phy_switch_radio(wlc_phy_t *ppi, bool on);
extern void wlc_phy_anacore(wlc_phy_t *ppi, bool on); extern void wlc_phy_anacore(wlc_phy_t *ppi, bool on);
#endif /* WLC_LOW */
extern void wlc_phy_BSSinit(wlc_phy_t *ppi, bool bonlyap, int rssi); extern void wlc_phy_BSSinit(wlc_phy_t *ppi, bool bonlyap, int rssi);
......
...@@ -759,14 +759,12 @@ static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs, ...@@ -759,14 +759,12 @@ static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs,
wlc_iovar_setint(wl->wlc, "sd_drivestrength", sd_drivestrength); wlc_iovar_setint(wl->wlc, "sd_drivestrength", sd_drivestrength);
#endif #endif
#ifdef WLC_LOW
/* register our interrupt handler */ /* register our interrupt handler */
if (request_irq(irq, wl_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) { if (request_irq(irq, wl_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) {
WL_ERROR(("wl%d: request_irq() failed\n", unit)); WL_ERROR(("wl%d: request_irq() failed\n", unit));
goto fail; goto fail;
} }
wl->irq = irq; wl->irq = irq;
#endif /* WLC_LOW */
/* register module */ /* register module */
wlc_module_register(wl->pub, NULL, "linux", wl, NULL, wl_linux_watchdog, wlc_module_register(wl->pub, NULL, "linux", wl, NULL, wl_linux_watchdog,
...@@ -1349,7 +1347,6 @@ void wl_free(wl_info_t *wl) ...@@ -1349,7 +1347,6 @@ void wl_free(wl_info_t *wl)
osl_detach(osh); osl_detach(osh);
} }
#ifdef WLC_LOW
/* transmit a packet */ /* transmit a packet */
static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl) static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl)
{ {
...@@ -1358,7 +1355,6 @@ static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl) ...@@ -1358,7 +1355,6 @@ static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl)
return wl_start_int(wl, WL_TO_HW(wl), skb); return wl_start_int(wl, WL_TO_HW(wl), skb);
} }
#endif /* WLC_LOW */
static int BCMFASTPATH static int BCMFASTPATH
wl_start_int(wl_info_t *wl, struct ieee80211_hw *hw, struct sk_buff *skb) wl_start_int(wl_info_t *wl, struct ieee80211_hw *hw, struct sk_buff *skb)
...@@ -1400,13 +1396,11 @@ uint wl_reset(wl_info_t *wl) ...@@ -1400,13 +1396,11 @@ uint wl_reset(wl_info_t *wl)
*/ */
void BCMFASTPATH wl_intrson(wl_info_t *wl) void BCMFASTPATH wl_intrson(wl_info_t *wl)
{ {
#if defined(WLC_LOW)
unsigned long flags; unsigned long flags;
INT_LOCK(wl, flags); INT_LOCK(wl, flags);
wlc_intrson(wl->wlc); wlc_intrson(wl->wlc);
INT_UNLOCK(wl, flags); INT_UNLOCK(wl, flags);
#endif /* WLC_LOW */
} }
bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth) bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth)
...@@ -1416,7 +1410,6 @@ bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth) ...@@ -1416,7 +1410,6 @@ bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth)
u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl) u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl)
{ {
#if defined(WLC_LOW)
unsigned long flags; unsigned long flags;
u32 status; u32 status;
...@@ -1424,20 +1417,15 @@ u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl) ...@@ -1424,20 +1417,15 @@ u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl)
status = wlc_intrsoff(wl->wlc); status = wlc_intrsoff(wl->wlc);
INT_UNLOCK(wl, flags); INT_UNLOCK(wl, flags);
return status; return status;
#else
return 0;
#endif /* WLC_LOW */
} }
void wl_intrsrestore(wl_info_t *wl, u32 macintmask) void wl_intrsrestore(wl_info_t *wl, u32 macintmask)
{ {
#if defined(WLC_LOW)
unsigned long flags; unsigned long flags;
INT_LOCK(wl, flags); INT_LOCK(wl, flags);
wlc_intrsrestore(wl->wlc, macintmask); wlc_intrsrestore(wl->wlc, macintmask);
INT_UNLOCK(wl, flags); INT_UNLOCK(wl, flags);
#endif /* WLC_LOW */
} }
int wl_up(wl_info_t *wl) int wl_up(wl_info_t *wl)
...@@ -1473,7 +1461,6 @@ void wl_down(wl_info_t *wl) ...@@ -1473,7 +1461,6 @@ void wl_down(wl_info_t *wl)
irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
{ {
#if defined(WLC_LOW)
wl_info_t *wl; wl_info_t *wl;
bool ours, wantdpc; bool ours, wantdpc;
unsigned long flags; unsigned long flags;
...@@ -1498,14 +1485,10 @@ irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) ...@@ -1498,14 +1485,10 @@ irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
WL_ISRUNLOCK(wl, flags); WL_ISRUNLOCK(wl, flags);
return IRQ_RETVAL(ours); return IRQ_RETVAL(ours);
#else
return IRQ_RETVAL(0);
#endif /* WLC_LOW */
} }
static void BCMFASTPATH wl_dpc(unsigned long data) static void BCMFASTPATH wl_dpc(unsigned long data)
{ {
#ifdef WLC_LOW
wl_info_t *wl; wl_info_t *wl;
wl = (wl_info_t *) data; wl = (wl_info_t *) data;
...@@ -1539,7 +1522,6 @@ static void BCMFASTPATH wl_dpc(unsigned long data) ...@@ -1539,7 +1522,6 @@ static void BCMFASTPATH wl_dpc(unsigned long data)
done: done:
WL_UNLOCK(wl); WL_UNLOCK(wl);
#endif /* WLC_LOW */
} }
static void wl_link_up(wl_info_t *wl, char *ifname) static void wl_link_up(wl_info_t *wl, char *ifname)
...@@ -1743,7 +1725,6 @@ char *wl_firmwares[WL_MAX_FW] = { ...@@ -1743,7 +1725,6 @@ char *wl_firmwares[WL_MAX_FW] = {
NULL NULL
}; };
#ifdef WLC_LOW
int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx) int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx)
{ {
int i, entry; int i, entry;
...@@ -1790,7 +1771,6 @@ int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx) ...@@ -1790,7 +1771,6 @@ int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx)
printf("ERROR: ucode tag:%d can not be found!\n", idx); printf("ERROR: ucode tag:%d can not be found!\n", idx);
return -1; return -1;
} }
#endif /* WLC_LOW */
static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev) static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev)
{ {
...@@ -1833,12 +1813,10 @@ static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev) ...@@ -1833,12 +1813,10 @@ static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev)
return 0; return 0;
} }
#ifdef WLC_LOW
void wl_ucode_free_buf(void *p) void wl_ucode_free_buf(void *p)
{ {
kfree(p); kfree(p);
} }
#endif /* WLC_LOW */
static void wl_release_fw(wl_info_t *wl) static void wl_release_fw(wl_info_t *wl)
{ {
......
...@@ -122,10 +122,8 @@ extern void wl_free(wl_info_t *wl); ...@@ -122,10 +122,8 @@ extern void wl_free(wl_info_t *wl);
extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
extern int wl_ucode_data_init(wl_info_t *wl); extern int wl_ucode_data_init(wl_info_t *wl);
extern void wl_ucode_data_free(void); extern void wl_ucode_data_free(void);
#ifdef WLC_LOW
extern void wl_ucode_free_buf(void *); extern void wl_ucode_free_buf(void *);
extern int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx); extern int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx);
extern int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx); extern int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx);
#endif /* WLC_LOW */
#endif /* _wl_mac80211_h_ */ #endif /* _wl_mac80211_h_ */
...@@ -196,7 +196,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, ...@@ -196,7 +196,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
} }
wlc->hw->wlc = wlc; wlc->hw->wlc = wlc;
#ifdef WLC_LOW
wlc->hw->bandstate[0] = (wlc_hwband_t *)wlc_calloc(osh, unit, wlc->hw->bandstate[0] = (wlc_hwband_t *)wlc_calloc(osh, unit,
(sizeof(wlc_hwband_t) * MAXBANDS)); (sizeof(wlc_hwband_t) * MAXBANDS));
if (wlc->hw->bandstate[0] == NULL) { if (wlc->hw->bandstate[0] == NULL) {
...@@ -211,7 +210,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, ...@@ -211,7 +210,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
(sizeof(wlc_hwband_t) * i)); (sizeof(wlc_hwband_t) * i));
} }
} }
#endif /* WLC_LOW */
wlc->modulecb = (modulecb_t *)wlc_calloc(osh, unit, wlc->modulecb = (modulecb_t *)wlc_calloc(osh, unit,
sizeof(modulecb_t) * WLC_MAXMODULES); sizeof(modulecb_t) * WLC_MAXMODULES);
...@@ -357,12 +355,10 @@ void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh) ...@@ -357,12 +355,10 @@ void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh)
} }
if (wlc->hw) { if (wlc->hw) {
#ifdef WLC_LOW
if (wlc->hw->bandstate[0]) { if (wlc->hw->bandstate[0]) {
kfree(wlc->hw->bandstate[0]); kfree(wlc->hw->bandstate[0]);
wlc->hw->bandstate[0] = NULL; wlc->hw->bandstate[0] = NULL;
} }
#endif
/* free hw struct */ /* free hw struct */
kfree(wlc->hw); kfree(wlc->hw);
......
...@@ -908,7 +908,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p, ...@@ -908,7 +908,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
* call the first one * call the first one
*/ */
if (txs->status & TX_STATUS_ACK_RCV) { if (txs->status & TX_STATUS_ACK_RCV) {
#ifdef WLC_LOW
u8 status_delay = 0; u8 status_delay = 0;
/* wait till the next 8 bytes of txstatus is available */ /* wait till the next 8 bytes of txstatus is available */
...@@ -926,18 +925,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p, ...@@ -926,18 +925,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
ASSERT(!(s1 & TX_STATUS_INTERMEDIATE)); ASSERT(!(s1 & TX_STATUS_INTERMEDIATE));
ASSERT(s1 & TX_STATUS_AMPDU); ASSERT(s1 & TX_STATUS_AMPDU);
s2 = R_REG(wlc->osh, &wlc->regs->frmtxstatus2); s2 = R_REG(wlc->osh, &wlc->regs->frmtxstatus2);
#else /* WLC_LOW */
/* Store the relevant information in ampdu structure */
WL_AMPDU_TX(("wl%d: wlc_ampdu_dotxstatus: High Recvd\n",
wlc->pub->unit));
ASSERT(!ampdu->p);
ampdu->p = p;
bcopy(txs, &ampdu->txs, sizeof(tx_status_t));
ampdu->waiting_status = true;
return;
#endif /* WLC_LOW */
} }
wlc_ampdu_dotxstatus_complete(ampdu, scb, p, txs, s1, s2); wlc_ampdu_dotxstatus_complete(ampdu, scb, p, txs, s1, s2);
......
...@@ -14,9 +14,6 @@ ...@@ -14,9 +14,6 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef WLC_LOW
#error "This file needs WLC_LOW"
#endif
#include <linux/kernel.h> #include <linux/kernel.h>
#include <wlc_cfg.h> #include <wlc_cfg.h>
......
...@@ -138,9 +138,7 @@ extern void wlc_bmac_watchdog(void *arg); ...@@ -138,9 +138,7 @@ extern void wlc_bmac_watchdog(void *arg);
extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw); extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw);
/* up/down, reset, clk */ /* up/down, reset, clk */
#ifdef WLC_LOW
extern void wlc_bmac_xtal(wlc_hw_info_t *wlc_hw, bool want); extern void wlc_bmac_xtal(wlc_hw_info_t *wlc_hw, bool want);
#endif
extern void wlc_bmac_copyto_objmem(wlc_hw_info_t *wlc_hw, extern void wlc_bmac_copyto_objmem(wlc_hw_info_t *wlc_hw,
uint offset, const void *buf, int len, uint offset, const void *buf, int len,
......
...@@ -24,12 +24,6 @@ ...@@ -24,12 +24,6 @@
#define IS_SINGLEBAND_5G(device) 0 #define IS_SINGLEBAND_5G(device) 0
/* Keep WLC_HIGH_ONLY, WLC_SPLIT for USB extension later on */ /* Keep WLC_HIGH_ONLY, WLC_SPLIT for USB extension later on */
#if !defined(WLC_LOW)
#define WLC_HIGH_ONLY
#endif
#if !defined(WLC_LOW)
#define WLC_SPLIT
#endif
/* **** Core type/rev defaults **** */ /* **** Core type/rev defaults **** */
#define D11_DEFAULT 0x0fffffb0 /* Supported D11 revs: 4, 5, 7-27 #define D11_DEFAULT 0x0fffffb0 /* Supported D11 revs: 4, 5, 7-27
......
...@@ -626,21 +626,11 @@ bool wlc_ps_check(wlc_info_t *wlc) ...@@ -626,21 +626,11 @@ bool wlc_ps_check(wlc_info_t *wlc)
res = false; res = false;
} }
#ifdef WLC_LOW
/* For a monolithic build the wake check can be exact since it looks at wake /* For a monolithic build the wake check can be exact since it looks at wake
* override bits. The MCTL_WAKE bit should match the 'wake' value. * override bits. The MCTL_WAKE bit should match the 'wake' value.
*/ */
wake = STAY_AWAKE(wlc) || wlc->hw->wake_override; wake = STAY_AWAKE(wlc) || wlc->hw->wake_override;
wake_ok = (wake == ((tmp & MCTL_WAKE) != 0)); wake_ok = (wake == ((tmp & MCTL_WAKE) != 0));
#else
/* For a split build we will not have access to any wake overrides from the low
* level. The check can only make sure the MCTL_WAKE bit is on if the high
* level 'wake' value is true. If the high level 'wake' is false, the MCTL_WAKE
* may be either true or false due to the low level override.
*/
wake = STAY_AWAKE(wlc);
wake_ok = ((tmp & MCTL_WAKE) != 0) || !wake;
#endif
if (hps && !wake_ok) { if (hps && !wake_ok) {
WL_ERROR(("wl%d: wake not sync, sw %d maccontrol 0x%x\n", wlc->pub->unit, wake, tmp)); WL_ERROR(("wl%d: wake not sync, sw %d maccontrol 0x%x\n", wlc->pub->unit, wake, tmp));
res = false; res = false;
...@@ -1842,14 +1832,12 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, ...@@ -1842,14 +1832,12 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode,
wlc_phy_stf_chain_init(wlc->band->pi, wlc->stf->hw_txchain, wlc_phy_stf_chain_init(wlc->band->pi, wlc->stf->hw_txchain,
wlc->stf->hw_rxchain); wlc->stf->hw_rxchain);
#ifdef WLC_LOW
/* pull up some info resulting from the low attach */ /* pull up some info resulting from the low attach */
{ {
int i; int i;
for (i = 0; i < NFIFO; i++) for (i = 0; i < NFIFO; i++)
wlc->core->txavail[i] = wlc->hw->txavail[i]; wlc->core->txavail[i] = wlc->hw->txavail[i];
} }
#endif /* WLC_LOW */
wlc_bmac_hw_etheraddr(wlc->hw, &wlc->perm_etheraddr); wlc_bmac_hw_etheraddr(wlc->hw, &wlc->perm_etheraddr);
...@@ -2500,9 +2488,7 @@ static void wlc_watchdog(void *arg) ...@@ -2500,9 +2488,7 @@ static void wlc_watchdog(void *arg)
if (wlc->pub->radio_disabled) if (wlc->pub->radio_disabled)
return; return;
#ifdef WLC_LOW
wlc_bmac_watchdog(wlc); wlc_bmac_watchdog(wlc);
#endif
/* occasionally sample mac stat counters to detect 16-bit counter wrap */ /* occasionally sample mac stat counters to detect 16-bit counter wrap */
if ((WLC_UPDATE_STATS(wlc)) if ((WLC_UPDATE_STATS(wlc))
...@@ -2531,10 +2517,8 @@ static void wlc_watchdog(void *arg) ...@@ -2531,10 +2517,8 @@ static void wlc_watchdog(void *arg)
wlc->tempsense_lasttime = wlc->pub->now; wlc->tempsense_lasttime = wlc->pub->now;
wlc_tempsense_upd(wlc); wlc_tempsense_upd(wlc);
} }
#ifdef WLC_LOW
/* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */ /* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */
ASSERT(wlc_bmac_taclear(wlc->hw, true)); ASSERT(wlc_bmac_taclear(wlc->hw, true));
#endif
/* Verify that tx_prec_map and fifos are in sync to avoid lock ups */ /* Verify that tx_prec_map and fifos are in sync to avoid lock ups */
ASSERT(wlc_tx_prec_map_verify(wlc)); ASSERT(wlc_tx_prec_map_verify(wlc));
...@@ -4228,14 +4212,12 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) ...@@ -4228,14 +4212,12 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif)
} }
} }
#ifdef WLC_LOW
/* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */ /* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */
/* In hw_off condition, IOCTLs that reach here are deemed safe but taclear would /* In hw_off condition, IOCTLs that reach here are deemed safe but taclear would
* certainly result in getting -1 for register reads. So skip ta_clear altogether * certainly result in getting -1 for register reads. So skip ta_clear altogether
*/ */
if (!(wlc->pub->hw_off)) if (!(wlc->pub->hw_off))
ASSERT(wlc_bmac_taclear(wlc->hw, ta_ok) || !ta_ok); ASSERT(wlc_bmac_taclear(wlc->hw, ta_ok) || !ta_ok);
#endif
return bcmerror; return bcmerror;
} }
......
...@@ -306,13 +306,11 @@ typedef struct wlc_stf { ...@@ -306,13 +306,11 @@ typedef struct wlc_stf {
* core state (mac) * core state (mac)
*/ */
typedef struct wlccore { typedef struct wlccore {
#ifdef WLC_LOW
uint coreidx; /* # sb enumerated core */ uint coreidx; /* # sb enumerated core */
/* fifo */ /* fifo */
uint *txavail[NFIFO]; /* # tx descriptors available */ uint *txavail[NFIFO]; /* # tx descriptors available */
s16 txpktpend[NFIFO]; /* tx admission control */ s16 txpktpend[NFIFO]; /* tx admission control */
#endif /* WLC_LOW */
macstat_t *macstat_snapshot; /* mac hw prev read values */ macstat_t *macstat_snapshot; /* mac hw prev read values */
} wlccore_t; } wlccore_t;
...@@ -406,7 +404,6 @@ struct wlc_if { ...@@ -406,7 +404,6 @@ struct wlc_if {
/* flags for the interface */ /* flags for the interface */
#define WLC_IF_LINKED 0x02 /* this interface is linked to a wl_if */ #define WLC_IF_LINKED 0x02 /* this interface is linked to a wl_if */
#ifdef WLC_LOW
typedef struct wlc_hwband { typedef struct wlc_hwband {
int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */ int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */
uint bandunit; /* bandstate[] index */ uint bandunit; /* bandstate[] index */
...@@ -423,7 +420,6 @@ typedef struct wlc_hwband { ...@@ -423,7 +420,6 @@ typedef struct wlc_hwband {
wlc_phy_t *pi; /* pointer to phy specific information */ wlc_phy_t *pi; /* pointer to phy specific information */
bool abgphy_encore; bool abgphy_encore;
} wlc_hwband_t; } wlc_hwband_t;
#endif /* WLC_LOW */
struct wlc_hw_info { struct wlc_hw_info {
#ifdef WLC_SPLIT #ifdef WLC_SPLIT
...@@ -436,7 +432,6 @@ struct wlc_hw_info { ...@@ -436,7 +432,6 @@ struct wlc_hw_info {
/* fifo */ /* fifo */
hnddma_t *di[NFIFO]; /* hnddma handles, per fifo */ hnddma_t *di[NFIFO]; /* hnddma handles, per fifo */
#ifdef WLC_LOW
uint unit; /* device instance number */ uint unit; /* device instance number */
/* version info */ /* version info */
...@@ -502,7 +497,6 @@ struct wlc_hw_info { ...@@ -502,7 +497,6 @@ struct wlc_hw_info {
* 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board
*/ */
u32 antsel_avail; /* put antsel_info_t here if more info is needed */ u32 antsel_avail; /* put antsel_info_t here if more info is needed */
#endif /* WLC_LOW */
}; };
/* TX Queue information /* TX Queue information
...@@ -817,11 +811,7 @@ struct antsel_info { ...@@ -817,11 +811,7 @@ struct antsel_info {
#define IS_MBAND_UNLOCKED(wlc) \ #define IS_MBAND_UNLOCKED(wlc) \
((NBANDS(wlc) > 1) && !(wlc)->bandlocked) ((NBANDS(wlc) > 1) && !(wlc)->bandlocked)
#ifdef WLC_LOW
#define WLC_BAND_PI_RADIO_CHANSPEC wlc_phy_chanspec_get(wlc->band->pi) #define WLC_BAND_PI_RADIO_CHANSPEC wlc_phy_chanspec_get(wlc->band->pi)
#else
#define WLC_BAND_PI_RADIO_CHANSPEC (wlc->chanspec)
#endif
/* sum the individual fifo tx pending packet counts */ /* sum the individual fifo tx pending packet counts */
#define TXPKTPENDTOT(wlc) ((wlc)->core->txpktpend[0] + (wlc)->core->txpktpend[1] + \ #define TXPKTPENDTOT(wlc) ((wlc)->core->txpktpend[0] + (wlc)->core->txpktpend[1] + \
...@@ -881,10 +871,8 @@ extern void wlc_print_txdesc(d11txh_t *txh); ...@@ -881,10 +871,8 @@ extern void wlc_print_txdesc(d11txh_t *txh);
extern void wlc_print_dot11_mac_hdr(u8 *buf, int len); extern void wlc_print_dot11_mac_hdr(u8 *buf, int len);
#endif #endif
#ifdef WLC_LOW
extern void wlc_setxband(wlc_hw_info_t *wlc_hw, uint bandunit); extern void wlc_setxband(wlc_hw_info_t *wlc_hw, uint bandunit);
extern void wlc_coredisable(wlc_hw_info_t *wlc_hw); extern void wlc_coredisable(wlc_hw_info_t *wlc_hw);
#endif
extern bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rate, int band, extern bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rate, int band,
bool verbose); bool verbose);
......
...@@ -480,13 +480,9 @@ static __inline int _wlc_rpc_call(struct rpc_info *rpc, rpc_buf_t *send) ...@@ -480,13 +480,9 @@ static __inline int _wlc_rpc_call(struct rpc_info *rpc, rpc_buf_t *send)
#include <sbhndpio.h> #include <sbhndpio.h>
#include <d11.h> #include <d11.h>
#ifdef WLC_LOW
extern void wlc_rpc_bmac_dispatch(wlc_rpc_ctx_t *rpc_ctx, struct rpc_buf *buf); extern void wlc_rpc_bmac_dispatch(wlc_rpc_ctx_t *rpc_ctx, struct rpc_buf *buf);
extern void wlc_rpc_bmac_dump_txfifohist(wlc_hw_info_t *wlc_hw, extern void wlc_rpc_bmac_dump_txfifohist(wlc_hw_info_t *wlc_hw,
bool dump_clear); bool dump_clear);
#else
extern void wlc_rpc_high_dispatch(wlc_rpc_ctx_t *ctx, struct rpc_buf *buf);
#endif
/* Packed structure for ease of transport across RPC bus along u32 boundary */ /* Packed structure for ease of transport across RPC bus along u32 boundary */
typedef struct wlc_rpc_txstatus { typedef struct wlc_rpc_txstatus {
......
...@@ -35,12 +35,7 @@ typedef struct wlc_auth_info wlc_auth_info_t; ...@@ -35,12 +35,7 @@ typedef struct wlc_auth_info wlc_auth_info_t;
typedef struct supplicant supplicant_t; typedef struct supplicant supplicant_t;
typedef struct authenticator authenticator_t; typedef struct authenticator authenticator_t;
typedef struct antsel_info antsel_info_t; typedef struct antsel_info antsel_info_t;
#if !defined(WLC_LOW)
typedef struct rpctx_info rpctx_info_t;
#endif
#ifdef WLC_LOW
typedef struct bmac_pmq bmac_pmq_t; typedef struct bmac_pmq bmac_pmq_t;
#endif
struct d11init; struct d11init;
......
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