Fix for r1106. Perform HAL reset twice, once with chanchange = TRUE and once without.
authormtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 5 Nov 2007 23:18:44 +0000 (23:18 +0000)
committermtaylor <mtaylor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Mon, 5 Nov 2007 23:18:44 +0000 (23:18 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2831 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath.c

index 7466f64d4c475c738308582c937373e1ab82fef6..ae7500c12fa063519cf396e685fb5fd9af748cd2 100644 (file)
@@ -7905,12 +7905,19 @@ ath_chan_set(struct ath_softc *sc, struct ieee80211_channel *chan)
                else
                        ath_hal_setcoverageclass(sc->sc_ah, ic->ic_coverageclass, 0);
 
-               if (!ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status)) {
+               /* MT: ath_hal_reset with chanchange = AH_TRUE doesn't seem to 
+                * completely reset the state of the card.  According to 
+                * reports from ticket #1106, kismet and aircrack people they
+                * needed to do the reset with chanchange = AH_FALSE in order
+                * to receive traffic when peforming high velocity channel 
+                * changes. */
+               if (!ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status)   ||
+                   !ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_FALSE, &status)) {
                        printk("%s: %s: unable to reset channel %u (%u MHz) "
                                "flags 0x%x '%s' (HAL status %u)\n",
                                DEV_NAME(dev), __func__,
                                ieee80211_chan2ieee(ic, chan), chan->ic_freq,
-                               hchan.channelFlags,
+                               hchan.channelFlags,
                                ath_get_hal_status_desc(status), status);
                        return -EIO;
                }