+ else
+ bias += get_overlap(ch->freq, c->ic_freq, ch->bw, bw);
+ }
+ else
+ bias += get_overlap(ch->freq, c->ic_freq, ch->bw, bw);
+ }
IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
"%s: directly switching to channel "
"%3d (%4d MHz)\n", __func__,
IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
"%s: directly switching to channel "
"%3d (%4d MHz)\n", __func__,
* change the channel here. */
change_channel(ic, new_channel);
ic->ic_bsschan = new_channel;
* change the channel here. */
change_channel(ic, new_channel);
ic->ic_bsschan = new_channel;
ieee80211_stop(vap->iv_dev);
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
ieee80211_stop(vap->iv_dev);
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
"%s: Channel switch to %3d (%4d MHz) NOW!\n",
IEEE80211_DPRINTF(vap, IEEE80211_MSG_DOTH,
"%s: Channel switch to %3d (%4d MHz) NOW!\n",
* the auto-select case; this should be redundant if the
--- a/net80211/ieee80211_proto.c
+++ b/net80211/ieee80211_proto.c
* the auto-select case; this should be redundant if the
--- a/net80211/ieee80211_proto.c
+++ b/net80211/ieee80211_proto.c
chan = ieee80211_find_channel(ic, ic->ic_bsschan->ic_freq, newflags);
if (chan == NULL) { /* XXX should not happen */
chan = ieee80211_find_channel(ic, ic->ic_bsschan->ic_freq, newflags);
if (chan == NULL) { /* XXX should not happen */
-@@ -575,6 +583,7 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -575,6 +583,7 @@ ap_end(struct ieee80211_scan_state *ss,
struct ap_state *as = ss->ss_priv;
struct ieee80211_channel *bestchan = NULL;
struct ieee80211com *ic = NULL;
struct ap_state *as = ss->ss_priv;
struct ieee80211_channel *bestchan = NULL;
struct ieee80211com *ic = NULL;
-@@ -586,8 +595,11 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -586,8 +595,11 @@ ap_end(struct ieee80211_scan_state *ss,
if (ss->ss_last > 0) {
/* no suitable channel, should not happen */
printk(KERN_ERR "%s: %s: no suitable channel! "
if (ss->ss_last > 0) {
/* no suitable channel, should not happen */
printk(KERN_ERR "%s: %s: no suitable channel! "
-@@ -606,6 +618,7 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -606,6 +618,7 @@ ap_end(struct ieee80211_scan_state *ss,
bestchan->ic_freq, bestchan->ic_flags &
~IEEE80211_CHAN_TURBO)) == NULL) {
/* should never happen ?? */
bestchan->ic_freq, bestchan->ic_flags &
~IEEE80211_CHAN_TURBO)) == NULL) {
/* should never happen ?? */
-@@ -618,6 +631,9 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -618,6 +631,9 @@ ap_end(struct ieee80211_scan_state *ss,