recv.c (846d9363505d14e591a427619ccb7ffe6a7a3541) | recv.c (ec205999d31bbb1208ab59c3b6d22c47cca74257) |
---|---|
1/* 2 * Copyright (c) 2008-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 794 unchanged lines hidden (view full) --- 803 804/* Assumes you've already done the endian to CPU conversion */ 805static bool ath9k_rx_accept(struct ath_common *common, 806 struct ieee80211_hdr *hdr, 807 struct ieee80211_rx_status *rxs, 808 struct ath_rx_status *rx_stats, 809 bool *decrypt_error) 810{ | 1/* 2 * Copyright (c) 2008-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 794 unchanged lines hidden (view full) --- 803 804/* Assumes you've already done the endian to CPU conversion */ 805static bool ath9k_rx_accept(struct ath_common *common, 806 struct ieee80211_hdr *hdr, 807 struct ieee80211_rx_status *rxs, 808 struct ath_rx_status *rx_stats, 809 bool *decrypt_error) 810{ |
811 struct ath_softc *sc = (struct ath_softc *) common->priv; |
|
811 bool is_mc, is_valid_tkip, strip_mic, mic_error; 812 struct ath_hw *ah = common->ah; 813 __le16 fc; 814 u8 rx_status_len = ah->caps.rx_status_len; 815 816 fc = hdr->frame_control; 817 818 is_mc = !!is_multicast_ether_addr(hdr->addr1); --- 48 unchanged lines hidden (view full) --- 867 /* 868 * Reject error frames with the exception of 869 * decryption and MIC failures. For monitor mode, 870 * we also ignore the CRC error. 871 */ 872 status_mask = ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC | 873 ATH9K_RXERR_KEYMISS; 874 | 812 bool is_mc, is_valid_tkip, strip_mic, mic_error; 813 struct ath_hw *ah = common->ah; 814 __le16 fc; 815 u8 rx_status_len = ah->caps.rx_status_len; 816 817 fc = hdr->frame_control; 818 819 is_mc = !!is_multicast_ether_addr(hdr->addr1); --- 48 unchanged lines hidden (view full) --- 868 /* 869 * Reject error frames with the exception of 870 * decryption and MIC failures. For monitor mode, 871 * we also ignore the CRC error. 872 */ 873 status_mask = ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC | 874 ATH9K_RXERR_KEYMISS; 875 |
875 if (ah->is_monitoring) | 876 if (ah->is_monitoring && (sc->rx.rxfilter & FIF_FCSFAIL)) |
876 status_mask |= ATH9K_RXERR_CRC; 877 878 if (rx_stats->rs_status & ~status_mask) 879 return false; 880 } 881 882 /* 883 * For unicast frames the MIC error bit can have false positives, --- 1095 unchanged lines hidden --- | 877 status_mask |= ATH9K_RXERR_CRC; 878 879 if (rx_stats->rs_status & ~status_mask) 880 return false; 881 } 882 883 /* 884 * For unicast frames the MIC error bit can have false positives, --- 1095 unchanged lines hidden --- |