X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/9650bf15636064e9f643843e4fe8a856a099deae..fb9f9cdc813406041715d4c692f2b18cfd418cee:/package/madwifi/patches/389-autochannel.patch?ds=sidebyside diff --git a/package/madwifi/patches/389-autochannel.patch b/package/madwifi/patches/389-autochannel.patch index 8f7437a3f..548f09e7d 100644 --- a/package/madwifi/patches/389-autochannel.patch +++ b/package/madwifi/patches/389-autochannel.patch @@ -8,7 +8,7 @@ /* calibrate every 30 secs in steady state but check every second at first. */ static int ath_calinterval = ATH_SHORT_CALINTERVAL; -@@ -2580,6 +2581,7 @@ ath_init(struct net_device *dev) +@@ -2581,6 +2582,7 @@ ath_init(struct net_device *dev) * be followed by initialization of the appropriate bits * and then setup of the interrupt mask. */ @@ -16,7 +16,7 @@ sc->sc_curchan.channel = ic->ic_curchan->ic_freq; sc->sc_curchan.channelFlags = ath_chan2flags(ic->ic_curchan); if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) { -@@ -2913,6 +2915,48 @@ ath_hw_check_atim(struct ath_softc *sc, +@@ -2914,6 +2916,48 @@ ath_hw_check_atim(struct ath_softc *sc, return 0; } @@ -65,7 +65,7 @@ /* * Reset the hardware w/o losing operational state. This is -@@ -2940,6 +2984,7 @@ ath_reset(struct net_device *dev) +@@ -2941,6 +2985,7 @@ ath_reset(struct net_device *dev) * Convert to a HAL channel description with the flags * constrained to reflect the current operating mode. */ @@ -73,7 +73,7 @@ c = ic->ic_curchan; sc->sc_curchan.channel = c->ic_freq; sc->sc_curchan.channelFlags = ath_chan2flags(c); -@@ -9022,6 +9067,7 @@ ath_chan_set(struct ath_softc *sc, struc +@@ -9023,6 +9068,7 @@ ath_chan_set(struct ath_softc *sc, struc u_int8_t channel_change_required = 0; struct timeval tv; @@ -81,7 +81,7 @@ /* * Convert to a HAL channel description with * the flags constrained to reflect the current -@@ -9030,6 +9076,14 @@ ath_chan_set(struct ath_softc *sc, struc +@@ -9031,6 +9077,14 @@ ath_chan_set(struct ath_softc *sc, struc memset(&hchan, 0, sizeof(HAL_CHANNEL)); hchan.channel = chan->ic_freq; hchan.channelFlags = ath_chan2flags(chan); @@ -98,7 +98,7 @@ do_gettimeofday(&tv); --- a/ath/if_athvar.h +++ b/ath/if_athvar.h -@@ -773,6 +773,7 @@ struct ath_softc { +@@ -774,6 +774,7 @@ struct ath_softc { struct ieee80211vap **sc_bslot; /* beacon xmit slots */ int sc_bnext; /* next slot for beacon xmit */ @@ -118,7 +118,7 @@ #define IEEE80211_CHAN_MAX 255 --- a/net80211/ieee80211_scan_ap.c +++ b/net80211/ieee80211_scan_ap.c -@@ -417,6 +417,19 @@ pc_cmp_rssi(struct ap_state *as, struct +@@ -417,6 +417,19 @@ pc_cmp_rssi(struct ap_state *as, struct /* This function must be invoked with locks acquired */ static int @@ -196,7 +196,7 @@ } if (best != NULL) { -@@ -599,6 +583,9 @@ ap_end(struct ieee80211_scan_state *ss, +@@ -599,6 +583,9 @@ ap_end(struct ieee80211_scan_state *ss, ("wrong opmode %u", vap->iv_opmode)); ic = vap->iv_ic; @@ -208,7 +208,7 @@ if (ss->ss_last > 0) { --- a/net80211/ieee80211_scan.c +++ b/net80211/ieee80211_scan.c -@@ -1002,20 +1002,33 @@ ieee80211_scan_add_channels(struct ieee8 +@@ -1002,20 +1002,34 @@ ieee80211_scan_add_channels(struct ieee8 { struct ieee80211_channel *c, *cg; u_int modeflags; @@ -218,6 +218,7 @@ KASSERT(mode < ARRAY_SIZE(chanflags), ("Unexpected mode %u", mode)); modeflags = chanflags[mode]; for (i = 0; i < ic->ic_nchans; i++) { + c = &ic->ic_channels[i]; + if (c->ic_flags & (IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO)) + continue; + @@ -225,7 +226,7 @@ + break; + } + for (i = 0; i < ic->ic_nchans; i++) { - c = &ic->ic_channels[i]; ++ c = &ic->ic_channels[i]; if (c == NULL || isclr(ic->ic_chan_active, c->ic_ieee)) continue; if (c->ic_scanflags & IEEE80211_NOSCAN_SET)