svn commit: r188012 - head/sys/dev/ath/ath_hal/ar5212

Sam Leffler sam at FreeBSD.org
Mon Feb 2 08:56:59 PST 2009


Author: sam
Date: Mon Feb  2 16:56:58 2009
New Revision: 188012
URL: http://svn.freebsd.org/changeset/base/188012

Log:
  o make SAVE_CCK slightly less error prone by always writing the _flag
    value used later by RESTORE_CCK
  o swap arg order in RESTORE_CCK to slightly reduce cost

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212.h

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212.h	Mon Feb  2 16:55:57 2009	(r188011)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h	Mon Feb  2 16:56:58 2009	(r188012)
@@ -399,10 +399,11 @@ struct ath_hal_5212 {
 		(_chan)->ic_flags &= ~IEEE80211_CHAN_CCK;	\
 		(_chan)->ic_flags |= IEEE80211_CHAN_DYN;	\
 		(_flag) = AH_TRUE;				\
-	}							\
+	} else							\
+		(_flag) = AH_FALSE;				\
 } while (0)
 #define RESTORE_CCK(_ah, _chan, _flag) do {                     \
-	if ((IS_2425(_ah) || IS_2417(_ah)) && (_flag)) {	\
+	if ((_flag) && (IS_2425(_ah) || IS_2417(_ah))) {	\
 		(_chan)->ic_flags &= ~IEEE80211_CHAN_DYN;	\
 		(_chan)->ic_flags |= IEEE80211_CHAN_CCK;	\
 	}							\


More information about the svn-src-all mailing list