From patchwork Thu Feb 11 16:53:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 8282761 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 39CEA9F6E4 for ; Thu, 11 Feb 2016 16:53:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 513A9202E9 for ; Thu, 11 Feb 2016 16:53:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 45E112035D for ; Thu, 11 Feb 2016 16:53:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759AbcBKQx3 (ORCPT ); Thu, 11 Feb 2016 11:53:29 -0500 Received: from mail-ob0-f196.google.com ([209.85.214.196]:33733 "EHLO mail-ob0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbcBKQx2 (ORCPT ); Thu, 11 Feb 2016 11:53:28 -0500 Received: by mail-ob0-f196.google.com with SMTP id o4so6163306obb.0 for ; Thu, 11 Feb 2016 08:53:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=b3jmF4E1mQJtM2CBT7YK70bQYgbxeYm7S4bN+HrIdAU=; b=BwrXOfX+tzVJPWj4MqOpUy2SYb7/lahmwcQ08X9ZqTDSYkeZC961y/lu4lMYssEJSg iMzXHS2/Z5I8XnP5J+zzeHNLCYBJOmfyU64a2VWX0XUeMPveOe3fkulNq2o0TNQCq4bL QaecnbOXCBHVx35NCPSVeKCvx/6mKfE0ORLJtFyiII6SNKmWBh8Wkaex1KClrdePNLQb pAj45vpaa5HFxjKVRXci3yYe8S5DgVCOY+Z60u1C4/fyKkYBuVxXt/1AcJUKaixtR5r+ h+gVLsPy1BbrLj0pt72YcnN8cDBvPBefhKTg5szY5GtDkeiPvomvhbLnMgYnPl2AIHpZ 2KwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=b3jmF4E1mQJtM2CBT7YK70bQYgbxeYm7S4bN+HrIdAU=; b=l6JnWfPk/gkLjIFb75kh4y0sdQfiySOkcJml/+410kAVvUGflnP58refzkcA3DX9l8 SR6GeVSXa5gv1gISuCzV3ey7G3NqLy/FFbGPXrU1xqPnR16MKutE+yKREasvvXM6D0Dq W7H6hRkqcEUpxrjjgCc2Cu1UHOMbwpT1vDyA0emychjqhquZTj+fXCTDY+/HABUxPYX+ htRolZopaku6zr8VkzEZppqsfb4oa6NV5rbGkEx+vOjOavyZ0aOSHoD8hXjJTdoSJXgY 0Fv2kCccYGAZn55Q3Dbk7sbrDiGQzsZQHWzv32n3LYGpBmsqRWacVSj0MuTX0weFpXMZ /uPg== X-Gm-Message-State: AG10YOSGi54hJJ6Zi/I0YWqDZKJeryyjoeVVq9mINUsfm8m0z1VDzeOhty5NWRs8l+LxZA== X-Received: by 10.182.105.197 with SMTP id go5mr48482260obb.12.1455209607625; Thu, 11 Feb 2016 08:53:27 -0800 (PST) Received: from linux.site (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id qp4sm5618523obc.9.2016.02.11.08.53.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Feb 2016 08:53:26 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, Larry Finger Subject: [PATCH 1/4] rtlwifi: Prepare for reworking 5G channels Date: Thu, 11 Feb 2016 10:53:09 -0600 Message-Id: <1455209592-12882-2-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455209592-12882-1-git-send-email-Larry.Finger@lwfinger.net> References: <1455209592-12882-1-git-send-email-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are 3 drivers in this family that have 5G radios. Each of them defines local copies of the available channels. This patch adds the two arrays to the core driver. Signed-off-by: Larry Finger --- Kalle, This material is for kernel 4.6. Larry drivers/net/wireless/realtek/rtlwifi/core.c | 16 ++++++++++++++++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 9 ++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index 4ae421e..02eba0e 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -35,6 +35,22 @@ #include #include +u8 channel5g[CHANNEL_MAX_NUMBER_5G] = { + 36, 38, 40, 42, 44, 46, 48, /* Band 1 */ + 52, 54, 56, 58, 60, 62, 64, /* Band 2 */ + 100, 102, 104, 106, 108, 110, 112, /* Band 3 */ + 116, 118, 120, 122, 124, 126, 128, /* Band 3 */ + 132, 134, 136, 138, 140, 142, 144, /* Band 3 */ + 149, 151, 153, 155, 157, 159, 161, /* Band 4 */ + 165, 167, 169, 171, 173, 175, 177 /* Band 4 */ +}; +EXPORT_SYMBOL(channel5g); + +u8 channel5g_80m[CHANNEL_MAX_NUMBER_5G_80M] = { + 42, 58, 106, 122, 138, 155, 171 +}; +EXPORT_SYMBOL(channel5g_80m); + void rtl_addr_delay(u32 addr) { if (addr == 0xfe) diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index 4544752..e603819 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h @@ -122,11 +122,6 @@ */ #define CHANNEL_MAX_NUMBER_5G_80M 7 #define CHANNEL_GROUP_MAX (3 + 9) /* ch1~3, 4~9, 10~14 = three groups */ -#define CHANNEL_MAX_NUMBER_5G 54 /* Please refer to - *"phy_GetChnlGroup8812A" and - * "Hal_ReadTxPowerInfo8812A" - */ -#define CHANNEL_MAX_NUMBER_5G_80M 7 #define MAX_PG_GROUP 13 #define CHANNEL_GROUP_MAX_2G 3 #define CHANNEL_GROUP_IDX_5GL 3 @@ -2904,6 +2899,10 @@ value to host byte ordering.*/ #define STBC_VHT_TEST_TX_ENABLE BIT(2) #define STBC_VHT_CAP_TX BIT(3) +extern u8 channel5g[CHANNEL_MAX_NUMBER_5G]; + +extern u8 channel5g_80m[CHANNEL_MAX_NUMBER_5G_80M]; + static inline u8 rtl_read_byte(struct rtl_priv *rtlpriv, u32 addr) { return rtlpriv->io.read8_sync(rtlpriv, addr);