From 286b1aea9dca17ec0ddf351a096c7530fc43f114 Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 2 Feb 2009 16:56:58 +0000 Subject: 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 --- sys/dev/ath/ath_hal/ar5212/ar5212.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212.h b/sys/dev/ath/ath_hal/ar5212/ar5212.h index c73b68c..e0edcf6 100644 --- a/sys/dev/ath/ath_hal/ar5212/ar5212.h +++ b/sys/dev/ath/ath_hal/ar5212/ar5212.h @@ -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; \ } \ -- cgit v1.1