d1f3b6258e85f0b68c6bab7e3df6e29604c941dd
[openwrt/openwrt.git] / package / madwifi / patches / 323-dfs_optional.patch
1 --- a/ath/if_ath.c
2 +++ b/ath/if_ath.c
3 @@ -1778,17 +1778,14 @@
4 * may have occurred in the intervening timeframe. */
5 bf->bf_channoise = ic->ic_channoise;
6
7 - if (rs->rs_status) {
8 - if ((HAL_RXERR_PHY == rs->rs_status) &&
9 - (HAL_PHYERR_RADAR ==
10 - (rs->rs_phyerr & 0x1f)) &&
11 - (0 == (bf->bf_status &
12 - ATH_BUFSTATUS_RADAR_DONE))) {
13 - check_for_radar = 1;
14 - }
15 - /* Skip past the error now */
16 + if ((HAL_RXERR_PHY == rs->rs_status) &&
17 + (HAL_PHYERR_RADAR == (rs->rs_phyerr & 0x1f)) &&
18 + (0 == (bf->bf_status & ATH_BUFSTATUS_RADAR_DONE)) &&
19 + (ic->ic_flags & IEEE80211_F_DOTH))
20 + check_for_radar = 1;
21 +
22 + if (rs->rs_status) /* Skip past the error now */
23 continue;
24 - }
25
26 /* Prepare wireless header for examination */
27 bus_dma_sync_single(sc->sc_bdev, bf->bf_skbaddr,
28 --- a/ath/if_ath_radar.c
29 +++ b/ath/if_ath_radar.c
30 @@ -265,7 +265,7 @@
31 unsigned int new_rxfilt = old_rxfilt;
32
33 ath_hal_intrset(ah, old_ier & ~HAL_INT_GLOBAL);
34 - if (required) {
35 + if ((required) && (ic->ic_flags & IEEE80211_F_DOTH)) {
36 new_radar |= AR5K_PHY_RADAR_ENABLE;
37 new_filter |= AR5K_AR5212_PHY_ERR_FIL_RADAR;
38 new_rxfilt |= (HAL_RX_FILTER_PHYERR |