recv.c (69dbdd819599e2f3b77c172e83af512845bca5ad) | recv.c (5f841b4130a639e5f0fbcf4a9b26045d734e4ee6) |
---|---|
1/* 2 * Copyright (c) 2008-2009 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 --- 427 unchanged lines hidden (view full) --- 436 437 /* 438 * Set promiscuous mode when FIF_PROMISC_IN_BSS is enabled for station 439 * mode interface or when in monitor mode. AP mode does not need this 440 * since it receives all in-BSS frames anyway. 441 */ 442 if (((sc->sc_ah->opmode != NL80211_IFTYPE_AP) && 443 (sc->rx.rxfilter & FIF_PROMISC_IN_BSS)) || | 1/* 2 * Copyright (c) 2008-2009 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 --- 427 unchanged lines hidden (view full) --- 436 437 /* 438 * Set promiscuous mode when FIF_PROMISC_IN_BSS is enabled for station 439 * mode interface or when in monitor mode. AP mode does not need this 440 * since it receives all in-BSS frames anyway. 441 */ 442 if (((sc->sc_ah->opmode != NL80211_IFTYPE_AP) && 443 (sc->rx.rxfilter & FIF_PROMISC_IN_BSS)) || |
444 (sc->sc_ah->opmode == NL80211_IFTYPE_MONITOR)) | 444 (sc->sc_ah->is_monitoring)) |
445 rfilt |= ATH9K_RX_FILTER_PROM; 446 447 if (sc->rx.rxfilter & FIF_CONTROL) 448 rfilt |= ATH9K_RX_FILTER_CONTROL; 449 450 if ((sc->sc_ah->opmode == NL80211_IFTYPE_STATION) && 451 (sc->nvifs <= 1) && 452 !(sc->rx.rxfilter & FIF_BCN_PRBRESP_PROMISC)) --- 439 unchanged lines hidden (view full) --- 892 else 893 rx_stats->rs_status &= ~ATH9K_RXERR_MIC; 894 } 895 /* 896 * Reject error frames with the exception of 897 * decryption and MIC failures. For monitor mode, 898 * we also ignore the CRC error. 899 */ | 445 rfilt |= ATH9K_RX_FILTER_PROM; 446 447 if (sc->rx.rxfilter & FIF_CONTROL) 448 rfilt |= ATH9K_RX_FILTER_CONTROL; 449 450 if ((sc->sc_ah->opmode == NL80211_IFTYPE_STATION) && 451 (sc->nvifs <= 1) && 452 !(sc->rx.rxfilter & FIF_BCN_PRBRESP_PROMISC)) --- 439 unchanged lines hidden (view full) --- 892 else 893 rx_stats->rs_status &= ~ATH9K_RXERR_MIC; 894 } 895 /* 896 * Reject error frames with the exception of 897 * decryption and MIC failures. For monitor mode, 898 * we also ignore the CRC error. 899 */ |
900 if (ah->opmode == NL80211_IFTYPE_MONITOR) { | 900 if (ah->is_monitoring) { |
901 if (rx_stats->rs_status & 902 ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC | 903 ATH9K_RXERR_CRC)) 904 return false; 905 } else { 906 if (rx_stats->rs_status & 907 ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC)) { 908 return false; --- 875 unchanged lines hidden --- | 901 if (rx_stats->rs_status & 902 ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC | 903 ATH9K_RXERR_CRC)) 904 return false; 905 } else { 906 if (rx_stats->rs_status & 907 ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC)) { 908 return false; --- 875 unchanged lines hidden --- |