madwifi: fix uninitialized variable
authorFelix Fietkau <nbd@openwrt.org>
Fri, 8 May 2009 18:49:05 +0000 (18:49 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 8 May 2009 18:49:05 +0000 (18:49 +0000)
SVN-Revision: 15711

package/madwifi/patches/389-autochannel.patch
package/madwifi/patches/411-autochannel_multi.patch

index 8f7437a3f463e170538585ee836fd746d66038ab..c818b89ef9f3f22fe547aab96a2222799a581e43 100644 (file)
                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;
        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;
 +
 +              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)
index 6b970ca69799db5c98e1e29478157c6475acbac5..1140a1e2a6de4ef4379f85ce11b879f027e1b73a 100644 (file)
  void
  ieee80211_scan_attach(struct ieee80211com *ic)
  {
-@@ -1168,7 +1285,7 @@ ieee80211_scan_dfs_action(struct ieee802
+@@ -1169,7 +1286,7 @@ ieee80211_scan_dfs_action(struct ieee802
                                IEEE80211_RADAR_CHANCHANGE_TBTT_COUNT;
                        ic->ic_flags |= IEEE80211_F_CHANSWITCH;
                } else {
                        IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
                                        "%s: directly switching to channel "
                                        "%3d (%4d MHz)\n", __func__,
-@@ -1179,6 +1296,9 @@ ieee80211_scan_dfs_action(struct ieee802
+@@ -1180,6 +1297,9 @@ ieee80211_scan_dfs_action(struct ieee802
                         * change the channel here. */
                        change_channel(ic, new_channel);
                        ic->ic_bsschan = new_channel;