提交 9f59f3c6 编写于 作者: C Christian Lamparter 提交者: John W. Linville

carl9170: remove stale rx error path

The total/fatal error bit was erroneously prefixed
with AR9170_RX_ERROR instead of AR9170_RX_STATUS.
Luckily, the hardware specification confirmed that
the 0x80 flag will never be set for mac->error.
So, it was always just a dead branch.

This patch also imports the latest version of
shared wlan.h header from the firmware git.
Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c8a16c68
...@@ -604,9 +604,6 @@ static void carl9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len) ...@@ -604,9 +604,6 @@ static void carl9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len)
mpdu_len = len - sizeof(*mac); mpdu_len = len - sizeof(*mac);
mac = (void *)(buf + mpdu_len); mac = (void *)(buf + mpdu_len);
if (unlikely(mac->error & AR9170_RX_ERROR_FATAL))
goto drop;
switch (mac->status & AR9170_RX_STATUS_MPDU) { switch (mac->status & AR9170_RX_STATUS_MPDU) {
case AR9170_RX_STATUS_MPDU_FIRST: case AR9170_RX_STATUS_MPDU_FIRST:
/* Aggregated MPDUs start with an PLCP header */ /* Aggregated MPDUs start with an PLCP header */
......
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
#define AR9170_RX_STATUS_MPDU_MIDDLE 0x30 #define AR9170_RX_STATUS_MPDU_MIDDLE 0x30
#define AR9170_RX_STATUS_MPDU_LAST 0x10 #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_RXTO 0x01
#define AR9170_RX_ERROR_OVERRUN 0x02 #define AR9170_RX_ERROR_OVERRUN 0x02
#define AR9170_RX_ERROR_DECRYPT 0x04 #define AR9170_RX_ERROR_DECRYPT 0x04
...@@ -81,7 +84,6 @@ ...@@ -81,7 +84,6 @@
#define AR9170_RX_ERROR_WRONG_RA 0x10 #define AR9170_RX_ERROR_WRONG_RA 0x10
#define AR9170_RX_ERROR_PLCP 0x20 #define AR9170_RX_ERROR_PLCP 0x20
#define AR9170_RX_ERROR_MMIC 0x40 #define AR9170_RX_ERROR_MMIC 0x40
#define AR9170_RX_ERROR_FATAL 0x80
/* these are either-or */ /* these are either-or */
#define AR9170_TX_MAC_PROT_RTS 0x0001 #define AR9170_TX_MAC_PROT_RTS 0x0001
...@@ -329,13 +331,15 @@ struct _carl9170_tx_superframe { ...@@ -329,13 +331,15 @@ struct _carl9170_tx_superframe {
#define CARL9170_TX_SUPERDESC_LEN 24 #define CARL9170_TX_SUPERDESC_LEN 24
#define AR9170_TX_HWDESC_LEN 8 #define AR9170_TX_HWDESC_LEN 8
#define AR9170_TX_SUPERFRAME_LEN (CARL9170_TX_HWDESC_LEN + \ #define CARL9170_TX_SUPERFRAME_LEN (CARL9170_TX_SUPERDESC_LEN + \
AR9170_TX_SUPERDESC_LEN) AR9170_TX_HWDESC_LEN)
struct ar9170_rx_head { struct ar9170_rx_head {
u8 plcp[12]; u8 plcp[12];
} __packed; } __packed;
#define AR9170_RX_HEAD_LEN 12
struct ar9170_rx_phystatus { struct ar9170_rx_phystatus {
union { union {
struct { struct {
...@@ -350,12 +354,16 @@ struct ar9170_rx_phystatus { ...@@ -350,12 +354,16 @@ struct ar9170_rx_phystatus {
u8 phy_err; u8 phy_err;
} __packed; } __packed;
#define AR9170_RX_PHYSTATUS_LEN 20
struct ar9170_rx_macstatus { struct ar9170_rx_macstatus {
u8 SAidx, DAidx; u8 SAidx, DAidx;
u8 error; u8 error;
u8 status; u8 status;
} __packed; } __packed;
#define AR9170_RX_MACSTATUS_LEN 4
struct ar9170_rx_frame_single { struct ar9170_rx_frame_single {
struct ar9170_rx_head phy_head; struct ar9170_rx_head phy_head;
struct ieee80211_hdr i3e; struct ieee80211_hdr i3e;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册