73de2b854674891761d628afa969d2549c250728
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 310-noise_get.patch
1 Index: madwifi-ng-r2799-20071030/ath/if_ath.c
2 ===================================================================
3 --- madwifi-ng-r2799-20071030.orig/ath/if_ath.c 2007-10-31 14:04:52.073588984 +0100
4 +++ madwifi-ng-r2799-20071030/ath/if_ath.c 2007-10-31 14:04:52.417608587 +0100
5 @@ -1417,7 +1417,6 @@
6 * Wireshark and Kismet.
7 */
8 hw_tsf = ath_hal_gettsf64(ah);
9 - ic->ic_channoise = ath_hal_get_channel_noise(ah, &(sc->sc_curchan));
10
11 ATH_RXBUF_LOCK_IRQ(sc);
12 if (sc->sc_rxbufcur == NULL)
13 @@ -8174,6 +8173,7 @@
14 struct net_device *dev = (struct net_device *) arg;
15 struct ath_softc *sc = dev->priv;
16 struct ath_hal *ah = sc->sc_ah;
17 + struct ieee80211com *ic = &sc->sc_ic;
18 /* u_int32_t nchans; */
19 HAL_BOOL isIQdone = AH_FALSE;
20
21 @@ -8202,6 +8202,7 @@
22 ath_calinterval = ATH_LONG_CALINTERVAL;
23 else
24 ath_calinterval = ATH_SHORT_CALINTERVAL;
25 + ic->ic_channoise = ath_hal_get_channel_noise(ah, &(sc->sc_curchan));
26
27 sc->sc_cal_ch.expires = jiffies + (ath_calinterval * HZ);
28 add_timer(&sc->sc_cal_ch);
29 @@ -8252,6 +8253,7 @@
30 struct ath_softc *sc = dev->priv;
31
32 (void) ath_chan_set(sc, ic->ic_curchan);
33 + ic->ic_channoise = ath_hal_get_channel_noise(sc->sc_ah, &(sc->sc_curchan));
34 /*
35 * If we are returning to our bss channel then mark state
36 * so the next recv'd beacon's TSF will be used to sync the
37 @@ -8466,6 +8468,7 @@
38 }
39
40 ath_hal_process_noisefloor(ah);
41 + ic->ic_channoise = ath_hal_get_channel_noise(ah, &(sc->sc_curchan));
42 /*
43 * Configure the beacon and sleep timers.
44 */