Commit b4a82a0a2e32777267b2c997fa55b90056447a40
Committed by
Greg Kroah-Hartman
1 parent
ebd11e15ac
ath9k_hw: fix interpretation of the rx KeyMiss flag
commit 7a532fe7131216a02c81a6c1b1f8632da1195a58 upstream. Documentation states that the KeyMiss flag is only valid if RxFrameOK is unset, however empirical evidence has shown that this is false. When KeyMiss is set (and RxFrameOK is 1), the hardware passes a valid frame which has not been decrypted. The driver then falsely marks the frame as decrypted, and when using CCMP this corrupts the rx CCMP PN, leading to connection hangs. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 2 changed files with 6 additions and 4 deletions Side-by-side Diff
drivers/net/wireless/ath/ath9k/ar9003_mac.c
... | ... | @@ -526,9 +526,10 @@ |
526 | 526 | rxs->rs_status |= ATH9K_RXERR_DECRYPT; |
527 | 527 | else if (rxsp->status11 & AR_MichaelErr) |
528 | 528 | rxs->rs_status |= ATH9K_RXERR_MIC; |
529 | - if (rxsp->status11 & AR_KeyMiss) | |
530 | - rxs->rs_status |= ATH9K_RXERR_KEYMISS; | |
531 | 529 | } |
530 | + | |
531 | + if (rxsp->status11 & AR_KeyMiss) | |
532 | + rxs->rs_status |= ATH9K_RXERR_KEYMISS; | |
532 | 533 | |
533 | 534 | return 0; |
534 | 535 | } |
drivers/net/wireless/ath/ath9k/mac.c
... | ... | @@ -621,9 +621,10 @@ |
621 | 621 | rs->rs_status |= ATH9K_RXERR_DECRYPT; |
622 | 622 | else if (ads.ds_rxstatus8 & AR_MichaelErr) |
623 | 623 | rs->rs_status |= ATH9K_RXERR_MIC; |
624 | - if (ads.ds_rxstatus8 & AR_KeyMiss) | |
625 | - rs->rs_status |= ATH9K_RXERR_KEYMISS; | |
626 | 624 | } |
625 | + | |
626 | + if (ads.ds_rxstatus8 & AR_KeyMiss) | |
627 | + rs->rs_status |= ATH9K_RXERR_KEYMISS; | |
627 | 628 | |
628 | 629 | return 0; |
629 | 630 | } |