Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:45437 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757358Ab0LBM3v convert rfc822-to-8bit (ORCPT ); Thu, 2 Dec 2010 07:29:51 -0500 Received: by iwn42 with SMTP id 42so900524iwn.19 for ; Thu, 02 Dec 2010 04:29:51 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20101202122147.GN12908@vasanth-laptop> References: <1291288031-3409-1-git-send-email-vasanth@atheros.com> <1291288031-3409-17-git-send-email-vasanth@atheros.com> <20101202120925.GM12908@vasanth-laptop> <20101202122147.GN12908@vasanth-laptop> From: Julian Calaby Date: Thu, 2 Dec 2010 23:29:30 +1100 Message-ID: Subject: Re: [PATCH V2 16/27] ath9k_hw: Read and configure antenna diversity control for AR9485 To: Vasanthakumar Thiagarajan Cc: Vasanth Thiagarajan , "linville@tuxdriver.com" , "linux-wireless@vger.kernel.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, Dec 2, 2010 at 23:21, Vasanthakumar Thiagarajan wrote: > On Thu, Dec 02, 2010 at 05:46:05PM +0530, Julian Calaby wrote: >> On Thu, Dec 2, 2010 at 23:09, Vasanthakumar Thiagarajan >> wrote: >> > No, these are to separate things. >> >> Are you sure? you seem to be doing: >> >> if (!AR_SREV_9485(ah)) { >> ? ? // CODE >> } >> >> if (AR_SREV_9485(ah)) { >> ? ? // MORE CODE >> } >> >> which I'm certain can be simlified as: >> >> if (!AR_SREV_9485(ah)) { >> ? ? // CODE >> } else { >> ? ? // MORE CODE >> } >> >> unless you're telling me that the value of AR_SREV_9485(ah) can change >> in the course of the first statement. > > I mean the register configuration. In one case, chain 1 and chain 2 > are irrelevant for AR9485. The second is antenna diversity is > enabled only for AR9485. Putting them in if..else would be > misleading, though is can be in if..else. Ah, fair enough then. I was just thinking that this would save a check, though I'm guessing this is setup code so it's not that time sensitive. Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/