diff mbox series

iwlegacy: do not skip frames with bad FCS

Message ID 20240509101140.32664-1-batyiev@gmail.com (mailing list archive)
State Accepted
Commit 02b682d54598f61cbb7dbb14d98ec1801112b878
Delegated to: Kalle Valo
Headers show
Series iwlegacy: do not skip frames with bad FCS | expand

Commit Message

Andrii Batyiev May 9, 2024, 10:11 a.m. UTC
Monitor/sniffer mode benefits from all types of frames, even if FCS
check fails. But we must mark frames as such.

Tested on iwl3945 only.

Signed-off-by: Andrii Batyiev <batyiev@gmail.com>
---
 drivers/net/wireless/intel/iwlegacy/3945.c     | 2 +-
 drivers/net/wireless/intel/iwlegacy/4965-mac.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Kalle Valo May 14, 2024, 1:31 p.m. UTC | #1
Andrii Batyiev <batyiev@gmail.com> wrote:

> Monitor/sniffer mode benefits from all types of frames, even if FCS
> check fails. But we must mark frames as such.
> 
> Tested on iwl3945 only.
> 
> Signed-off-by: Andrii Batyiev <batyiev@gmail.com>

Patch applied to wireless-next.git, thanks.

02b682d54598 wifi: iwlegacy: do not skip frames with bad FCS
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlegacy/3945.c b/drivers/net/wireless/intel/iwlegacy/3945.c
index a773939b8c..1fab7849f5 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945.c
@@ -566,7 +566,7 @@  il3945_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb)
 	if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) ||
 	    !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) {
 		D_RX("Bad CRC or FIFO: 0x%08X.\n", rx_end->status);
-		return;
+		rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
 	}
 
 	/* Convert 3945's rssi indicator to dBm */
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
index 4beb7be6d5..d018f56be9 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
@@ -664,7 +664,7 @@  il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb)
 	if (!(rx_pkt_status & RX_RES_STATUS_NO_CRC32_ERROR) ||
 	    !(rx_pkt_status & RX_RES_STATUS_NO_RXE_OVERFLOW)) {
 		D_RX("Bad CRC or FIFO: 0x%08X.\n", le32_to_cpu(rx_pkt_status));
-		return;
+		rx_status.flag |= RX_FLAG_FAILED_FCS_CRC;
 	}
 
 	/* This will be used in several places later */