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

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

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
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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;
+0 −498

File changed.

Preview size limit exceeded, changes collapsed.

+0 −30
Original line number Diff line number Diff line
@@ -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;
+0 −5
Original line number Diff line number Diff line
@@ -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,
+0 −53
Original line number Diff line number Diff line
@@ -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) {
Loading