From patchwork Sun Nov 6 08:31:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Bai X-Patchwork-Id: 16087 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1392448wru; Sun, 6 Nov 2022 01:36:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7i5VQJrX7Tjo3j+NIQz3pGmAikTkSLWuq09ebjVr2XPfilAKyXpRPYUG7V/6esleyd9eKR X-Received: by 2002:a65:564d:0:b0:46f:ef6b:f065 with SMTP id m13-20020a65564d000000b0046fef6bf065mr24084882pgs.152.1667723772366; Sun, 06 Nov 2022 01:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667723772; cv=none; d=google.com; s=arc-20160816; b=kkcFSkqtJgOdXDhXcfY9LpDqB3BNtx5x/Z/V5XFRmeKVGra5VfYFuPRUvjMAlKswWL jhppAatXFnqN6jjnSaqL9Je+CsqeBMxFdRZCKemBJ/fBKV75aCuUCX7VBlZm6kNXszMB ashDele92pyi8iuEJCDFDJJZsDE1NHTF4fdfiviAUZeyZK7yGcrrULU4DfHHuYCSyALX lyuXGmr8fQivGiFr72z8UlvvpPVrOXalCX09/hSfrhDVyqU7qsosKLud8qJQoRGplYCG SKpqrqBSz1PL08TovLs7qdUbemNr76bzby0hOkgccRu+Z2KX4C7kUY/pvYc4i0Jff9sP G5hw== 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=XN+Q6Uz1Z9DwS84wbHOEHzmi43ielaLqgyLWhdiQqew=; b=JrpdlyqzgRNtbC1gDgmkyARtI2R30TK/AHJzWd6oMp1RK4Wj8ZWfJVcWoZNHIANsFT giVc+V2NfQ6D1W8PYPlUTIMSlf7GK4H1w1qlCYiYJ4SjUEG45crDmy3ltQvCZloXXHQC Gn9icrkQTD1eKuy6712JhPe/dHIzSJ+ujVvdjbc7EGLFlHtToglcvU2kxGgE5aQcyukx s7TjKhqfTC/2F6SdciP9tcKP7L5e/kHqWdbdEoUJ95QPyof0qWlB+rU6yo1qfqXL4RWP AIWprgFr0szbjI6vLy3WKzpHjIb85ZqgRiWEH6YUVArtQacIJ4P52FpjU3yXD9+UNQUl CTPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=R13wKsbw; 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 w20-20020a170902d71400b001869c2b3a3csi5526992ply.537.2022.11.06.01.35.59; Sun, 06 Nov 2022 01:36:12 -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=R13wKsbw; 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 S229698AbiKFIbc (ORCPT + 99 others); Sun, 6 Nov 2022 03:31:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbiKFIb2 (ORCPT ); Sun, 6 Nov 2022 03:31:28 -0500 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1978BC0A for ; Sun, 6 Nov 2022 01:31:26 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id 136so4068635pga.1 for ; Sun, 06 Nov 2022 01:31:26 -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=XN+Q6Uz1Z9DwS84wbHOEHzmi43ielaLqgyLWhdiQqew=; b=R13wKsbwgzBPyuZ8cAwlehS2hKb9kFFwccC1IeQxWulClJPBcrreAmPKEAF4apyJZc ksINKXvSANY/6lJhS7VCoryfwM1lGLxIxIPdXxhvWMfKTqlSdLV3LGkjTRKjSWGuYnag K01P58c1TgTiNcSC4A85ezW+THhzFHGJdygYPMMG1V2/H6P8RjbAvyJAWSxHjLIjhx5b BW1siskhKH0Wa/XlES698pR+EkMdiqb0TfxdDmb5e0JMtXagc1Cu2UowefdheiTqy/UQ kakQbHQxJjIRki0PvIwQ3FlRrmEfS78zA+cbbaDosv7pzP5Rzi6aBYY0zvMdYR/Y7CjE oBYA== 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=XN+Q6Uz1Z9DwS84wbHOEHzmi43ielaLqgyLWhdiQqew=; b=NBi+Wex5FclsV+Q7QjQzltNvusmkWCk9RPeOjtBuQPtXPqTn1xEjdJzcw1hzJ3kFQS ygLlhW4o6wmAFe+MsLy5D7bNLHV8AnSFEwYhP4hhL+X1s2IQ3FSzwHUaVoLscZ3g8ckW NoogG7X/BJYs2QQW1Zyalkxa6hdMVFwrLUi3QYS2EEFc4bYTvEmBdQpXI51dae06qT7U MsQnLLzRQ9rQJDVU0XAxj5NuWBKFCkGyNttnbo1dXGjpswaAX3p2OzwosSwdx504USzm qcv61Kvw+pAJhyrZqSvp/lNZ4TQYUI+KPyL1wHdEb6DSxH3iUAYeXyE2x+Xq40Plevcw DXTA== X-Gm-Message-State: ACrzQf2it5A8BJOQdIc8rdJQCZYrpsplyersrldrdb0xmgJUn0+wy10U x2OwG+S2nZo/pfkCIP7vp8IfRh2XP2STxrLe X-Received: by 2002:a63:2318:0:b0:452:598a:92de with SMTP id j24-20020a632318000000b00452598a92demr38778802pgj.73.1667723485997; Sun, 06 Nov 2022 01:31:25 -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 x13-20020a170902ec8d00b00186881e1feasm2758927plg.112.2022.11.06.01.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Nov 2022 01:31:25 -0700 (PDT) From: Jacob Bai To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/3] staging: rtl8192e: rename tables in r8192e_hwimg.c Date: Sun, 6 Nov 2022 19:31:16 +1100 Message-Id: <01eb4d9cb22be5f76aa39eedd406577cdfd9f486.1667723306.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?1748735121932367502?= X-GMAIL-MSGID: =?utf-8?q?1748735121932367502?= fix camel case issue. Signed-off-by: Jacob Bai --- .../staging/rtl8192e/rtl8192e/r8192E_hwimg.c | 18 +++++----- .../staging/rtl8192e/rtl8192e/r8192E_hwimg.h | 36 +++++++++---------- .../staging/rtl8192e/rtl8192e/r8192E_phy.h | 36 +++++++++---------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c index e6fce749e65b..8920283f340e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c @@ -6,9 +6,9 @@ */ #include "r8192E_hwimg.h" -u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLengthPciE] = {0x0,}; +u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN] = {0x0,}; -u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE] = { +u32 RTL8192E_PHY_REG_1T2R_ARRAY[RTL8192E_PHY_REG_1T2R_ARRAY_LEN] = { 0x800, 0x00000000, 0x804, 0x00000001, 0x808, 0x0000fc00, @@ -159,7 +159,7 @@ u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE] = { 0xe1c, 0x12121416, }; -u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE] = { +u32 RTL8192E_RADIOA_ARRAY[RTL8192E_RADIOA_ARRAY_LEN] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x00000ee0, @@ -285,7 +285,7 @@ u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE] = { 0x007, 0x00000700, }; -u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] = { +u32 RTL8192E_RADIOB_ARRAY[RTL8192E_RADIOB_ARRAY_LEN] = { 0x019, 0x00000003, 0x000, 0x000000bf, 0x001, 0x000006e0, @@ -327,13 +327,13 @@ u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE] = { 0x007, 0x00000700, }; -u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE] = { +u32 RTL8192E_RADIOC_ARRAY[RTL8192E_RADIOC_ARRAY_LEN] = { 0x0, }; -u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE] = { +u32 RTL8192E_RADIOD_ARRAY[RTL8192E_RADIOD_ARRAY_LEN] = { 0x0, }; -u32 Rtl8192PciEMACPHY_Array[] = { +u32 RTL8192E_MAC_ARRAY[RTL8192E_MAC_ARRAY_LEN] = { 0x03c, 0xffff0000, 0x00000f0f, 0x340, 0xffffffff, 0x161a1a1a, 0x344, 0xffffffff, 0x12121416, @@ -342,7 +342,7 @@ u32 Rtl8192PciEMACPHY_Array[] = { 0x318, 0x00000fff, 0x00000100, }; -u32 Rtl8192PciEMACPHY_Array_PG[] = { +u32 RTL8192E_MAC_ARRAY_PG[RTL8192E_MAC_ARRAY_PG_LEN] = { 0x03c, 0xffff0000, 0x00000f0f, 0xe00, 0xffffffff, 0x06090909, 0xe04, 0xffffffff, 0x00030306, @@ -355,7 +355,7 @@ u32 Rtl8192PciEMACPHY_Array_PG[] = { 0x318, 0x00000fff, 0x00000800, }; -u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLengthPciE] = { +u32 RTL8192E_AGC_TAB_ARRAY[RTL8192E_AGC_TAB_ARRAY_LEN] = { 0xc78, 0x7d000001, 0xc78, 0x7d010001, 0xc78, 0x7d020001, diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h index 7d63f5a5c1b7..a436c089a779 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h @@ -11,23 +11,23 @@ #include -#define PHY_REGArrayLengthPciE 1 -extern u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLengthPciE]; -#define PHY_REG_1T2RArrayLengthPciE 296 -extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE]; -#define RadioA_ArrayLengthPciE 246 -extern u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE]; -#define RadioB_ArrayLengthPciE 78 -extern u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE]; -#define RadioC_ArrayLengthPciE 2 -extern u32 Rtl8192PciERadioC_Array[RadioC_ArrayLengthPciE]; -#define RadioD_ArrayLengthPciE 2 -extern u32 Rtl8192PciERadioD_Array[RadioD_ArrayLengthPciE]; -#define MACPHY_ArrayLengthPciE 18 -extern u32 Rtl8192PciEMACPHY_Array[MACPHY_ArrayLengthPciE]; -#define MACPHY_Array_PGLengthPciE 30 -extern u32 Rtl8192PciEMACPHY_Array_PG[MACPHY_Array_PGLengthPciE]; -#define AGCTAB_ArrayLengthPciE 384 -extern u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLengthPciE]; +#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]; #endif diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h index 75629f5df954..e1c1f19b71a3 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h @@ -9,25 +9,25 @@ #define MAX_DOZE_WAITING_TIMES_9x 64 -#define AGCTAB_ArrayLength AGCTAB_ArrayLengthPciE -#define MACPHY_ArrayLength MACPHY_ArrayLengthPciE -#define RadioA_ArrayLength RadioA_ArrayLengthPciE -#define RadioB_ArrayLength RadioB_ArrayLengthPciE -#define MACPHY_Array_PGLength MACPHY_Array_PGLengthPciE -#define RadioC_ArrayLength RadioC_ArrayLengthPciE -#define RadioD_ArrayLength RadioD_ArrayLengthPciE -#define PHY_REGArrayLength PHY_REGArrayLengthPciE -#define PHY_REG_1T2RArrayLength PHY_REG_1T2RArrayLengthPciE +#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 Rtl8192PciEMACPHY_Array_PG -#define Rtl819XMACPHY_Array Rtl8192PciEMACPHY_Array -#define Rtl819XRadioA_Array Rtl8192PciERadioA_Array -#define Rtl819XRadioB_Array Rtl8192PciERadioB_Array -#define Rtl819XRadioC_Array Rtl8192PciERadioC_Array -#define Rtl819XRadioD_Array Rtl8192PciERadioD_Array -#define Rtl819XAGCTAB_Array Rtl8192PciEAGCTAB_Array -#define Rtl819XPHY_REGArray Rtl8192PciEPHY_REGArray -#define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray +#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[]; From patchwork Sun Nov 6 08:31:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Bai X-Patchwork-Id: 16088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1392615wru; Sun, 6 Nov 2022 01:36:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6y2+YK421MXL/iKzNlUIa8k9Y0KssQy9R9m8t5ClAsUoc/abW/8tFVNM6d3x3ikXpsg50r X-Received: by 2002:a17:90a:c24a:b0:213:13aa:3e2a with SMTP id d10-20020a17090ac24a00b0021313aa3e2amr61634520pjx.107.1667723787419; Sun, 06 Nov 2022 01:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667723787; cv=none; d=google.com; s=arc-20160816; b=ib4Hfk0L+arv9Z0gClzfdFeaTccdGP/nHGR2QQVu7/cODB68stxdq0S+eo9lzvIWgP 1bImilr2OzdG9BUW0xwaITJK0wDXVsQzLIERZRN2gyTqp43OluqyTFihqhX/BdosR7A4 BB2B/Eqq5dW9l/yXvkc/n/+ik8/Ued7wAA5YlErxuy2uPYYwx0no0afnJ244QOrmuuvq Lw5nqKEVd6dDuF9uDndrF6CscJ1YBjXjW4bASARTf9Vca2HmrG4+ymA1dA8irLScTEZb KcPaXOVfb1dM4nGlTBBWffd7DlhPKDeO2yw5VErk4C39Xk9D8NKlRVn+fUZV5NSPqnn2 Z/Yg== 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=OnBAG5nSkYnNoSht4YTz5XeCkVWk1xhgWCiV2ObcvEs=; b=Pc4NhcJmGafbw5T5XhpAq8ghG974xftJwxai9QbIfALOQkSPLZWlOSc7ynBzPiTulz x1sHL2M9PoiauOC1KxfAt6Dr16tZdPBspLtHr/ncD25eqw7XswDTTnvJIKznv1ElMChh mH74293iQh6oJKIFAKoUqn3ePbZd6sCK6CFOl2MEQKrNiwGfA/hVq/FXv1Q35TyS9P3j wX1PWDsPsgXFiiVf9kuqRUPssV+fw4CNLBzU2/aty4KnUvrxvR3dnEec/VqL4dqVEOB3 wDWwWq/AvDto6S7r90TYjh/e/V8EeAiUPL5Iag1WJEEChbd/fInsuX0S++8lQEXMu+Mt qpTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="NY/OeZJr"; 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 j5-20020a170903028500b0017f762e2dc6si5669686plr.613.2022.11.06.01.36.14; Sun, 06 Nov 2022 01:36:27 -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="NY/OeZJr"; 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 S229700AbiKFIbe (ORCPT + 99 others); Sun, 6 Nov 2022 03:31:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229701AbiKFIbb (ORCPT ); Sun, 6 Nov 2022 03:31:31 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBB98BC3E for ; Sun, 6 Nov 2022 01:31:30 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id b1-20020a17090a7ac100b00213fde52d49so7879530pjl.3 for ; Sun, 06 Nov 2022 01:31:30 -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=OnBAG5nSkYnNoSht4YTz5XeCkVWk1xhgWCiV2ObcvEs=; b=NY/OeZJrY0dPGvAIRlIVITH4axqCzhsWL9AY8PGa+sTiGm+hmKKtA/8rE1VtfBf8pQ Yn1zgIrroe9yi1x6hlaq2GgV7G4yN7jdvDXla3IIJN6MekuGDJAWoRUdOVSuEoRVlVXs Z+0zll77sxTpq5BOrv0LtR4oXxygAre+Eau1V+l+bZ9WSWk492GnEukpeCqImkmupnQ6 pP8wTtp9BDClO2PNfbvLY/vN+HbyzfcCwP4j089pa99StN40bAISPsufi1VgrX18cZ9z z+FJhBLIMR05J1l7xPKLPSxSF/EG2dMGQO1aIkGYAwd5/bZKM3noZKd3sivTwBHN22R8 PQTg== 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=OnBAG5nSkYnNoSht4YTz5XeCkVWk1xhgWCiV2ObcvEs=; b=zJKfItWSmZEOoYKveThAcsBkCEaOSGNj+mPpzDokCo2RZSYLnqNBnd9xZ+QgKQSNdJ 0gJa8UinyGE714DWyIiJbg8i0uBJdTv5L12vpBAiUR8JqFK11SRyKXCHyU3xcyfbG0xI 1MjjuGLLQdCIFUA5gaTMyXDwzYqCyhHvvhxq4ejZnWoyumMRkoDg0FwFvlp+FiWsxQYA vBBouwz2M+MBuNmUj9Bdl57sG27MZ4rBwyv1qow3bhHyP5LbFzV29fihfWzLpyhUmaHY J/FFUPijKHi9raUTGblXxwsTxWM6T2FSNqLCguLa5tTufKg1KHKrivd7s2p84MdelX+a ggig== X-Gm-Message-State: ACrzQf3eNl1Xjrbjv6jzbbvRpUE2rgPoTzle0ARwgRx05eV85UrebPDR nRS2su8O+V12mJbkjR1SLyxjQaVNBV+qRl/M X-Received: by 2002:a17:90a:64c3:b0:212:d67d:a034 with SMTP id i3-20020a17090a64c300b00212d67da034mr63034129pjm.55.1667723490161; Sun, 06 Nov 2022 01:31:30 -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 u14-20020a170903124e00b0018693643504sm2766839plh.40.2022.11.06.01.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Nov 2022 01:31:29 -0700 (PDT) From: Jacob Bai To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/3] staging: rtl8192e: rename r8192E_hwimg.c/h to table.c/h Date: Sun, 6 Nov 2022 19:31:17 +1100 Message-Id: <9bb563727915e3f3edd863837608336b99564462.1667723306.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?1748735138173363203?= X-GMAIL-MSGID: =?utf-8?q?1748735138173363203?= Same as other rtlwifi drivers, use table.c/h. Signed-off-by: Jacob Bai --- drivers/staging/rtl8192e/rtl8192e/Makefile | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 2 +- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.c => table.c} | 2 +- drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.h => table.h} | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.c => table.c} (99%) rename drivers/staging/rtl8192e/rtl8192e/{r8192E_hwimg.h => table.h} (94%) diff --git a/drivers/staging/rtl8192e/rtl8192e/Makefile b/drivers/staging/rtl8192e/rtl8192e/Makefile index 75e6ec510555..334d92efd4ba 100644 --- a/drivers/staging/rtl8192e/rtl8192e/Makefile +++ b/drivers/staging/rtl8192e/rtl8192e/Makefile @@ -4,7 +4,7 @@ r8192e_pci-objs := \ r8192E_phy.o \ r8192E_firmware.o \ r8192E_cmdpkt.o \ - r8192E_hwimg.o \ + table.o \ r8190P_rtl8256.o \ rtl_cam.o \ rtl_core.o \ diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c index 789d288d7503..45819f2f2a37 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c @@ -6,7 +6,7 @@ */ #include "rtl_core.h" #include "r8192E_hw.h" -#include "r8192E_hwimg.h" +#include "table.h" #include "r8192E_firmware.h" #include "r8192E_cmdpkt.h" #include diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index 58da2dab55bd..eabb4187d907 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -12,7 +12,7 @@ #include "r8192E_phy.h" #include "rtl_dm.h" -#include "r8192E_hwimg.h" +#include "table.h" static u32 RF_CHANNEL_TABLE_ZEBRA[] = { 0, diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c b/drivers/staging/rtl8192e/rtl8192e/table.c similarity index 99% rename from drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c rename to drivers/staging/rtl8192e/rtl8192e/table.c index 8920283f340e..2e75f40db874 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.c +++ b/drivers/staging/rtl8192e/rtl8192e/table.c @@ -4,7 +4,7 @@ * * Contact Information: wlanfae */ -#include "r8192E_hwimg.h" +#include "table.h" u32 RTL8192E_PHY_REG_ARRAY[RTL8192E_PHY_REG_ARRAY_LEN] = {0x0,}; diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h b/drivers/staging/rtl8192e/rtl8192e/table.h similarity index 94% rename from drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h rename to drivers/staging/rtl8192e/rtl8192e/table.h index a436c089a779..a80176c47127 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_hwimg.h +++ b/drivers/staging/rtl8192e/rtl8192e/table.h @@ -4,8 +4,8 @@ * * Contact Information: wlanfae */ -#ifndef __INC_HAL8192PciE_FW_IMG_H -#define __INC_HAL8192PciE_FW_IMG_H +#ifndef __RTL8192E_TABLE__H_ +#define __RTL8192E_TABLE__H_ /*Created on 2008/11/18, 3: 7*/ From patchwork Sun Nov 6 08:31:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Bai X-Patchwork-Id: 16089 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1394345wru; Sun, 6 Nov 2022 01:41:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Y3T+JOg65Q9mIpTHM3n/UkPck6JWmJld9UNLd8Zmh4BVy39qD22JAAA1e6RheqlHoFeVS X-Received: by 2002:a05:6a00:812:b0:56d:cc61:14dd with SMTP id m18-20020a056a00081200b0056dcc6114ddmr27585350pfk.57.1667724062344; Sun, 06 Nov 2022 01:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667724062; cv=none; d=google.com; s=arc-20160816; b=v3QWXwBtxQCm3Fm/V8Zf6vTdW5ntNc/q5vGfJ44S7RW6EWEiS0JhRSvfs+k4AeDzc0 MB9jMnlpeeVobKzF9siSQu5+Red+u1GJW8wW+0vApAYMtmJRfParEx66CywWhvOnmmwN XyesoOA0AKk8991BJ9TpTjSgRx8+xgwSiRVTklbca7yPfQRoMFJsqCgNTZ/Au4unKUxI EWOgIL0JEIm4ZFSXFsSOE0IBvmHCngr0JhySbI+yVAxLTgtZhTXU43CVIyp7G2h7taif skUpn858AD5+C0bkdS4kg1roB1FS3Xe7dRc5AiCI80q6YzUzL9vIQHoaodZzsyHk6/aN OXYw== 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=As8j4RMhGaP0Z9OzL+SsntyhnlaWddWjWe+6gwRbatjlKQx3kErVPwWIKYCpULhO4x hN01lARIH5Sj0Hjk3VYMRm9vwFS6NgG2daPzi2/7xfqcPnmmXOGwDkVHl2nBxsI7oAS8 py6tmef9pEp68bQY2ewc3A8TXjtBXlEII9cz41L2OZfcXU0qPhqVSNnKa3K4zdBzXx+K GeNpKprVD+fK70/qfqrDOkBvZAuFTNRGIb9xhLcO7rHAbJr0ItxVPX1U9JUZkowHASZ+ diiaU9Ry/Ji5a/ZZVgeEjqabRPrTFmvbPLjqgGX2h79q8Ggxj+yjurTMkCTRNuH+/snv 45wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=m6WBwe6P; 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 k19-20020aa788d3000000b0056ae8f6df38si6448666pff.180.2022.11.06.01.40.49; Sun, 06 Nov 2022 01:41:02 -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=m6WBwe6P; 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 S229715AbiKFIbn (ORCPT + 99 others); Sun, 6 Nov 2022 03:31:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbiKFIbh (ORCPT ); Sun, 6 Nov 2022 03:31:37 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0216BC84 for ; Sun, 6 Nov 2022 01:31:34 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id l6so8023837pjj.0 for ; Sun, 06 Nov 2022 01:31:34 -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=m6WBwe6PMeJj87bfQMjJ87WMfqMuysO4S/LU4azPFJr9WpE30j5TnZIOyuvsiTtpQO nsY4dOVvfEygzoynkH2RpQPseuSVQOgnYW3mtl7GUiyWXp0/AyuV9YCeCJt8EUBHGhWP jlsab9Hxw34PTBJGxQtkKqfKD8X8Qrf62bhkjU8q4FSfBLPU47vSfh3FqSms2I3NWwF3 xl3HgAx6itGiwbN7BON/Ja1r7c5CrysOulzdWeGMQhgyhhWBphiv7w8YMbjpjeJOZaTl RcF9mzGss9hlODvUtifkWekXT7IOiRMDVVcUBCnX48fIFqN9Vpzx3Pojy1K8S/8qD+x9 aotg== 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=IFcOcN+yQQdnFfWLLI5i75tNUsUkd2NUbs8M2BBZgxBYZw6ATVAKbJMOuVdi5yvlDa 8EJ5NumqMFMLkQ0I5/UqiLUeqnn9S5u4M/1oZlsB9k/WoBdp0Ph8nr3MF0poOsUmNChg 0pHHHboMRUzJb1zGRwQdZVmbb5+2qCMjiLAqok/mw4f7qlSP02raEGqT/48ejijBsrNs j7phD5jb9gDnoqBtXsLFjGxvB1pxj031yEduzWikywjh+Aq4UGAtH/aqRYz6n4Q2d4yG fEng68fCevlyQ3qwb8+vCQPudgRtszH3b1p6Jm5HpS5DJuxpjCdRFV1hXxlvFm3cDCni EDlw== X-Gm-Message-State: ACrzQf36pDxT6rbttbohUKKUHKHYSp8QGLkuhnPkegQd3fMWmBeBujhS 8DajmeIpIdyH+0jg/Hbxh+DBM7s0gHZeEP4G X-Received: by 2002:a17:90a:1a07:b0:214:247a:1932 with SMTP id 7-20020a17090a1a0700b00214247a1932mr472362pjk.187.1667723494199; Sun, 06 Nov 2022 01:31:34 -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 n8-20020a170903110800b00186b69157ecsm2757236plh.202.2022.11.06.01.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Nov 2022 01:31:33 -0700 (PDT) From: Jacob Bai To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/3] staging: rtl8192e: replace macro defines with ARRAY_SIZE Date: Sun, 6 Nov 2022 19:31:18 +1100 Message-Id: <13fddf4affd15a58c191be717ddee75772849f4e.1667723306.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?1748735426263785687?= X-GMAIL-MSGID: =?utf-8?q?1748735426263785687?= 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