diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2010-10-09 16:23:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-11 15:04:22 -0400 |
commit | 9f59f3c694c184c69e0be7d0fd0829bcb61b0429 (patch) | |
tree | 4cefd4fa1d2a66ce21373302f61d1a93956324d4 /drivers/net/wireless/ath/carl9170 | |
parent | c8a16c68ef4eb7817e41759c7105678ebc155377 (diff) |
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: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/carl9170')
-rw-r--r-- | drivers/net/wireless/ath/carl9170/rx.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/carl9170/wlan.h | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c index 31287e0d362f..256dd42bb4ab 100644 --- a/drivers/net/wireless/ath/carl9170/rx.c +++ b/drivers/net/wireless/ath/carl9170/rx.c | |||
@@ -604,9 +604,6 @@ static void carl9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len) | |||
604 | mpdu_len = len - sizeof(*mac); | 604 | mpdu_len = len - sizeof(*mac); |
605 | 605 | ||
606 | mac = (void *)(buf + mpdu_len); | 606 | mac = (void *)(buf + mpdu_len); |
607 | if (unlikely(mac->error & AR9170_RX_ERROR_FATAL)) | ||
608 | goto drop; | ||
609 | |||
610 | switch (mac->status & AR9170_RX_STATUS_MPDU) { | 607 | switch (mac->status & AR9170_RX_STATUS_MPDU) { |
611 | case AR9170_RX_STATUS_MPDU_FIRST: | 608 | case AR9170_RX_STATUS_MPDU_FIRST: |
612 | /* Aggregated MPDUs start with an PLCP header */ | 609 | /* Aggregated MPDUs start with an PLCP header */ |
diff --git a/drivers/net/wireless/ath/carl9170/wlan.h b/drivers/net/wireless/ath/carl9170/wlan.h index 48ead2268f50..24d63b583b6b 100644 --- a/drivers/net/wireless/ath/carl9170/wlan.h +++ b/drivers/net/wireless/ath/carl9170/wlan.h | |||
@@ -74,6 +74,9 @@ | |||
74 | #define AR9170_RX_STATUS_MPDU_MIDDLE 0x30 | 74 | #define AR9170_RX_STATUS_MPDU_MIDDLE 0x30 |
75 | #define AR9170_RX_STATUS_MPDU_LAST 0x10 | 75 | #define AR9170_RX_STATUS_MPDU_LAST 0x10 |
76 | 76 | ||
77 | #define AR9170_RX_STATUS_CONT_AGGR 0x40 | ||
78 | #define AR9170_RX_STATUS_TOTAL_ERROR 0x80 | ||
79 | |||
77 | #define AR9170_RX_ERROR_RXTO 0x01 | 80 | #define AR9170_RX_ERROR_RXTO 0x01 |
78 | #define AR9170_RX_ERROR_OVERRUN 0x02 | 81 | #define AR9170_RX_ERROR_OVERRUN 0x02 |
79 | #define AR9170_RX_ERROR_DECRYPT 0x04 | 82 | #define AR9170_RX_ERROR_DECRYPT 0x04 |
@@ -81,7 +84,6 @@ | |||
81 | #define AR9170_RX_ERROR_WRONG_RA 0x10 | 84 | #define AR9170_RX_ERROR_WRONG_RA 0x10 |
82 | #define AR9170_RX_ERROR_PLCP 0x20 | 85 | #define AR9170_RX_ERROR_PLCP 0x20 |
83 | #define AR9170_RX_ERROR_MMIC 0x40 | 86 | #define AR9170_RX_ERROR_MMIC 0x40 |
84 | #define AR9170_RX_ERROR_FATAL 0x80 | ||
85 | 87 | ||
86 | /* these are either-or */ | 88 | /* these are either-or */ |
87 | #define AR9170_TX_MAC_PROT_RTS 0x0001 | 89 | #define AR9170_TX_MAC_PROT_RTS 0x0001 |
@@ -329,13 +331,15 @@ struct _carl9170_tx_superframe { | |||
329 | 331 | ||
330 | #define CARL9170_TX_SUPERDESC_LEN 24 | 332 | #define CARL9170_TX_SUPERDESC_LEN 24 |
331 | #define AR9170_TX_HWDESC_LEN 8 | 333 | #define AR9170_TX_HWDESC_LEN 8 |
332 | #define AR9170_TX_SUPERFRAME_LEN (CARL9170_TX_HWDESC_LEN + \ | 334 | #define CARL9170_TX_SUPERFRAME_LEN (CARL9170_TX_SUPERDESC_LEN + \ |
333 | AR9170_TX_SUPERDESC_LEN) | 335 | AR9170_TX_HWDESC_LEN) |
334 | 336 | ||
335 | struct ar9170_rx_head { | 337 | struct ar9170_rx_head { |
336 | u8 plcp[12]; | 338 | u8 plcp[12]; |
337 | } __packed; | 339 | } __packed; |
338 | 340 | ||
341 | #define AR9170_RX_HEAD_LEN 12 | ||
342 | |||
339 | struct ar9170_rx_phystatus { | 343 | struct ar9170_rx_phystatus { |
340 | union { | 344 | union { |
341 | struct { | 345 | struct { |
@@ -350,12 +354,16 @@ struct ar9170_rx_phystatus { | |||
350 | u8 phy_err; | 354 | u8 phy_err; |
351 | } __packed; | 355 | } __packed; |
352 | 356 | ||
357 | #define AR9170_RX_PHYSTATUS_LEN 20 | ||
358 | |||
353 | struct ar9170_rx_macstatus { | 359 | struct ar9170_rx_macstatus { |
354 | u8 SAidx, DAidx; | 360 | u8 SAidx, DAidx; |
355 | u8 error; | 361 | u8 error; |
356 | u8 status; | 362 | u8 status; |
357 | } __packed; | 363 | } __packed; |
358 | 364 | ||
365 | #define AR9170_RX_MACSTATUS_LEN 4 | ||
366 | |||
359 | struct ar9170_rx_frame_single { | 367 | struct ar9170_rx_frame_single { |
360 | struct ar9170_rx_head phy_head; | 368 | struct ar9170_rx_head phy_head; |
361 | struct ieee80211_hdr i3e; | 369 | struct ieee80211_hdr i3e; |