madwifi: improve turbo/autochannel patch
authorFelix Fietkau <nbd@openwrt.org>
Sun, 29 Mar 2009 05:28:50 +0000 (05:28 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 29 Mar 2009 05:28:50 +0000 (05:28 +0000)
SVN-Revision: 15067

package/madwifi/patches/418-turbo.patch

index ec0b49182d1bb84bbc838dd2cd95707ab34d932d..4e13f90d208a2c67b6f13362ab6c9e19aff55228 100644 (file)
@@ -1,11 +1,15 @@
 --- a/net80211/ieee80211_scan.c
 +++ b/net80211/ieee80211_scan.c
-@@ -1129,7 +1129,7 @@ ieee80211_scan_add_channels(struct ieee8
+@@ -1129,7 +1129,11 @@ ieee80211_scan_add_channels(struct ieee8
                        continue;
                if (c->ic_scanflags & IEEE80211_NOSCAN_SET)
                        continue;
 -              if (modeflags &&
-+              if ((modeflags || (ss->ss_vap->iv_opmode == IEEE80211_M_HOSTAP)) &&
++              if (ss->ss_vap->iv_opmode == IEEE80211_M_HOSTAP) {
++                      if ((c->ic_flags & (IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO)) !=
++                          (modeflags & (IEEE80211_CHAN_TURBO | IEEE80211_CHAN_STURBO)))
++                              continue;
++              } else if (modeflags &&
                        ((c->ic_flags & IEEE80211_CHAN_ALLTURBO) !=
                         (modeflags & IEEE80211_CHAN_ALLTURBO)))
                        continue;