Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228141
b: refs/heads/master
c: 501c093
h: refs/heads/master
i:
  228139: 05a129b
v: v3
  • Loading branch information
Brett Rudley authored and Greg Kroah-Hartman committed Nov 20, 2010
1 parent 55c85c6 commit 2c30afc
Show file tree
Hide file tree
Showing 15 changed files with 1 addition and 108 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 02db6b4769e2465b872a6cd87465a3e20d4573ce
refs/heads/master: 501c09346ce74ec688113d5c6b8a321514935228
4 changes: 0 additions & 4 deletions trunk/drivers/staging/brcm80211/include/bcm_rpc_tp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_rx_fn_t) (void *, rpc_buf_t *);

#ifdef WLC_LOW
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 void bcm_rpc_tp_detach(rpc_tp_info_t *rpcb);
Expand Down Expand Up @@ -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);
#endif

#ifdef WLC_LOW
/* 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);

Expand All @@ -110,7 +107,6 @@ extern void bcm_rpc_tp_txq_wm_set(rpc_tp_info_t *rpc_th, u8 hiwm,
u8 lowm);
extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, u8 *hiwm,
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_limit_set(rpc_tp_info_t *rpc_th, u8 sf,
Expand Down
10 changes: 0 additions & 10 deletions trunk/drivers/staging/brcm80211/include/siutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@

#include <hndsoc.h>

#if !defined(WLC_LOW)
#include "bcm_rpc.h"
#endif
/*
* Data structure to export all chip specific common variables
* public (read-only) portion of siutils handle returned by si_attach()
Expand Down Expand Up @@ -50,19 +47,12 @@ struct si_pub {
uint socirev; /* SOC interconnect rev */
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 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;
#endif

/*
* Many of the routines below take an 'sih' handle as their first arg.
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/brcm80211/phy/wlc_phy_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ typedef struct shared_phy_params {
u32 boardflags2;
} shared_phy_params_t;

#ifdef WLC_LOW

extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp);
extern void wlc_phy_shared_detach(shared_phy_t *phy_sh);
Expand Down Expand Up @@ -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_anacore(wlc_phy_t *ppi, bool on);

#endif /* WLC_LOW */

extern void wlc_phy_BSSinit(wlc_phy_t *ppi, bool bonlyap, int rssi);

Expand Down
22 changes: 0 additions & 22 deletions trunk/drivers/staging/brcm80211/sys/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
#endif

#ifdef WLC_LOW
/* register our interrupt handler */
if (request_irq(irq, wl_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) {
WL_ERROR(("wl%d: request_irq() failed\n", unit));
goto fail;
}
wl->irq = irq;
#endif /* WLC_LOW */

/* register module */
wlc_module_register(wl->pub, NULL, "linux", wl, NULL, wl_linux_watchdog,
Expand Down Expand Up @@ -1349,7 +1347,6 @@ void wl_free(wl_info_t *wl)
osl_detach(osh);
}

#ifdef WLC_LOW
/* transmit a packet */
static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl)
{
Expand All @@ -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);
}
#endif /* WLC_LOW */

static int BCMFASTPATH
wl_start_int(wl_info_t *wl, struct ieee80211_hw *hw, struct sk_buff *skb)
Expand Down Expand Up @@ -1400,13 +1396,11 @@ uint wl_reset(wl_info_t *wl)
*/
void BCMFASTPATH wl_intrson(wl_info_t *wl)
{
#if defined(WLC_LOW)
unsigned long flags;

INT_LOCK(wl, flags);
wlc_intrson(wl->wlc);
INT_UNLOCK(wl, flags);
#endif /* WLC_LOW */
}

bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth)
Expand All @@ -1416,28 +1410,22 @@ bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth)

u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl)
{
#if defined(WLC_LOW)
unsigned long flags;
u32 status;

INT_LOCK(wl, flags);
status = wlc_intrsoff(wl->wlc);
INT_UNLOCK(wl, flags);
return status;
#else
return 0;
#endif /* WLC_LOW */
}

void wl_intrsrestore(wl_info_t *wl, u32 macintmask)
{
#if defined(WLC_LOW)
unsigned long flags;

INT_LOCK(wl, flags);
wlc_intrsrestore(wl->wlc, macintmask);
INT_UNLOCK(wl, flags);
#endif /* WLC_LOW */
}

int wl_up(wl_info_t *wl)
Expand Down Expand Up @@ -1473,7 +1461,6 @@ void wl_down(wl_info_t *wl)

irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
{
#if defined(WLC_LOW)
wl_info_t *wl;
bool ours, wantdpc;
unsigned long flags;
Expand All @@ -1498,14 +1485,10 @@ irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
WL_ISRUNLOCK(wl, flags);

return IRQ_RETVAL(ours);
#else
return IRQ_RETVAL(0);
#endif /* WLC_LOW */
}

static void BCMFASTPATH wl_dpc(unsigned long data)
{
#ifdef WLC_LOW
wl_info_t *wl;

wl = (wl_info_t *) data;
Expand Down Expand Up @@ -1539,7 +1522,6 @@ static void BCMFASTPATH wl_dpc(unsigned long data)

done:
WL_UNLOCK(wl);
#endif /* WLC_LOW */
}

static void wl_link_up(wl_info_t *wl, char *ifname)
Expand Down Expand Up @@ -1743,7 +1725,6 @@ char *wl_firmwares[WL_MAX_FW] = {
NULL
};

#ifdef WLC_LOW
int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx)
{
int i, entry;
Expand Down Expand Up @@ -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);
return -1;
}
#endif /* WLC_LOW */

static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev)
{
Expand Down Expand Up @@ -1833,12 +1813,10 @@ static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev)
return 0;
}

#ifdef WLC_LOW
void wl_ucode_free_buf(void *p)
{
kfree(p);
}
#endif /* WLC_LOW */

static void wl_release_fw(wl_info_t *wl)
{
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/brcm80211/sys/wl_mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ucode_data_init(wl_info_t *wl);
extern void wl_ucode_data_free(void);
#ifdef WLC_LOW
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_uint(wl_info_t *wl, u32 *data, u32 idx);
#endif /* WLC_LOW */

#endif /* _wl_mac80211_h_ */
4 changes: 0 additions & 4 deletions trunk/drivers/staging/brcm80211/sys/wlc_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
}
wlc->hw->wlc = wlc;

#ifdef WLC_LOW
wlc->hw->bandstate[0] = (wlc_hwband_t *)wlc_calloc(osh, unit,
(sizeof(wlc_hwband_t) * MAXBANDS));
if (wlc->hw->bandstate[0] == NULL) {
Expand All @@ -211,7 +210,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err,
(sizeof(wlc_hwband_t) * i));
}
}
#endif /* WLC_LOW */

wlc->modulecb = (modulecb_t *)wlc_calloc(osh, unit,
sizeof(modulecb_t) * WLC_MAXMODULES);
Expand Down Expand Up @@ -357,12 +355,10 @@ void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh)
}

if (wlc->hw) {
#ifdef WLC_LOW
if (wlc->hw->bandstate[0]) {
kfree(wlc->hw->bandstate[0]);
wlc->hw->bandstate[0] = NULL;
}
#endif

/* free hw struct */
kfree(wlc->hw);
Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/staging/brcm80211/sys/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
* call the first one
*/
if (txs->status & TX_STATUS_ACK_RCV) {
#ifdef WLC_LOW
u8 status_delay = 0;

/* wait till the next 8 bytes of txstatus is available */
Expand All @@ -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_AMPDU);
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);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/staging/brcm80211/sys/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef WLC_LOW
#error "This file needs WLC_LOW"
#endif

#include <linux/kernel.h>
#include <wlc_cfg.h>
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/brcm80211/sys/wlc_bmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ extern void wlc_bmac_watchdog(void *arg);
extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw);

/* up/down, reset, clk */
#ifdef WLC_LOW
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,
uint offset, const void *buf, int len,
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/staging/brcm80211/sys/wlc_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
#define IS_SINGLEBAND_5G(device) 0

/* 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 **** */
#define D11_DEFAULT 0x0fffffb0 /* Supported D11 revs: 4, 5, 7-27
Expand Down
18 changes: 0 additions & 18 deletions trunk/drivers/staging/brcm80211/sys/wlc_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,21 +626,11 @@ bool wlc_ps_check(wlc_info_t *wlc)

res = false;
}
#ifdef WLC_LOW
/* 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.
*/
wake = STAY_AWAKE(wlc) || wlc->hw->wake_override;
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) {
WL_ERROR(("wl%d: wake not sync, sw %d maccontrol 0x%x\n", wlc->pub->unit, wake, tmp));
res = false;
Expand Down Expand Up @@ -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->stf->hw_rxchain);

#ifdef WLC_LOW
/* pull up some info resulting from the low attach */
{
int i;
for (i = 0; i < NFIFO; i++)
wlc->core->txavail[i] = wlc->hw->txavail[i];
}
#endif /* WLC_LOW */

wlc_bmac_hw_etheraddr(wlc->hw, &wlc->perm_etheraddr);

Expand Down Expand Up @@ -2500,9 +2488,7 @@ static void wlc_watchdog(void *arg)
if (wlc->pub->radio_disabled)
return;

#ifdef WLC_LOW
wlc_bmac_watchdog(wlc);
#endif

/* occasionally sample mac stat counters to detect 16-bit counter wrap */
if ((WLC_UPDATE_STATS(wlc))
Expand Down Expand Up @@ -2531,10 +2517,8 @@ static void wlc_watchdog(void *arg)
wlc->tempsense_lasttime = wlc->pub->now;
wlc_tempsense_upd(wlc);
}
#ifdef WLC_LOW
/* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */
ASSERT(wlc_bmac_taclear(wlc->hw, true));
#endif

/* Verify that tx_prec_map and fifos are in sync to avoid lock ups */
ASSERT(wlc_tx_prec_map_verify(wlc));
Expand Down Expand Up @@ -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 */
/* 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
*/
if (!(wlc->pub->hw_off))
ASSERT(wlc_bmac_taclear(wlc->hw, ta_ok) || !ta_ok);
#endif

return bcmerror;
}
Expand Down
Loading

0 comments on commit 2c30afc

Please sign in to comment.