Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2011 17:42:21 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220636 - head/sys/dev/iwn
Message-ID:  <201104141742.p3EHgL1h042403@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Thu Apr 14 17:42:21 2011
New Revision: 220636
URL: http://svn.freebsd.org/changeset/base/220636

Log:
  Instead of trying to figure out which rxon.flags to clear, restart
  from scratch. Remove htole16() calls, rxon.chan is an uint8_t,
  ieee80211_chan2ieee() does return an ic_ieee as an int, but I heavily
  doubt a htole16() will buy us anything here.

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Thu Apr 14 17:31:34 2011	(r220635)
+++ head/sys/dev/iwn/if_iwn.c	Thu Apr 14 17:42:21 2011	(r220636)
@@ -4757,7 +4757,7 @@ iwn_auth(struct iwn_softc *sc, struct ie
 
 	/* Update adapter configuration. */
 	IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid);
-	sc->rxon.chan = htole16(ieee80211_chan2ieee(ic, ni->ni_chan));
+	sc->rxon.chan = ieee80211_chan2ieee(ic, ni->ni_chan);
 	sc->rxon.flags = htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);
 	if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))
 		sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);
@@ -4843,15 +4843,11 @@ iwn_run(struct iwn_softc *sc, struct iee
 
 	/* Update adapter configuration. */
 	IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid);
-	sc->rxon.chan = htole16(ieee80211_chan2ieee(ic, ni->ni_chan));
 	sc->rxon.associd = htole16(IEEE80211_AID(ni->ni_associd));
-	/* Short preamble and slot time are negotiated when associating. */
-	sc->rxon.flags &= ~htole32(IWN_RXON_SHPREAMBLE | IWN_RXON_SHSLOT);
-	sc->rxon.flags |= htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);
+	sc->rxon.chan = ieee80211_chan2ieee(ic, ni->ni_chan);
+	sc->rxon.flags = htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);
 	if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))
 		sc->rxon.flags |= htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);
-	else
-		sc->rxon.flags &= ~htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);
 	if (ic->ic_flags & IEEE80211_F_SHSLOT)
 		sc->rxon.flags |= htole32(IWN_RXON_SHSLOT);
 	if (ic->ic_flags & IEEE80211_F_SHPREAMBLE)



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