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