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

Commit f3b6a488 authored by John W. Linville's avatar John W. Linville
Browse files
Conflicts:
	drivers/net/wireless/ath/ath9k/recv.c
	drivers/net/wireless/mwifiex/pcie.c
parents c14c5d99 adb07df1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band)
		ath5k_hw_reg_write(ah, 0x00010000, AR5K_PHY(0x20));

	if (ah->ah_version == AR5K_AR5210) {
		srev = ath5k_hw_reg_read(ah, AR5K_PHY(256) >> 28) & 0xf;
		srev = (ath5k_hw_reg_read(ah, AR5K_PHY(256)) >> 28) & 0xf;
		ret = (u16)ath5k_hw_bitswap(srev, 4) + 1;
	} else {
		srev = (ath5k_hw_reg_read(ah, AR5K_PHY(0x100)) >> 24) & 0xff;
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ static const u32 ar9462_2p0_baseband_postamble[][5] = {
	{0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3236605e, 0x32365a5e},
	{0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
	{0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c},
	{0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce},
	{0x00009e20, 0x000003a5, 0x000003a5, 0x000003a5, 0x000003a5},
	{0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021},
	{0x00009e3c, 0xcf946220, 0xcf946220, 0xcfd5c782, 0xcfd5c282},
	{0x00009e44, 0x62321e27, 0x62321e27, 0xfe291e27, 0xfe291e27},
@@ -96,7 +96,7 @@ static const u32 ar9462_2p0_baseband_postamble[][5] = {
	{0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x00100000},
	{0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
	{0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
	{0x0000ae20, 0x000001b5, 0x000001b5, 0x000001ce, 0x000001ce},
	{0x0000ae20, 0x000001a6, 0x000001a6, 0x000001aa, 0x000001aa},
	{0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550},
};

+7 −1
Original line number Diff line number Diff line
@@ -1533,7 +1533,7 @@ EXPORT_SYMBOL(ath9k_hw_check_nav);
bool ath9k_hw_check_alive(struct ath_hw *ah)
{
	int count = 50;
	u32 reg;
	u32 reg, last_val;

	if (AR_SREV_9300(ah))
		return !ath9k_hw_detect_mac_hang(ah);
@@ -1541,9 +1541,13 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)
	if (AR_SREV_9285_12_OR_LATER(ah))
		return true;

	last_val = REG_READ(ah, AR_OBS_BUS_1);
	do {
		reg = REG_READ(ah, AR_OBS_BUS_1);
		if (reg != last_val)
			return true;

		last_val = reg;
		if ((reg & 0x7E7FFFEF) == 0x00702400)
			continue;

@@ -1555,6 +1559,8 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)
		default:
			return true;
		}

		udelay(1);
	} while (count-- > 0);

	return false;
+34 −33
Original line number Diff line number Diff line
@@ -731,6 +731,12 @@ static struct ath_rxbuf *ath_get_next_rx_buf(struct ath_softc *sc,
		if (ret == -EINPROGRESS)
			return NULL;

		/*
		 * Re-check previous descriptor, in case it has been filled
		 * in the mean time.
		 */
		ret = ath9k_hw_rxprocdesc(ah, ds, rs);
		if (ret == -EINPROGRESS) {
			/*
			 * mark descriptor as zero-length and set the 'more'
			 * flag to ensure that both buffers get discarded
@@ -738,6 +744,7 @@ static struct ath_rxbuf *ath_get_next_rx_buf(struct ath_softc *sc,
			rs->rs_datalen = 0;
			rs->rs_more = true;
		}
	}

	list_del(&bf->list);
	if (!bf->bf_mpdu)
@@ -787,22 +794,22 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
	struct ath_common *common = ath9k_hw_common(ah);
	struct ieee80211_hdr *hdr;
	bool discard_current = sc->rx.discard_next;
	int ret = 0;

	/*
	 * Discard corrupt descriptors which are marked in
	 * ath_get_next_rx_buf().
	 */
	sc->rx.discard_next = rx_stats->rs_more;
	if (discard_current)
		return -EINVAL;
		goto corrupt;

	sc->rx.discard_next = false;

	/*
	 * Discard zero-length packets.
	 */
	if (!rx_stats->rs_datalen) {
		RX_STAT_INC(rx_len_err);
		return -EINVAL;
		goto corrupt;
	}

	/*
@@ -812,7 +819,7 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
	 */
	if (rx_stats->rs_datalen > (common->rx_bufsize - ah->caps.rx_status_len)) {
		RX_STAT_INC(rx_len_err);
		return -EINVAL;
		goto corrupt;
	}

	/* Only use status info from the last fragment */
@@ -826,10 +833,8 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
	 * This is different from the other corrupt descriptor
	 * condition handled above.
	 */
	if (rx_stats->rs_status & ATH9K_RXERR_CORRUPT_DESC) {
		ret = -EINVAL;
		goto exit;
	}
	if (rx_stats->rs_status & ATH9K_RXERR_CORRUPT_DESC)
		goto corrupt;

	hdr = (struct ieee80211_hdr *) (skb->data + ah->caps.rx_status_len);

@@ -845,18 +850,15 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
		if (ath_process_fft(sc, hdr, rx_stats, rx_status->mactime))
			RX_STAT_INC(rx_spectral);

		ret = -EINVAL;
		goto exit;
		return -EINVAL;
	}

	/*
	 * everything but the rate is checked here, the rate check is done
	 * separately to avoid doing two lookups for a rate for each frame.
	 */
	if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter)) {
		ret = -EINVAL;
		goto exit;
	}
	if (!ath9k_cmn_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error, sc->rx.rxfilter))
		return -EINVAL;

	if (ath_is_mybeacon(common, hdr)) {
		RX_STAT_INC(rx_beacons);
@@ -866,10 +868,8 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
	/*
	 * This shouldn't happen, but have a safety check anyway.
	 */
	if (WARN_ON(!ah->curchan)) {
		ret = -EINVAL;
		goto exit;
	}
	if (WARN_ON(!ah->curchan))
		return -EINVAL;

	if (ath9k_cmn_process_rate(common, hw, rx_stats, rx_status)) {
		/*
@@ -879,8 +879,7 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
		ath_dbg(common, ANY, "unsupported hw bitrate detected 0x%02x using 1 Mbit\n",
			rx_stats->rs_rate);
		RX_STAT_INC(rx_rate_err);
		ret =-EINVAL;
		goto exit;
		return -EINVAL;
	}

	ath9k_cmn_process_rssi(common, hw, rx_stats, rx_status);
@@ -896,9 +895,11 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
		sc->rx.num_pkts++;
#endif

exit:
	sc->rx.discard_next = false;
	return ret;
	return 0;

corrupt:
	sc->rx.discard_next = rx_stats->rs_more;
	return -EINVAL;
}

/*
+8 −5
Original line number Diff line number Diff line
@@ -1445,14 +1445,16 @@ void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
	for (tidno = 0, tid = &an->tid[tidno];
	     tidno < IEEE80211_NUM_TIDS; tidno++, tid++) {

		if (!tid->sched)
			continue;

		ac = tid->ac;
		txq = ac->txq;

		ath_txq_lock(sc, txq);

		if (!tid->sched) {
			ath_txq_unlock(sc, txq);
			continue;
		}

		buffered = ath_tid_has_buffered(tid);

		tid->sched = false;
@@ -2185,14 +2187,15 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
		txq->stopped = true;
	}

	if (txctl->an)
		tid = ath_get_skb_tid(sc, txctl->an, skb);

	if (info->flags & IEEE80211_TX_CTL_PS_RESPONSE) {
		ath_txq_unlock(sc, txq);
		txq = sc->tx.uapsdq;
		ath_txq_lock(sc, txq);
	} else if (txctl->an &&
		   ieee80211_is_data_present(hdr->frame_control)) {
		tid = ath_get_skb_tid(sc, txctl->an, skb);

		WARN_ON(tid->ac->txq != txctl->txq);

		if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)
Loading