Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -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);
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,
				  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,
+0 −10
Original line number Original line Diff line number Diff line
@@ -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 {
	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.
+0 −2
Original line number Original line Diff line number Diff line
@@ -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);
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);


+0 −22
Original line number Original line Diff line number Diff line
@@ -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)
	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)


	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)
 */
 */
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)


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)
	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)


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)
	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)


 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] = {
	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)
	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)
	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)
{
{
+0 −2
Original line number Original line Diff line number Diff line
@@ -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_ */
Loading