Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 2009 21:15:41 +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: r193760 - head/sys/net80211
Message-ID:  <200906082115.n58LFfqk043895@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Mon Jun  8 21:15:40 2009
New Revision: 193760
URL: http://svn.freebsd.org/changeset/base/193760

Log:
  fix big-endian machines

Modified:
  head/sys/net80211/ieee80211_radiotap.c

Modified: head/sys/net80211/ieee80211_radiotap.c
==============================================================================
--- head/sys/net80211/ieee80211_radiotap.c	Mon Jun  8 21:14:21 2009	(r193759)
+++ head/sys/net80211/ieee80211_radiotap.c	Mon Jun  8 21:15:40 2009	(r193760)
@@ -153,17 +153,17 @@ ieee80211_radiotap_chan_change(struct ie
 	if (ic->ic_rxchan != NULL) {
 		struct ieee80211_radiotap_header *rh = ic->ic_rh;
 
-		if (rh->it_present & (1<<IEEE80211_RADIOTAP_XCHANNEL))
+		if (rh->it_present & htole32(1<<IEEE80211_RADIOTAP_XCHANNEL))
 			set_xchannel(ic->ic_rxchan, ic->ic_curchan);
-		else if (rh->it_present & (1<<IEEE80211_RADIOTAP_CHANNEL))
+		else if (rh->it_present & htole32(1<<IEEE80211_RADIOTAP_CHANNEL))
 			set_channel(ic->ic_rxchan, ic->ic_curchan);
 	}
 	if (ic->ic_txchan != NULL) {
 		struct ieee80211_radiotap_header *th = ic->ic_th;
 
-		if (th->it_present & (1<<IEEE80211_RADIOTAP_XCHANNEL))
+		if (th->it_present & htole32(1<<IEEE80211_RADIOTAP_XCHANNEL))
 			set_xchannel(ic->ic_txchan, ic->ic_curchan);
-		else if (th->it_present & (1<<IEEE80211_RADIOTAP_CHANNEL))
+		else if (th->it_present & htole32(1<<IEEE80211_RADIOTAP_CHANNEL))
 			set_channel(ic->ic_txchan, ic->ic_curchan);
 	}
 }



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