From patchwork Mon Jul 18 14:29:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 986842 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6IEUVs7002928 for ; Mon, 18 Jul 2011 14:30:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754345Ab1GROa1 (ORCPT ); Mon, 18 Jul 2011 10:30:27 -0400 Received: from mms2.broadcom.com ([216.31.210.18]:4202 "EHLO mms2.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752719Ab1GROaX (ORCPT ); Mon, 18 Jul 2011 10:30:23 -0400 Received: from [10.9.200.131] by mms2.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Mon, 18 Jul 2011 07:35:08 -0700 X-Server-Uuid: D3C04415-6FA8-4F2C-93C1-920E106A2031 Received: from mail-irva-13.broadcom.com (10.11.16.103) by IRVEXCHHUB01.corp.ad.broadcom.com (10.9.200.131) with Microsoft SMTP Server id 8.2.247.2; Mon, 18 Jul 2011 07:30:10 -0700 Received: from mail-sj1-12.sj.broadcom.com (mail-sj1-12.sj.broadcom.com [10.17.16.106]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 64AD974D03; Mon, 18 Jul 2011 07:30:10 -0700 (PDT) Received: from arend-laptop (unknown [10.176.68.34]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id 197A620503; Mon, 18 Jul 2011 07:30:06 -0700 (PDT) Received: from arend by arend-laptop with local (Exim 4.74) ( envelope-from ) id 1Qiopi-0002dE-0U; Mon, 18 Jul 2011 16:30:06 +0200 From: "Arend van Spriel" To: gregkh@suse.de cc: "Roland Vossen" , linux-wireless@vger.kernel.org, devel@linuxdriverproject.org, "Arend van Spriel" Subject: [PATCH 02/19] staging: brcm80211: resolved checkpatch warnings in LCN phy Date: Mon, 18 Jul 2011 16:29:48 +0200 Message-ID: <1310999405-10062-3-git-send-email-arend@broadcom.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1310999405-10062-1-git-send-email-arend@broadcom.com> References: <1310999405-10062-1-git-send-email-arend@broadcom.com> MIME-Version: 1.0 X-WSS-ID: 623A9B165ZC3717571-01-01 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 18 Jul 2011 14:30:31 +0000 (UTC) From: Roland Vossen Refactored code to not exceed the 80 char limit. Cc: linux-wireless@vger.kernel.org Cc: devel@linuxdriverproject.org Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Henry Ptasinski Signed-off-by: Arend van Spriel --- drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 46 ++++++++-------------- 1 files changed, 16 insertions(+), 30 deletions(-) diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c index a109866..3d140eb 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c @@ -4342,39 +4342,25 @@ static void wlc_lcnphy_tbl_init(struct brcms_phy *pi) } if (LCNREV_IS(pi->pubpi.phy_rev, 2)) { + const struct phytbl_info *tb; + int l; + if (CHSPEC_IS2G(pi->radio_chanspec)) { - for (idx = 0; - idx < dot11lcnphytbl_rx_gain_info_2G_rev2_sz; - idx++) - if (pi->sh->boardflags & BFL_EXTLNA) - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_extlna_2G_rev2 - [idx]); - else - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_2G_rev2 - [idx]); + l = dot11lcnphytbl_rx_gain_info_2G_rev2_sz; + if (pi->sh->boardflags & BFL_EXTLNA) + tb = dot11lcnphytbl_rx_gain_info_extlna_2G_rev2; + else + tb = dot11lcnphytbl_rx_gain_info_2G_rev2; } else { - for (idx = 0; - idx < dot11lcnphytbl_rx_gain_info_5G_rev2_sz; - idx++) - if (pi->sh->boardflags & BFL_EXTLNA_5GHz) - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_extlna_5G_rev2 - [idx]); - else - wlc_lcnphy_write_table( - pi, - & - dot11lcnphytbl_rx_gain_info_5G_rev2 - [idx]); + l = dot11lcnphytbl_rx_gain_info_5G_rev2_sz; + if (pi->sh->boardflags & BFL_EXTLNA_5GHz) + tb = dot11lcnphytbl_rx_gain_info_extlna_5G_rev2; + else + tb = dot11lcnphytbl_rx_gain_info_5G_rev2; } + + for (idx = 0; idx < l; idx++) + wlc_lcnphy_write_table(pi, &tb[idx]); } if ((pi->sh->boardflags & BFL_FEM)