From 9b5dbf90780e07b9372192ea20d8e86005670d83 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Sat, 9 Oct 2010 22:00:31 +0200 Subject: [PATCH] carl9170: fix total error filter bit handling The total error (aka fatal error) bit was erroneously prefixed as AR9170_RX_ERROR instead of AR9170_RX_STATUS. (+ minor styling tweaks) Signed-off-by: Christian Lamparter --- carlfw/src/wlan.c | 4 +--- include/shared/wlan.h | 10 ++++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index 61976b0..8c8c7a8 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -601,13 +601,11 @@ static unsigned int wlan_rx_filter(struct dma_desc *desc) data_len = ar9170_get_rx_mpdu_len(desc); mac_err = ar9170_get_rx_macstatus_error(desc); -#define AR9170_RX_ERROR_BAD (AR9170_RX_ERROR_FCS | AR9170_RX_ERROR_PLCP | \ - AR9170_RX_ERROR_FATAL) +#define AR9170_RX_ERROR_BAD (AR9170_RX_ERROR_FCS | AR9170_RX_ERROR_PLCP) if (unlikely(data_len < (4 + 6 + FCS_LEN) || desc->totalLen > CONFIG_CARL9170FW_RX_FRAME_LEN) || mac_err & AR9170_RX_ERROR_BAD) { - /* * This frame is too damaged to do anything * useful with it. diff --git a/include/shared/wlan.h b/include/shared/wlan.h index ce8885b..24d63b5 100644 --- a/include/shared/wlan.h +++ b/include/shared/wlan.h @@ -74,6 +74,9 @@ #define AR9170_RX_STATUS_MPDU_MIDDLE 0x30 #define AR9170_RX_STATUS_MPDU_LAST 0x10 +#define AR9170_RX_STATUS_CONT_AGGR 0x40 +#define AR9170_RX_STATUS_TOTAL_ERROR 0x80 + #define AR9170_RX_ERROR_RXTO 0x01 #define AR9170_RX_ERROR_OVERRUN 0x02 #define AR9170_RX_ERROR_DECRYPT 0x04 @@ -81,7 +84,6 @@ #define AR9170_RX_ERROR_WRONG_RA 0x10 #define AR9170_RX_ERROR_PLCP 0x20 #define AR9170_RX_ERROR_MMIC 0x40 -#define AR9170_RX_ERROR_FATAL 0x80 /* these are either-or */ #define AR9170_TX_MAC_PROT_RTS 0x0001 @@ -336,7 +338,7 @@ struct ar9170_rx_head { u8 plcp[12]; } __packed; -#define AR9170_RX_HEAD_LEN 12 +#define AR9170_RX_HEAD_LEN 12 struct ar9170_rx_phystatus { union { @@ -352,7 +354,7 @@ struct ar9170_rx_phystatus { u8 phy_err; } __packed; -#define AR9170_RX_PHYSTATUS_LEN 20 +#define AR9170_RX_PHYSTATUS_LEN 20 struct ar9170_rx_macstatus { u8 SAidx, DAidx; @@ -360,7 +362,7 @@ struct ar9170_rx_macstatus { u8 status; } __packed; -#define AR9170_RX_MACSTATUS_LEN 4 +#define AR9170_RX_MACSTATUS_LEN 4 struct ar9170_rx_frame_single { struct ar9170_rx_head phy_head; -- 2.31.1