From patchwork Sun Nov 6 03:13:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Bai X-Patchwork-Id: 16062 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1294304wru; Sat, 5 Nov 2022 20:18:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM62ElAPa3BgkY7fYHq9283ded/UIPj/VGLybzcvLspXuZLOzqXwpJ8vXKpBUvQM1Zqw++lO X-Received: by 2002:a17:907:6eab:b0:78d:4c16:a687 with SMTP id sh43-20020a1709076eab00b0078d4c16a687mr41576652ejc.392.1667704706417; Sat, 05 Nov 2022 20:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667704706; cv=none; d=google.com; s=arc-20160816; b=HfG71mXg6yi0SY3vZKnqsIVE9Lbj1xQ0eryNVHa83qWkPctHLEnTLkt+xxJUk3JZh7 MYRnMa74DapCJ3xSahK5E2QXvNSkCh4Yuy94iu2BJu3fmqieb3bKgZqGVOiFN5CauI5X Kh0yXZH6Iamoahseq6DfjIH9sKDS8B4pq0EyjjiiVxQCnvZsY7ZV9O7GJPE8hwot1kAq KNlVQSMrUi0DWMwsymWzYGSEsRGAbyuw7F86mZrPlcJKJfEafdV1B/3IQ5v/RNDcbz6N WaO8fo09DWnotvIKbJPjZDPoYB9k9HsQZjte0HPSI6fUJyEnVwwU3OV5x1lsS0ju2AYX dLcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QAn4ayFDcY1ljL5JrQGh7qC0mRQ6YUvrsVxRS5lz8ds=; b=htPzB92Z/SobGgU3LhyMLPiNUHBzhuH8aFLkjf3SB903OTFF1ad4e5vuqInqw4Y+3r XUgYBOJa8P8fjmYbdqSP4Iq57yWVWWoB74SUk0sPW/ProyJgKbby7y6oFUqCbMhaGP4t pp7Z+lWEMU+qh5A53I1oZ04t1ycUOzv3fDYFK9i2Oi19cGPeSZLfUnC1sCRaUrORmhad NuneDOemiuHDwrbid6d5nmb0tApMnQKYGQEqSMSuUcMsHpanifDy7KiSARobq6i9+OHZ EKpFa/Yr2B6BBEjOJzxHJpIvKrTBAxJX3UA+DdX2M8av0E0w+tZx4QZ296m+k9Jne76c 2cMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=etYbGdxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020a056402274100b00461eb5cdcdcsi5651004edd.23.2022.11.05.20.18.02; Sat, 05 Nov 2022 20:18:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=etYbGdxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbiKFDON (ORCPT + 99 others); Sat, 5 Nov 2022 23:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229662AbiKFDOH (ORCPT ); Sat, 5 Nov 2022 23:14:07 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E80647E for ; Sat, 5 Nov 2022 20:13:59 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id b185so7778035pfb.9 for ; Sat, 05 Nov 2022 20:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QAn4ayFDcY1ljL5JrQGh7qC0mRQ6YUvrsVxRS5lz8ds=; b=etYbGdxgQB1nzYeW1vKiFr5M2hsgHfON3wyWNvOZJ1LQVjWbdi41e9I5NpHYWZps+G OTmdVJAMhSMFt6AAvdp9ep/SLAWxE07aDPz393XsGAw8v390X7C5XvgfVTfBkVPN/5q8 FRxKDRZKokDwi/dTfoHB700rWAmQiA/2e7rhZRC8L0dgq/B0KeMTT2w89PIavqwanZiz dxweil5/vkwUxZD+R6KLHHqCKj3mBNWxwVAHgLngd1WPA4U7HDuNqJUq+UVCWzLBZeM9 ZEXR5Er8hRgVZ1LlZ7q9HDuhrd/+jVZAEAAL/3nzImtG2Q3tvoyXLpbJyA7ja8COoBza HA7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QAn4ayFDcY1ljL5JrQGh7qC0mRQ6YUvrsVxRS5lz8ds=; b=ejyx7GdKuPB9wltFNcCBmjXwR7uIPEdHaQKLACmwmuehLw4kRP6LmuJY5bi18ENJcq AfjzD47DB1anTuDRnQXXy4jNT0RMDpZBWPxuTXBQOfF8zljmhjyG4p0GqY+cIeuFlOd9 HOnZUzoJJJgo8ZOY9VOa7ROHk1phrZhdjgJJn0ZppYTfXJGf6SOqp8lOWbZvM1qCBJZG rRaZ2KJj/N5inFsSDlXlSWscni3Zk3h8YBW6xaPg8SPa9J/iRsfDGwlSkMeDf+GALvxM /JkIAZPs/472dLxpufu9sp6qycZPoPJVxhprX8aMDzwuGoFjBfqRTiXeyAWY4Jv7S86n EnGg== X-Gm-Message-State: ACrzQf1uZI41uU6uM/x2ATMuiDE4VBVv3K+E8zV2DdyNEiSUTomeHbqy gTFIoT5pjWdomuvNFYK4eZfuTUJPKxrPVjcl X-Received: by 2002:aa7:9099:0:b0:56a:d3f0:a013 with SMTP id i25-20020aa79099000000b0056ad3f0a013mr44015279pfa.26.1667704438386; Sat, 05 Nov 2022 20:13:58 -0700 (PDT) Received: from jacob-Ubuntu (126.224.215.218.sta.wbroadband.net.au. [218.215.224.126]) by smtp.gmail.com with ESMTPSA id u2-20020a17090adb4200b00214247989dfsm1872841pjx.13.2022.11.05.20.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 20:13:58 -0700 (PDT) From: Jacob Bai To: joe@perches.com, gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] staging: rtl8192e: replace macro defines with ARRAY_SIZE Date: Sun, 6 Nov 2022 14:13:40 +1100 Message-Id: <13fddf4affd15a58c191be717ddee75772849f4e.1667704057.git.jacob.bai.au@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748715129861839556?= X-GMAIL-MSGID: =?utf-8?q?1748715129861839556?= use ARRAY_SIZE() to replace macro defines Signed-off-by: Jacob Bai --- .../staging/rtl8192e/rtl8192e/r8192E_phy.c | 52 +++++++++---------- .../staging/rtl8192e/rtl8192e/r8192E_phy.h | 20 ------- drivers/staging/rtl8192e/rtl8192e/table.c | 32 ++++++++---- drivers/staging/rtl8192e/rtl8192e/table.h | 36 ++++++------- 4 files changed, 65 insertions(+), 75 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index eabb4187d907..aad1842857c0 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -307,12 +307,12 @@ void rtl92e_config_mac(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); if (priv->bTXPowerDataReadFromEEPORM) { - dwArrayLen = MACPHY_Array_PGLength; - pdwArray = Rtl819XMACPHY_Array_PG; + dwArrayLen = RTL8192E_MAC_ARRAY_PG_LEN; + pdwArray = RTL8192E_MAC_ARRAY_PG; } else { - dwArrayLen = MACPHY_ArrayLength; - pdwArray = Rtl819XMACPHY_Array; + dwArrayLen = RTL8192E_MAC_ARRAY_LEN; + pdwArray = RTL8192E_MAC_ARRAY; } for (i = 0; i < dwArrayLen; i += 3) { if (pdwArray[i] == 0x318) @@ -332,14 +332,14 @@ static void _rtl92e_phy_config_bb(struct net_device *dev, u8 ConfigType) u16 AGCTAB_ArrayLen, PHY_REGArrayLen = 0; struct r8192_priv *priv = rtllib_priv(dev); - AGCTAB_ArrayLen = AGCTAB_ArrayLength; - Rtl819XAGCTAB_Array_Table = Rtl819XAGCTAB_Array; + AGCTAB_ArrayLen = RTL8192E_AGC_TAB_ARRAY_LEN; + Rtl819XAGCTAB_Array_Table = RTL8192E_AGC_TAB_ARRAY; if (priv->rf_type == RF_2T4R) { - PHY_REGArrayLen = PHY_REGArrayLength; - Rtl819XPHY_REGArray_Table = Rtl819XPHY_REGArray; + PHY_REGArrayLen = RTL8192E_PHY_REG_ARRAY_LEN; + Rtl819XPHY_REGArray_Table = RTL8192E_PHY_REG_ARRAY; } else if (priv->rf_type == RF_1T2R) { - PHY_REGArrayLen = PHY_REG_1T2RArrayLength; - Rtl819XPHY_REGArray_Table = Rtl819XPHY_REG_1T2RArray; + PHY_REGArrayLen = RTL8192E_PHY_REG_1T2R_ARRAY_LEN; + Rtl819XPHY_REGArray_Table = RTL8192E_PHY_REG_1T2R_ARRAY; } if (ConfigType == BaseBand_Config_PHY_REG) { @@ -668,50 +668,50 @@ u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath) switch (eRFPath) { case RF90_PATH_A: - for (i = 0; i < RadioA_ArrayLength; i += 2) { - if (Rtl819XRadioA_Array[i] == 0xfe) { + for (i = 0; i < RTL8192E_RADIOA_ARRAY_LEN; i += 2) { + if (RTL8192E_RADIOA_ARRAY[i] == 0xfe) { msleep(100); continue; } - rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioA_Array[i], + rtl92e_set_rf_reg(dev, eRFPath, RTL8192E_RADIOA_ARRAY[i], bMask12Bits, - Rtl819XRadioA_Array[i+1]); + RTL8192E_RADIOA_ARRAY[i+1]); } break; case RF90_PATH_B: - for (i = 0; i < RadioB_ArrayLength; i += 2) { - if (Rtl819XRadioB_Array[i] == 0xfe) { + for (i = 0; i < RTL8192E_RADIOB_ARRAY_LEN; i += 2) { + if (RTL8192E_RADIOB_ARRAY[i] == 0xfe) { msleep(100); continue; } - rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioB_Array[i], + rtl92e_set_rf_reg(dev, eRFPath, RTL8192E_RADIOB_ARRAY[i], bMask12Bits, - Rtl819XRadioB_Array[i+1]); + RTL8192E_RADIOB_ARRAY[i+1]); } break; case RF90_PATH_C: - for (i = 0; i < RadioC_ArrayLength; i += 2) { - if (Rtl819XRadioC_Array[i] == 0xfe) { + for (i = 0; i < RTL8192E_RADIOC_ARRAY_LEN; i += 2) { + if (RTL8192E_RADIOC_ARRAY[i] == 0xfe) { msleep(100); continue; } - rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioC_Array[i], + rtl92e_set_rf_reg(dev, eRFPath, RTL8192E_RADIOC_ARRAY[i], bMask12Bits, - Rtl819XRadioC_Array[i+1]); + RTL8192E_RADIOC_ARRAY[i+1]); } break; case RF90_PATH_D: - for (i = 0; i < RadioD_ArrayLength; i += 2) { - if (Rtl819XRadioD_Array[i] == 0xfe) { + for (i = 0; i < RTL8192E_RADIOD_ARRAY_LEN; i += 2) { + if (RTL8192E_RADIOD_ARRAY[i] == 0xfe) { msleep(100); continue; } - rtl92e_set_rf_reg(dev, eRFPath, Rtl819XRadioD_Array[i], + rtl92e_set_rf_reg(dev, eRFPath, RTL8192E_RADIOD_ARRAY[i], bMask12Bits, - Rtl819XRadioD_Array[i+1]); + RTL8192E_RADIOD_ARRAY[i+1]); } break; diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h index e1c1f19b71a3..5e6527e835db 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h @@ -9,26 +9,6 @@ #define MAX_DOZE_WAITING_TIMES_9x 64 -#define AGCTAB_ArrayLength RTL8192E_AGC_TAB_ARRAY_LEN -#define MACPHY_ArrayLength RTL8192E_MAC_ARRAY_LEN -#define RadioA_ArrayLength RTL8192E_RADIOA_ARRAY_LEN -#define RadioB_ArrayLength RTL8192E_RADIOB_ARRAY_LEN -#define MACPHY_Array_PGLength RTL8192E_MAC_ARRAY_PG_LEN -#define RadioC_ArrayLength RTL8192E_RADIOC_ARRAY_LEN -#define RadioD_ArrayLength RTL8192E_RADIOD_ARRAY_LEN -#define PHY_REGArrayLength RTL8192E_PHY_REG_ARRAY_LEN -#define PHY_REG_1T2RArrayLength RTL8192E_PHY_REG_1T2R_ARRAY_LEN - -#define Rtl819XMACPHY_Array_PG RTL8192E_MAC_ARRAY_PG -#define Rtl819XMACPHY_Array RTL8192E_MAC_ARRAY -#define Rtl819XRadioA_Array RTL8192E_RADIOA_ARRAY -#define Rtl819XRadioB_Array RTL8192E_RADIOB_ARRAY -#define Rtl819XRadioC_Array RTL8192E_RADIOC_ARRAY -#define Rtl819XRadioD_Array RTL8192E_RADIOD_ARRAY -#define Rtl819XAGCTAB_Array RTL8192E_AGC_TAB_ARRAY -#define Rtl819XPHY_REGArray RTL8192E_PHY_REG_ARRAY -#define Rtl819XPHY_REG_1T2RArray RTL8192E_PHY_REG_1T2R_ARRAY - extern u32 rtl819XAGCTAB_Array[]; enum hw90_block { diff --git a/drivers/staging/rtl8192e/rtl8192e/table.c b/drivers/staging/rtl8192e/rtl8192e/table.c index 2e75f40db874..936f2ea180cd 100644 --- a/drivers/staging/rtl8192e/rtl8192e/table.c +++ b/drivers/staging/rtl8192e/rtl8192e/table.c @@ -4,11 +4,13 @@ * * Contact Information: wlanfae */ +#include #include "table.h" -u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN] = {0x0,}; +u32 RTL8192E_PHY_REG_ARRAY[] = {0x0,}; +u32 RTL8192E_PHY_REG_ARRAY_LEN = ARRAY_SIZE(RTL8192E_PHY_REG_ARRAY); -u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = { +u32 RTL8192E_PHY_REG_1T2R_ARRAY[] = { 0x800, 0x00000000, 0x804, 0x00000001, 0x808, 0x0000fc00, @@ -158,8 +160,9 @@ u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = { 0xe18, 0x161a1a1a, 0xe1c, 0x12121416, }; +u32 RTL8192E_PHY_REG_1T2R_ARRAY_LEN = ARRAY_SIZE(RTL8192E_PHY_REG_1T2R_ARRAY); -u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN] = { +u32 RTL8192E_RADIOA_ARRAY[] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x00000ee0, @@ -284,8 +287,9 @@ u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN] = { 0x004, 0x00000975, 0x007, 0x00000700, }; +u32 RTL8192E_RADIOA_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOA_ARRAY); -u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN] = { +u32 RTL8192E_RADIOB_ARRAY[] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x000006e0, @@ -326,14 +330,17 @@ u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN] = { 0x004, 0x00000975, 0x007, 0x00000700, }; +u32 RTL8192E_RADIOB_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOB_ARRAY); -u32 RTL8192E_RADIOC_ARRAY[RTL8192E_RADIOC_ARRAY_LEN] = { - 0x0, }; +u32 RTL8192E_RADIOC_ARRAY[] = { + 0x0, 0x0 }; +u32 RTL8192E_RADIOC_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOC_ARRAY); -u32 RTL8192E_RADIOD_ARRAY[RTL8192E_RADIOD_ARRAY_LEN] = { - 0x0, }; +u32 RTL8192E_RADIOD_ARRAY[] = { + 0x0, 0x0 }; +u32 RTL8192E_RADIOD_ARRAY_LEN = ARRAY_SIZE(RTL8192E_RADIOD_ARRAY); -u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN] = { +u32 RTL8192E_MAC_ARRAY[] = { 0x03c, 0xffff0000, 0x00000f0f, 0x340, 0xffffffff, 0x161a1a1a, 0x344, 0xffffffff, 0x12121416, @@ -341,8 +348,9 @@ u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN] = { 0x12c, 0xffffffff, 0x04000802, 0x318, 0x00000fff, 0x00000100, }; +u32 RTL8192E_MAC_ARRAY_LEN = ARRAY_SIZE(RTL8192E_MAC_ARRAY); -u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN] = { +u32 RTL8192E_MAC_ARRAY_PG[] = { 0x03c, 0xffff0000, 0x00000f0f, 0xe00, 0xffffffff, 0x06090909, 0xe04, 0xffffffff, 0x00030306, @@ -354,8 +362,9 @@ u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN] = { 0x12c, 0xffffffff, 0x04000802, 0x318, 0x00000fff, 0x00000800, }; +u32 RTL8192E_MAC_ARRAY_PG_LEN = ARRAY_SIZE(RTL8192E_MAC_ARRAY_PG); -u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN] = { +u32 RTL8192E_AGC_TAB_ARRAY[] = { 0xc78, 0x7d000001, 0xc78, 0x7d010001, 0xc78, 0x7d020001, @@ -549,3 +558,4 @@ u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN] = { 0xc78, 0x693e001e, 0xc78, 0x6a3f001e, }; +u32 RTL8192E_AGC_TAB_ARRAY_LEN = ARRAY_SIZE(RTL8192E_AGC_TAB_ARRAY); diff --git a/drivers/staging/rtl8192e/rtl8192e/table.h b/drivers/staging/rtl8192e/rtl8192e/table.h index a80176c47127..233beeec3e65 100644 --- a/drivers/staging/rtl8192e/rtl8192e/table.h +++ b/drivers/staging/rtl8192e/rtl8192e/table.h @@ -11,23 +11,23 @@ #include -#define RTL8192E_PHY_REG_ARRAY_LEN 1 -extern u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN]; -#define RTL8192E_PHY_REG_1T2R_ARRAY_LEN 296 -extern u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN]; -#define RTL8192E_RADIOA_ARRAY_LEN 246 -extern u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN]; -#define RTL8192E_RADIOB_ARRAY_LEN 78 -extern u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN]; -#define RTL8192E_RADIOC_ARRAY_LEN 2 -extern u32 RTL8192E_RADIOC_ARRAY[RTL8192E_RADIOC_ARRAY_LEN]; -#define RTL8192E_RADIOD_ARRAY_LEN 2 -extern u32 RTL8192E_RADIOD_ARRAY[RTL8192E_RADIOD_ARRAY_LEN]; -#define RTL8192E_MAC_ARRAY_LEN 18 -extern u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN]; -#define RTL8192E_MAC_ARRAY_PG_LEN 30 -extern u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN]; -#define RTL8192E_AGC_TAB_ARRAY_LEN 384 -extern u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN]; +extern u32 RTL8192E_PHY_REG_ARRAY_LEN; +extern u32 RTL8192E_PHY_REG_ARRAY[]; +extern u32 RTL8192E_PHY_REG_1T2R_ARRAY_LEN; +extern u32 RTL8192E_PHY_REG_1T2R_ARRAY[]; +extern u32 RTL8192E_RADIOA_ARRAY_LEN; +extern u32 RTL8192E_RADIOA_ARRAY[]; +extern u32 RTL8192E_RADIOB_ARRAY_LEN; +extern u32 RTL8192E_RADIOB_ARRAY[]; +extern u32 RTL8192E_RADIOC_ARRAY_LEN; +extern u32 RTL8192E_RADIOC_ARRAY[]; +extern u32 RTL8192E_RADIOD_ARRAY_LEN; +extern u32 RTL8192E_RADIOD_ARRAY[]; +extern u32 RTL8192E_MAC_ARRAY_LEN; +extern u32 RTL8192E_MAC_ARRAY[]; +extern u32 RTL8192E_MAC_ARRAY_PG_LEN; +extern u32 RTL8192E_MAC_ARRAY_PG[]; +extern u32 RTL8192E_AGC_TAB_ARRAY_LEN; +extern u32 RTL8192E_AGC_TAB_ARRAY[]; #endif