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

Commit ec205999 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville
Browse files

ath9k: only send FCS-fail packets to mac80211 if requested



Prevents lots of broken frames from showing up on monitor interfaces
by default.

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 846d9363
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -808,6 +808,7 @@ static bool ath9k_rx_accept(struct ath_common *common,
			    struct ath_rx_status *rx_stats,
			    bool *decrypt_error)
{
	struct ath_softc *sc = (struct ath_softc *) common->priv;
	bool is_mc, is_valid_tkip, strip_mic, mic_error;
	struct ath_hw *ah = common->ah;
	__le16 fc;
@@ -872,7 +873,7 @@ static bool ath9k_rx_accept(struct ath_common *common,
		status_mask = ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC |
			      ATH9K_RXERR_KEYMISS;

		if (ah->is_monitoring)
		if (ah->is_monitoring && (sc->rx.rxfilter & FIF_FCSFAIL))
			status_mask |= ATH9K_RXERR_CRC;

		if (rx_stats->rs_status & ~status_mask)