1 Signed-off-by: Andrew Lunn <andrew@lunn.ch>
3 Index: madwifi-ng-r2568-20070710/net80211/ieee80211_beacon.c
4 ===================================================================
5 --- madwifi-ng-r2568-20070710.orig/net80211/ieee80211_beacon.c 2007-10-20 20:52:09.000000000 +0200
6 +++ madwifi-ng-r2568-20070710/net80211/ieee80211_beacon.c 2007-10-20 20:52:31.000000000 +0200
9 c = ieee80211_doth_findchan(vap, ic->ic_chanchange_chan);
12 + * The channel we have been requested to change to
13 + * is not valid. Drop the channel switch annoucement
14 + * from the beacon and don't change channel.
16 IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
17 - "%s: find channel failure\n", __func__);
18 - IEEE80211_UNLOCK_IRQ_EARLY(ic);
20 + "%s: find channel failure\n",
27 skb_pull(skb, sizeof(struct ieee80211_frame));
31 vap->iv_flags &= ~IEEE80211_F_CHANSWITCH;
32 ic->ic_flags &= ~IEEE80211_F_CHANSWITCH;
34 - /* NB: only for the first VAP to get here */
35 - if (ic->ic_curchan != c) {
36 + /* NB: only for the first VAP to get here, and we have a valid
37 + * new channel to change to.
39 + if (c && ic->ic_curchan != c) {
41 ic->ic_set_channel(ic);