Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2009 01:37:55 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188427 - head/sys/net80211
Message-ID:  <200902100137.n1A1btUZ077051@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Tue Feb 10 01:37:55 2009
New Revision: 188427
URL: http://svn.freebsd.org/changeset/base/188427

Log:
  correctly fixup iv_des_chan after installing a new channel table; if the
  previous channel is now invalid we must set it to IEEE80211_CHAN_ANYC

Modified:
  head/sys/net80211/ieee80211_regdomain.c

Modified: head/sys/net80211/ieee80211_regdomain.c
==============================================================================
--- head/sys/net80211/ieee80211_regdomain.c	Tue Feb 10 00:08:39 2009	(r188426)
+++ head/sys/net80211/ieee80211_regdomain.c	Tue Feb 10 01:37:55 2009	(r188427)
@@ -428,8 +428,9 @@ ieee80211_setregdomain(struct ieee80211v
 	ieee80211_scan_flush(vap);
 	ieee80211_dfs_reset(ic);
 	if (vap->iv_des_chan != IEEE80211_CHAN_ANYC) {
+		c = ieee80211_find_channel(ic, desfreq, desflags);
 		/* NB: may be NULL if not present in new channel list */
-		vap->iv_des_chan = ieee80211_find_channel(ic, desfreq, desflags);
+		vap->iv_des_chan = (c != NULL) ? c : IEEE80211_CHAN_ANYC;
 	}
 	IEEE80211_UNLOCK(ic);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902100137.n1A1btUZ077051>