Changeset 2156
- Timestamp:
- 02/24/07 04:57:04 (2 years ago)
- Files:
-
- trunk/ath/if_ath.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ath/if_ath.c
r2141 r2156 9073 9073 struct ath_hal *ah = sc->sc_ah; 9074 9074 struct sockaddr *mac = addr; 9075 int error ;9075 int error = 0; 9076 9076 9077 9077 if (netif_running(dev)) { … … 9090 9090 IEEE80211_ADDR_COPY(dev->dev_addr, mac->sa_data); 9091 9091 ath_hal_setmac(ah, dev->dev_addr); 9092 error = ath_reset(dev); 9092 if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) { 9093 error = ath_reset(dev); 9094 } 9093 9095 ATH_UNLOCK(sc); 9094 9096 … … 9100 9102 { 9101 9103 struct ath_softc *sc = dev->priv; 9102 int error ;9104 int error = 0; 9103 9105 9104 9106 if (!(ATH_MIN_MTU < mtu && mtu <= ATH_MAX_MTU)) { … … 9111 9113 ATH_LOCK(sc); 9112 9114 dev->mtu = mtu; 9113 /* NB: the rx buffers may need to be reallocated */ 9114 tasklet_disable(&sc->sc_rxtq); 9115 error = ath_reset(dev); 9116 tasklet_enable(&sc->sc_rxtq); 9115 if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) { 9116 /* NB: the rx buffers may need to be reallocated */ 9117 tasklet_disable(&sc->sc_rxtq); 9118 error = ath_reset(dev); 9119 tasklet_enable(&sc->sc_rxtq); 9120 } 9117 9121 ATH_UNLOCK(sc); 9118 9122
