From owner-svn-src-head@FreeBSD.ORG Mon Feb 2 16:56:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C626F106566B; Mon, 2 Feb 2009 16:56:58 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B47C78FC1B; Mon, 2 Feb 2009 16:56:58 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n12Guwx4002310; Mon, 2 Feb 2009 16:56:58 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n12Guw1i002309; Mon, 2 Feb 2009 16:56:58 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902021656.n12Guw1i002309@svn.freebsd.org> From: Sam Leffler Date: Mon, 2 Feb 2009 16:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188012 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 16:56:59 -0000 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; \ } \