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

Commit 41feb5ed authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Staging: brcm80211: sys: s/uint8/u8/



Replace uint8 with u8, the correct kernel type to be using here.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Nohee Ko <noheek@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 36ef9a1e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -28,7 +28,7 @@ extern uint32 wl_intrsoff(struct wl_info *wl);
extern void wl_intrsrestore(struct wl_info *wl, uint32 macintmask);
extern void wl_intrsrestore(struct wl_info *wl, uint32 macintmask);
extern void wl_event(struct wl_info *wl, char *ifname, wlc_event_t *e);
extern void wl_event(struct wl_info *wl, char *ifname, wlc_event_t *e);
extern void wl_event_sendup(struct wl_info *wl, const wlc_event_t *e,
extern void wl_event_sendup(struct wl_info *wl, const wlc_event_t *e,
			    uint8 *data, uint32 len);
			    u8 *data, uint32 len);
extern int wl_up(struct wl_info *wl);
extern int wl_up(struct wl_info *wl);
extern void wl_down(struct wl_info *wl);
extern void wl_down(struct wl_info *wl);
extern void wl_txflowcontrol(struct wl_info *wl, struct wl_if *wlif, bool state,
extern void wl_txflowcontrol(struct wl_info *wl, struct wl_if *wlif, bool state,
+3 −3
Original line number Original line Diff line number Diff line
@@ -773,7 +773,7 @@ static wl_info_t *wl_attach(uint16 vendor, uint16 device, ulong regs,


	ulong base_addr;
	ulong base_addr;
	struct ieee80211_hw *hw;
	struct ieee80211_hw *hw;
	uint8 perm[ETH_ALEN];
	u8 perm[ETH_ALEN];


	unit = wl_found + instance_base;
	unit = wl_found + instance_base;
	err = 0;
	err = 0;
@@ -2285,7 +2285,7 @@ char *wl_firmwares[WL_MAX_FW] = {
int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, uint32 idx)
int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, uint32 idx)
{
{
	int i, entry;
	int i, entry;
	const uint8 *pdata;
	const u8 *pdata;
	struct wl_fw_hdr *hdr;
	struct wl_fw_hdr *hdr;
	for (i = 0; i < wl->fw.fw_cnt; i++) {
	for (i = 0; i < wl->fw.fw_cnt; i++) {
		hdr = (struct wl_fw_hdr *)wl->fw.fw_hdr[i]->data;
		hdr = (struct wl_fw_hdr *)wl->fw.fw_hdr[i]->data;
@@ -2311,7 +2311,7 @@ int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, uint32 idx)
int wl_ucode_init_uint(wl_info_t *wl, uint32 *data, uint32 idx)
int wl_ucode_init_uint(wl_info_t *wl, uint32 *data, uint32 idx)
{
{
	int i, entry;
	int i, entry;
	const uint8 *pdata;
	const u8 *pdata;
	struct wl_fw_hdr *hdr;
	struct wl_fw_hdr *hdr;
	for (i = 0; i < wl->fw.fw_cnt; i++) {
	for (i = 0; i < wl->fw.fw_cnt; i++) {
		hdr = (struct wl_fw_hdr *)wl->fw.fw_hdr[i]->data;
		hdr = (struct wl_fw_hdr *)wl->fw.fw_hdr[i]->data;
+55 −55
Original line number Original line Diff line number Diff line
@@ -91,7 +91,7 @@ uint32 wl_ampdu_dbg =
 */
 */
typedef struct wlc_fifo_info {
typedef struct wlc_fifo_info {
	uint16 ampdu_pld_size;	/* number of bytes to be pre-loaded */
	uint16 ampdu_pld_size;	/* number of bytes to be pre-loaded */
	uint8 mcs2ampdu_table[FFPLD_MAX_MCS + 1];	/* per-mcs max # of mpdus in an ampdu */
	u8 mcs2ampdu_table[FFPLD_MAX_MCS + 1];	/* per-mcs max # of mpdus in an ampdu */
	uint16 prev_txfunfl;	/* num of underflows last read from the HW macstats counter */
	uint16 prev_txfunfl;	/* num of underflows last read from the HW macstats counter */
	uint32 accum_txfunfl;	/* num of underflows since we modified pld params */
	uint32 accum_txfunfl;	/* num of underflows since we modified pld params */
	uint32 accum_txampdu;	/* num of tx ampdu since we modified pld params  */
	uint32 accum_txampdu;	/* num of tx ampdu since we modified pld params  */
@@ -103,19 +103,19 @@ typedef struct wlc_fifo_info {
struct ampdu_info {
struct ampdu_info {
	wlc_info_t *wlc;	/* pointer to main wlc structure */
	wlc_info_t *wlc;	/* pointer to main wlc structure */
	int scb_handle;		/* scb cubby handle to retrieve data from scb */
	int scb_handle;		/* scb cubby handle to retrieve data from scb */
	uint8 ini_enable[AMPDU_MAX_SCB_TID];	/* per-tid initiator enable/disable of ampdu */
	u8 ini_enable[AMPDU_MAX_SCB_TID];	/* per-tid initiator enable/disable of ampdu */
	uint8 ba_tx_wsize;	/* Tx ba window size (in pdu) */
	u8 ba_tx_wsize;	/* Tx ba window size (in pdu) */
	uint8 ba_rx_wsize;	/* Rx ba window size (in pdu) */
	u8 ba_rx_wsize;	/* Rx ba window size (in pdu) */
	uint8 retry_limit;	/* mpdu transmit retry limit */
	u8 retry_limit;	/* mpdu transmit retry limit */
	uint8 rr_retry_limit;	/* mpdu transmit retry limit at regular rate */
	u8 rr_retry_limit;	/* mpdu transmit retry limit at regular rate */
	uint8 retry_limit_tid[AMPDU_MAX_SCB_TID];	/* per-tid mpdu transmit retry limit */
	u8 retry_limit_tid[AMPDU_MAX_SCB_TID];	/* per-tid mpdu transmit retry limit */
	/* per-tid mpdu transmit retry limit at regular rate */
	/* per-tid mpdu transmit retry limit at regular rate */
	uint8 rr_retry_limit_tid[AMPDU_MAX_SCB_TID];
	u8 rr_retry_limit_tid[AMPDU_MAX_SCB_TID];
	uint8 mpdu_density;	/* min mpdu spacing (0-7) ==> 2^(x-1)/8 usec */
	u8 mpdu_density;	/* min mpdu spacing (0-7) ==> 2^(x-1)/8 usec */
	int8 max_pdu;		/* max pdus allowed in ampdu */
	int8 max_pdu;		/* max pdus allowed in ampdu */
	uint8 dur;		/* max duration of an ampdu (in msec) */
	u8 dur;		/* max duration of an ampdu (in msec) */
	uint8 txpkt_weight;	/* weight of ampdu in txfifo; reduces rate lag */
	u8 txpkt_weight;	/* weight of ampdu in txfifo; reduces rate lag */
	uint8 rx_factor;	/* maximum rx ampdu factor (0-3) ==> 2^(13+x) bytes */
	u8 rx_factor;	/* maximum rx ampdu factor (0-3) ==> 2^(13+x) bytes */
	uint32 ffpld_rsvd;	/* number of bytes to reserve for preload */
	uint32 ffpld_rsvd;	/* number of bytes to reserve for preload */
	uint32 max_txlen[MCS_TABLE_SIZE][2][2];	/* max size of ampdu per mcs, bw and sgi */
	uint32 max_txlen[MCS_TABLE_SIZE][2][2];	/* max size of ampdu per mcs, bw and sgi */
	void *ini_free[AMPDU_INI_FREE];	/* array of ini's to be freed on detach */
	void *ini_free[AMPDU_INI_FREE];	/* array of ini's to be freed on detach */
@@ -144,10 +144,10 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f);


static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
						   scb_ampdu_t *scb_ampdu,
						   scb_ampdu_t *scb_ampdu,
						   uint8 tid, bool override);
						   u8 tid, bool override);
static void ampdu_cleanup_tid_ini(ampdu_info_t *ampdu, scb_ampdu_t *scb_ampdu,
static void ampdu_cleanup_tid_ini(ampdu_info_t *ampdu, scb_ampdu_t *scb_ampdu,
				  uint8 tid, bool force);
				  u8 tid, bool force);
static void ampdu_update_max_txlen(ampdu_info_t *ampdu, uint8 dur);
static void ampdu_update_max_txlen(ampdu_info_t *ampdu, u8 dur);
static void scb_ampdu_update_config(ampdu_info_t *ampdu, struct scb *scb);
static void scb_ampdu_update_config(ampdu_info_t *ampdu, struct scb *scb);
static void scb_ampdu_update_config_all(ampdu_info_t *ampdu);
static void scb_ampdu_update_config_all(ampdu_info_t *ampdu);


@@ -163,7 +163,7 @@ static inline uint16 pkt_txh_seqnum(wlc_info_t *wlc, void *p)
	d11txh_t *txh;
	d11txh_t *txh;
	struct dot11_header *h;
	struct dot11_header *h;
	txh = (d11txh_t *) PKTDATA(p);
	txh = (d11txh_t *) PKTDATA(p);
	h = (struct dot11_header *)((uint8 *) (txh + 1) + D11_PHY_HDR_LEN);
	h = (struct dot11_header *)((u8 *) (txh + 1) + D11_PHY_HDR_LEN);
	return ltoh16(h->seq) >> SEQNUM_SHIFT;
	return ltoh16(h->seq) >> SEQNUM_SHIFT;
}
}


@@ -255,7 +255,7 @@ void BCMATTACHFN(wlc_ampdu_detach) (ampdu_info_t *ampdu)
void scb_ampdu_cleanup(ampdu_info_t *ampdu, struct scb *scb)
void scb_ampdu_cleanup(ampdu_info_t *ampdu, struct scb *scb)
{
{
	scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
	scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
	uint8 tid;
	u8 tid;


	WL_AMPDU_UPDN(("scb_ampdu_cleanup: enter\n"));
	WL_AMPDU_UPDN(("scb_ampdu_cleanup: enter\n"));
	ASSERT(scb_ampdu);
	ASSERT(scb_ampdu);
@@ -278,7 +278,7 @@ static void scb_ampdu_update_config(ampdu_info_t *ampdu, struct scb *scb)
	scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
	scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
	int i;
	int i;


	scb_ampdu->max_pdu = (uint8) ampdu->wlc->pub->tunables->ampdunummpdu;
	scb_ampdu->max_pdu = (u8) ampdu->wlc->pub->tunables->ampdunummpdu;


	/* go back to legacy size if some preloading is occuring */
	/* go back to legacy size if some preloading is occuring */
	for (i = 0; i < NUM_FFPLD_FIFO; i++) {
	for (i = 0; i < NUM_FFPLD_FIFO; i++) {
@@ -288,7 +288,7 @@ static void scb_ampdu_update_config(ampdu_info_t *ampdu, struct scb *scb)


	/* apply user override */
	/* apply user override */
	if (ampdu->max_pdu != AUTO)
	if (ampdu->max_pdu != AUTO)
		scb_ampdu->max_pdu = (uint8) ampdu->max_pdu;
		scb_ampdu->max_pdu = (u8) ampdu->max_pdu;


	scb_ampdu->release = MIN(scb_ampdu->max_pdu, AMPDU_SCB_MAX_RELEASE);
	scb_ampdu->release = MIN(scb_ampdu->max_pdu, AMPDU_SCB_MAX_RELEASE);


@@ -337,7 +337,7 @@ static int wlc_ffpld_check_txfunfl(wlc_info_t *wlc, int fid)
	ampdu_info_t *ampdu = wlc->ampdu;
	ampdu_info_t *ampdu = wlc->ampdu;
	uint32 phy_rate = MCS_RATE(FFPLD_MAX_MCS, TRUE, FALSE);
	uint32 phy_rate = MCS_RATE(FFPLD_MAX_MCS, TRUE, FALSE);
	uint32 txunfl_ratio;
	uint32 txunfl_ratio;
	uint8 max_mpdu;
	u8 max_mpdu;
	uint32 current_ampdu_cnt = 0;
	uint32 current_ampdu_cnt = 0;
	uint16 max_pld_size;
	uint16 max_pld_size;
	uint32 new_txunfl;
	uint32 new_txunfl;
@@ -456,7 +456,7 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f)
{
{
	int i;
	int i;
	uint32 phy_rate, dma_rate, tmp;
	uint32 phy_rate, dma_rate, tmp;
	uint8 max_mpdu;
	u8 max_mpdu;
	wlc_fifo_info_t *fifo = (ampdu->fifo_tb + f);
	wlc_fifo_info_t *fifo = (ampdu->fifo_tb + f);


	/* recompute the dma rate */
	/* recompute the dma rate */
@@ -479,7 +479,7 @@ static void wlc_ffpld_calc_mcs2ampdu_table(ampdu_info_t *ampdu, int f)
			tmp = ((fifo->ampdu_pld_size * phy_rate) /
			tmp = ((fifo->ampdu_pld_size * phy_rate) /
			       ((phy_rate - dma_rate) * FFPLD_MPDU_SIZE)) + 1;
			       ((phy_rate - dma_rate) * FFPLD_MPDU_SIZE)) + 1;
			tmp = MIN(tmp, 255);
			tmp = MIN(tmp, 255);
			fifo->mcs2ampdu_table[i] = (uint8) tmp;
			fifo->mcs2ampdu_table[i] = (u8) tmp;
		}
		}
	}
	}
}
}
@@ -489,7 +489,7 @@ wlc_ampdu_agg(ampdu_info_t *ampdu, struct scb *scb, void *p, uint prec)
{
{
	scb_ampdu_t *scb_ampdu;
	scb_ampdu_t *scb_ampdu;
	scb_ampdu_tid_ini_t *ini;
	scb_ampdu_tid_ini_t *ini;
	uint8 tid = (uint8) PKTPRIO(p);
	u8 tid = (u8) PKTPRIO(p);


	scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
	scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);


@@ -507,30 +507,30 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
	wlc_info_t *wlc;
	wlc_info_t *wlc;
	osl_t *osh;
	osl_t *osh;
	void *p, *pkt[AMPDU_MAX_MPDU];
	void *p, *pkt[AMPDU_MAX_MPDU];
	uint8 tid, ndelim;
	u8 tid, ndelim;
	int err = 0;
	int err = 0;
	uint8 preamble_type = WLC_GF_PREAMBLE;
	u8 preamble_type = WLC_GF_PREAMBLE;
	uint8 fbr_preamble_type = WLC_GF_PREAMBLE;
	u8 fbr_preamble_type = WLC_GF_PREAMBLE;
	uint8 rts_preamble_type = WLC_LONG_PREAMBLE;
	u8 rts_preamble_type = WLC_LONG_PREAMBLE;
	uint8 rts_fbr_preamble_type = WLC_LONG_PREAMBLE;
	u8 rts_fbr_preamble_type = WLC_LONG_PREAMBLE;


	bool rr = TRUE, fbr = FALSE;
	bool rr = TRUE, fbr = FALSE;
	uint i, count = 0, fifo, seg_cnt = 0;
	uint i, count = 0, fifo, seg_cnt = 0;
	uint16 plen, len, seq = 0, mcl, mch, index, frameid, dma_len = 0;
	uint16 plen, len, seq = 0, mcl, mch, index, frameid, dma_len = 0;
	uint32 ampdu_len, maxlen = 0;
	uint32 ampdu_len, maxlen = 0;
	d11txh_t *txh = NULL;
	d11txh_t *txh = NULL;
	uint8 *plcp;
	u8 *plcp;
	struct dot11_header *h;
	struct dot11_header *h;
	struct scb *scb;
	struct scb *scb;
	scb_ampdu_t *scb_ampdu;
	scb_ampdu_t *scb_ampdu;
	scb_ampdu_tid_ini_t *ini;
	scb_ampdu_tid_ini_t *ini;
	uint8 mcs = 0;
	u8 mcs = 0;
	bool use_rts = FALSE, use_cts = FALSE;
	bool use_rts = FALSE, use_cts = FALSE;
	ratespec_t rspec = 0, rspec_fallback = 0;
	ratespec_t rspec = 0, rspec_fallback = 0;
	ratespec_t rts_rspec = 0, rts_rspec_fallback = 0;
	ratespec_t rts_rspec = 0, rts_rspec_fallback = 0;
	uint16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ;
	uint16 mimo_ctlchbw = PHY_TXC1_BW_20MHZ;
	struct dot11_rts_frame *rts;
	struct dot11_rts_frame *rts;
	uint8 rr_retry_limit;
	u8 rr_retry_limit;
	wlc_fifo_info_t *f;
	wlc_fifo_info_t *f;
	bool fbr_iscck;
	bool fbr_iscck;
	struct ieee80211_tx_info *tx_info;
	struct ieee80211_tx_info *tx_info;
@@ -542,7 +542,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)


	ASSERT(p);
	ASSERT(p);


	tid = (uint8) PKTPRIO(p);
	tid = (u8) PKTPRIO(p);
	ASSERT(tid < AMPDU_MAX_SCB_TID);
	ASSERT(tid < AMPDU_MAX_SCB_TID);


	f = ampdu->fifo_tb + prio2fifo[tid];
	f = ampdu->fifo_tb + prio2fifo[tid];
@@ -603,7 +603,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)
		/* pkt is good to be aggregated */
		/* pkt is good to be aggregated */
		ASSERT(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
		ASSERT(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
		txh = (d11txh_t *) PKTDATA(p);
		txh = (d11txh_t *) PKTDATA(p);
		plcp = (uint8 *) (txh + 1);
		plcp = (u8 *) (txh + 1);
		h = (struct dot11_header *)(plcp + D11_PHY_HDR_LEN);
		h = (struct dot11_header *)(plcp + D11_PHY_HDR_LEN);
		seq = ltoh16(h->seq) >> SEQNUM_SHIFT;
		seq = ltoh16(h->seq) >> SEQNUM_SHIFT;
		index = TX_SEQ_TO_INDEX(seq);
		index = TX_SEQ_TO_INDEX(seq);
@@ -676,7 +676,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)


		/* patch the first MPDU */
		/* patch the first MPDU */
		if (count == 1) {
		if (count == 1) {
			uint8 plcp0, plcp3, is40, sgi;
			u8 plcp0, plcp3, is40, sgi;
			struct ieee80211_sta *sta;
			struct ieee80211_sta *sta;


			sta = tx_info->control.sta;
			sta = tx_info->control.sta;
@@ -757,7 +757,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)


		if (p) {
		if (p) {
			if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
			if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
			    ((uint8) PKTPRIO(p) == tid)) {
			    ((u8) PKTPRIO(p) == tid)) {


				plen =
				plen =
				    pkttotlen(osh, p) + AMPDU_MAX_MPDU_OVERHEAD;
				    pkttotlen(osh, p) + AMPDU_MAX_MPDU_OVERHEAD;
@@ -810,7 +810,7 @@ wlc_sendampdu(ampdu_info_t *ampdu, wlc_txq_info_t *qi, void **pdu, int prec)


		/* patch up the first txh & plcp */
		/* patch up the first txh & plcp */
		txh = (d11txh_t *) PKTDATA(pkt[0]);
		txh = (d11txh_t *) PKTDATA(pkt[0]);
		plcp = (uint8 *) (txh + 1);
		plcp = (u8 *) (txh + 1);


		WLC_SET_MIMO_PLCP_LEN(plcp, ampdu_len);
		WLC_SET_MIMO_PLCP_LEN(plcp, ampdu_len);
		/* mark plcp to indicate ampdu */
		/* mark plcp to indicate ampdu */
@@ -933,7 +933,7 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p,
	 */
	 */
	if (txs->status & TX_STATUS_ACK_RCV) {
	if (txs->status & TX_STATUS_ACK_RCV) {
#ifdef WLC_LOW
#ifdef WLC_LOW
		uint8 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 */
		while (((s1 =
		while (((s1 =
@@ -994,11 +994,11 @@ void wlc_ampdu_txstatus_complete(ampdu_info_t *ampdu, uint32 s1, uint32 s2)
}
}
#endif				/* WLC_HIGH_ONLY */
#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, uint8 mcs);
		 tx_status_t *txs, u8 mcs);


void
void
rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
rate_status(wlc_info_t *wlc, struct ieee80211_tx_info *tx_info,
	    tx_status_t *txs, uint8 mcs)
	    tx_status_t *txs, u8 mcs)
{
{
	struct ieee80211_tx_rate *txrate = tx_info->status.rates;
	struct ieee80211_tx_rate *txrate = tx_info->status.rates;
	int i;
	int i;
@@ -1022,23 +1022,23 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p,
	scb_ampdu_t *scb_ampdu;
	scb_ampdu_t *scb_ampdu;
	wlc_info_t *wlc = ampdu->wlc;
	wlc_info_t *wlc = ampdu->wlc;
	scb_ampdu_tid_ini_t *ini;
	scb_ampdu_tid_ini_t *ini;
	uint8 bitmap[8], queue, tid;
	u8 bitmap[8], queue, tid;
	d11txh_t *txh;
	d11txh_t *txh;
	uint8 *plcp;
	u8 *plcp;
	struct dot11_header *h;
	struct dot11_header *h;
	uint16 seq, start_seq = 0, bindex, index, mcl;
	uint16 seq, start_seq = 0, bindex, index, mcl;
	uint8 mcs = 0;
	u8 mcs = 0;
	bool ba_recd = FALSE, ack_recd = FALSE;
	bool ba_recd = FALSE, ack_recd = FALSE;
	uint8 suc_mpdu = 0, tot_mpdu = 0;
	u8 suc_mpdu = 0, tot_mpdu = 0;
	uint supr_status;
	uint supr_status;
	bool update_rate = TRUE, retry = TRUE, tx_error = FALSE;
	bool update_rate = TRUE, retry = TRUE, tx_error = FALSE;
	uint16 mimoantsel = 0;
	uint16 mimoantsel = 0;
	uint8 antselid = 0;
	u8 antselid = 0;
	uint8 retry_limit, rr_retry_limit;
	u8 retry_limit, rr_retry_limit;
	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p);
	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(p);


#ifdef BCMDBG
#ifdef BCMDBG
	uint8 hole[AMPDU_MAX_MPDU];
	u8 hole[AMPDU_MAX_MPDU];
	bzero(hole, sizeof(hole));
	bzero(hole, sizeof(hole));
#endif
#endif


@@ -1048,7 +1048,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p,
	scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
	scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
	ASSERT(scb_ampdu);
	ASSERT(scb_ampdu);


	tid = (uint8) PKTPRIO(p);
	tid = (u8) PKTPRIO(p);


	ini = SCB_AMPDU_INI(scb_ampdu, tid);
	ini = SCB_AMPDU_INI(scb_ampdu, tid);
	retry_limit = ampdu->retry_limit_tid[tid];
	retry_limit = ampdu->retry_limit_tid[tid];
@@ -1146,7 +1146,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p,
		ASSERT(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
		ASSERT(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
		txh = (d11txh_t *) PKTDATA(p);
		txh = (d11txh_t *) PKTDATA(p);
		mcl = ltoh16(txh->MacTxControlLow);
		mcl = ltoh16(txh->MacTxControlLow);
		plcp = (uint8 *) (txh + 1);
		plcp = (u8 *) (txh + 1);
		h = (struct dot11_header *)(plcp + D11_PHY_HDR_LEN);
		h = (struct dot11_header *)(plcp + D11_PHY_HDR_LEN);
		seq = ltoh16(h->seq) >> SEQNUM_SHIFT;
		seq = ltoh16(h->seq) >> SEQNUM_SHIFT;


@@ -1244,7 +1244,7 @@ wlc_ampdu_dotxstatus_complete(ampdu_info_t *ampdu, struct scb *scb, void *p,
}
}


static void
static void
ampdu_cleanup_tid_ini(ampdu_info_t *ampdu, scb_ampdu_t *scb_ampdu, uint8 tid,
ampdu_cleanup_tid_ini(ampdu_info_t *ampdu, scb_ampdu_t *scb_ampdu, u8 tid,
		      bool force)
		      bool force)
{
{
	scb_ampdu_tid_ini_t *ini;
	scb_ampdu_tid_ini_t *ini;
@@ -1268,7 +1268,7 @@ ampdu_cleanup_tid_ini(ampdu_info_t *ampdu, scb_ampdu_t *scb_ampdu, uint8 tid,
/* initialize the initiator code for tid */
/* initialize the initiator code for tid */
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(ampdu_info_t *ampdu,
						   scb_ampdu_t *scb_ampdu,
						   scb_ampdu_t *scb_ampdu,
						   uint8 tid, bool override)
						   u8 tid, bool override)
{
{
	scb_ampdu_tid_ini_t *ini;
	scb_ampdu_tid_ini_t *ini;


@@ -1323,7 +1323,7 @@ bool wlc_ampdu_cap(ampdu_info_t *ampdu)
		return FALSE;
		return FALSE;
}
}


static void ampdu_update_max_txlen(ampdu_info_t *ampdu, uint8 dur)
static void ampdu_update_max_txlen(ampdu_info_t *ampdu, u8 dur)
{
{
	uint32 rate, mcs;
	uint32 rate, mcs;


@@ -1344,13 +1344,13 @@ static void ampdu_update_max_txlen(ampdu_info_t *ampdu, uint8 dur)
	}
	}
}
}


uint8 BCMFASTPATH
u8 BCMFASTPATH
wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
			 ratespec_t rspec, int phylen)
			 ratespec_t rspec, int phylen)
{
{
	scb_ampdu_t *scb_ampdu;
	scb_ampdu_t *scb_ampdu;
	int bytes, cnt, tmp;
	int bytes, cnt, tmp;
	uint8 tx_density;
	u8 tx_density;


	ASSERT(scb);
	ASSERT(scb);
	ASSERT(SCB_AMPDU(scb));
	ASSERT(SCB_AMPDU(scb));
@@ -1376,7 +1376,7 @@ wlc_ampdu_null_delim_cnt(ampdu_info_t *ampdu, struct scb *scb,
	if (bytes > phylen) {
	if (bytes > phylen) {
		cnt = CEIL(bytes - phylen, AMPDU_DELIMITER_LEN);
		cnt = CEIL(bytes - phylen, AMPDU_DELIMITER_LEN);
		ASSERT(cnt <= 255);
		ASSERT(cnt <= 255);
		return (uint8) cnt;
		return (u8) cnt;
	} else
	} else
		return 0;
		return 0;
}
}
@@ -1392,7 +1392,7 @@ void wlc_ampdu_macaddr_upd(wlc_info_t *wlc)
			       template);
			       template);
}
}


bool wlc_aggregatable(wlc_info_t *wlc, uint8 tid)
bool wlc_aggregatable(wlc_info_t *wlc, u8 tid)
{
{
	return wlc->ampdu->ini_enable[tid];
	return wlc->ampdu->ini_enable[tid];
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -29,7 +29,7 @@ extern void wlc_ampdu_reset(ampdu_info_t *ampdu);
extern void wlc_ampdu_macaddr_upd(wlc_info_t *wlc);
extern void wlc_ampdu_macaddr_upd(wlc_info_t *wlc);
extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu);
extern void wlc_ampdu_shm_upd(ampdu_info_t *ampdu);


extern uint8 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
#ifdef WLC_HIGH_ONLY
+16 −16
Original line number Original line Diff line number Diff line
@@ -60,8 +60,8 @@


/* static functions */
/* static functions */
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel);
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel);
static uint8 wlc_antsel_id2antcfg(antsel_info_t *asi, uint8 id);
static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id);
static uint16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, uint8 ant_cfg);
static uint16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg);
static void wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel,
static void wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel,
				bool auto_sel);
				bool auto_sel);


@@ -72,7 +72,7 @@ const uint16 mimo_2x4_div_antselpat_tbl[] = {
	0, 0, 0, 0		/* n.a.              */
	0, 0, 0, 0		/* n.a.              */
};
};


const uint8 mimo_2x4_div_antselid_tbl[16] = {
const u8 mimo_2x4_div_antselid_tbl[16] = {
	0, 0, 0, 0, 0, 2, 3, 0,
	0, 0, 0, 0, 0, 2, 3, 0,
	0, 0, 1, 0, 0, 0, 0, 0	/* pat to antselid */
	0, 0, 1, 0, 0, 0, 0, 0	/* pat to antselid */
};
};
@@ -84,7 +84,7 @@ const uint16 mimo_2x3_div_antselpat_tbl[] = {
	16, 16, 16, 16		/* n.a.              */
	16, 16, 16, 16		/* n.a.              */
};
};


const uint8 mimo_2x3_div_antselid_tbl[16] = {
const u8 mimo_2x3_div_antselid_tbl[16] = {
	0, 1, 2, 0, 0, 0, 0, 0,
	0, 1, 2, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0	/* pat to antselid */
	0, 0, 0, 0, 0, 0, 0, 0	/* pat to antselid */
};
};
@@ -106,7 +106,7 @@ antsel_info_t *BCMNMIATTACHFN(wlc_antsel_attach) (wlc_info_t *wlc, osl_t *osh,
	asi->pub = pub;
	asi->pub = pub;
	asi->antsel_type = ANTSEL_NA;
	asi->antsel_type = ANTSEL_NA;
	asi->antsel_avail = FALSE;
	asi->antsel_avail = FALSE;
	asi->antsel_antswitch = (uint8) getintvar(asi->pub->vars, "antswitch");
	asi->antsel_antswitch = (u8) getintvar(asi->pub->vars, "antswitch");


	if ((asi->pub->sromrev >= 4) && (asi->antsel_antswitch != 0)) {
	if ((asi->pub->sromrev >= 4) && (asi->antsel_antswitch != 0)) {
		switch (asi->antsel_antswitch) {
		switch (asi->antsel_antswitch) {
@@ -176,7 +176,7 @@ wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel,
		    bool auto_sel)
		    bool auto_sel)
{
{
	if (asi->antsel_type == ANTSEL_2x3) {
	if (asi->antsel_type == ANTSEL_2x3) {
		uint8 antcfg_def = ANT_SELCFG_DEF_2x3 |
		u8 antcfg_def = ANT_SELCFG_DEF_2x3 |
		    ((asi->antsel_avail && auto_sel) ? ANT_SELCFG_AUTO : 0);
		    ((asi->antsel_avail && auto_sel) ? ANT_SELCFG_AUTO : 0);
		antsel->ant_config[ANT_SELCFG_TX_DEF] = antcfg_def;
		antsel->ant_config[ANT_SELCFG_TX_DEF] = antcfg_def;
		antsel->ant_config[ANT_SELCFG_TX_UNICAST] = antcfg_def;
		antsel->ant_config[ANT_SELCFG_TX_UNICAST] = antcfg_def;
@@ -204,10 +204,10 @@ wlc_antsel_init_cfg(antsel_info_t *asi, wlc_antselcfg_t *antsel,


void BCMFASTPATH
void BCMFASTPATH
wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel,
wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel,
		      uint8 antselid, uint8 fbantselid, uint8 *antcfg,
		      u8 antselid, u8 fbantselid, u8 *antcfg,
		      uint8 *fbantcfg)
		      u8 *fbantcfg)
{
{
	uint8 ant;
	u8 ant;


	/* if use default, assign it and return */
	/* if use default, assign it and return */
	if (usedef) {
	if (usedef) {
@@ -235,9 +235,9 @@ wlc_antsel_antcfg_get(antsel_info_t *asi, bool usedef, bool sel,
}
}


/* boardlevel antenna selection: convert mimo_antsel (ucode interface) to id */
/* boardlevel antenna selection: convert mimo_antsel (ucode interface) to id */
uint8 wlc_antsel_antsel2id(antsel_info_t *asi, uint16 antsel)
u8 wlc_antsel_antsel2id(antsel_info_t *asi, uint16 antsel)
{
{
	uint8 antselid = 0;
	u8 antselid = 0;


	if (asi->antsel_type == ANTSEL_2x4) {
	if (asi->antsel_type == ANTSEL_2x4) {
		/* 2x4 antenna diversity board, 4 cfgs: 0-2 0-3 1-2 1-3 */
		/* 2x4 antenna diversity board, 4 cfgs: 0-2 0-3 1-2 1-3 */
@@ -254,9 +254,9 @@ uint8 wlc_antsel_antsel2id(antsel_info_t *asi, uint16 antsel)
}
}


/* boardlevel antenna selection: convert id to ant_cfg */
/* boardlevel antenna selection: convert id to ant_cfg */
static uint8 wlc_antsel_id2antcfg(antsel_info_t *asi, uint8 id)
static u8 wlc_antsel_id2antcfg(antsel_info_t *asi, u8 id)
{
{
	uint8 antcfg = ANT_SELCFG_DEF_2x2;
	u8 antcfg = ANT_SELCFG_DEF_2x2;


	if (asi->antsel_type == ANTSEL_2x4) {
	if (asi->antsel_type == ANTSEL_2x4) {
		/* 2x4 antenna diversity board, 4 cfgs: 0-2 0-3 1-2 1-3 */
		/* 2x4 antenna diversity board, 4 cfgs: 0-2 0-3 1-2 1-3 */
@@ -273,9 +273,9 @@ static uint8 wlc_antsel_id2antcfg(antsel_info_t *asi, uint8 id)
}
}


/* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */
/* boardlevel antenna selection: convert ant_cfg to mimo_antsel (ucode interface) */
static uint16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, uint8 ant_cfg)
static uint16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, u8 ant_cfg)
{
{
	uint8 idx = WLC_ANTIDX_11N(WLC_ANTSEL_11N(ant_cfg));
	u8 idx = WLC_ANTIDX_11N(WLC_ANTSEL_11N(ant_cfg));
	uint16 mimo_antsel = 0;
	uint16 mimo_antsel = 0;


	if (asi->antsel_type == ANTSEL_2x4) {
	if (asi->antsel_type == ANTSEL_2x4) {
@@ -296,7 +296,7 @@ static uint16 wlc_antsel_antcfg2antsel(antsel_info_t *asi, uint8 ant_cfg)
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel)
static int wlc_antsel_cfgupd(antsel_info_t *asi, wlc_antselcfg_t *antsel)
{
{
	wlc_info_t *wlc = asi->wlc;
	wlc_info_t *wlc = asi->wlc;
	uint8 ant_cfg;
	u8 ant_cfg;
	uint16 mimo_antsel;
	uint16 mimo_antsel;


	ASSERT(asi->antsel_type != ANTSEL_NA);
	ASSERT(asi->antsel_type != ANTSEL_NA);
Loading