From patchwork Thu Feb 11 16:53:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 8282771 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 39DBF9F38B for ; Thu, 11 Feb 2016 16:53:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5881C202E9 for ; Thu, 11 Feb 2016 16:53:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 53079202EB for ; Thu, 11 Feb 2016 16:53:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbcBKQxg (ORCPT ); Thu, 11 Feb 2016 11:53:36 -0500 Received: from mail-ob0-f194.google.com ([209.85.214.194]:34781 "EHLO mail-ob0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbcBKQxa (ORCPT ); Thu, 11 Feb 2016 11:53:30 -0500 Received: by mail-ob0-f194.google.com with SMTP id x5so6137825obg.1 for ; Thu, 11 Feb 2016 08:53:29 -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=QcKlAZihV1IxxN9htDnM3sGpyBSBIvKL+kuRS6g3iSs=; b=MRbhvgiixqocTkoeCxQQEHqtnCL0Ehzpym4rCA48Grhc8JiQi8ka9OxFIbuXukpYq2 5WXYHaMwNClPCOuy4gwmZvS62yRTMtvDUNQMl9vXKf5Zh8eiKjge26is7vGY9YSxGu4F f6MeOSuuettknzBKQH7Me+J/boEX9sxakeWBwYgylW8yN5+7+q5M1/6DLXwM27J0+mmi 6p4iTPkip2Ow7pbpy8K1p3chBssekDuV1HwRkh5lkNx/Jo1fwo/mobjV8vJSbk2+ubC8 YFTN40oFnU77oySaHzSGsEMcjTicu6N8sM7wLImID744D3UEtQtQvNCngTCXGM3sfGKB HA+A== 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=QcKlAZihV1IxxN9htDnM3sGpyBSBIvKL+kuRS6g3iSs=; b=El8m36StMc/lUb8ZctrnQAqb1I7O9eDqjKUtHpYAyINVrMVpiVtowo209DjY9Xq/Y8 BLYBYnd7/dZHSHJl9UZR6CP/ydSY0iwrmzfUzyUHOmqpOA9+Ox0Qi9f/XWjThG48OKFL eMcNAP6ciNStOxBAgy7LF2NROvC1PUhNpO8VnOeif3wgg/m6DPFrmHPCDzIFeuv7bhWs ZC+7Of2LMSKHzHlBmBFrR+4tb1bzbjgxWOXQytXKDqTQrIRhmT2U85e9wHcrPhHX0LhJ JTfuKvoogjeQWkZkNsaXVXOD4b7VpXsA6F9tk/RXDTsnizr6hJOaHiR7TNMZ38k3Y+xL qOVg== X-Gm-Message-State: AG10YORgvIU+tsMOvDUyp+bNPSuE8MvXiDx8qmkQnu5Uyr4ts/QVfRME9TCIoFRfOJEJAQ== X-Received: by 10.182.33.38 with SMTP id o6mr48468994obi.40.1455209609567; Thu, 11 Feb 2016 08:53:29 -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.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Feb 2016 08:53:28 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, Larry Finger Subject: [PATCH 2/4] rtlwifi: rtl8192de: Convert driver to use common 5G channels Date: Thu, 11 Feb 2016 10:53:10 -0600 Message-Id: <1455209592-12882-3-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 This driver defines its owh copy of the 5G channels. Change it to use the common definitions. Signed-off-by: Larry Finger --- Kalle, This material is for kernel 4.6. Larry .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 23 ++++------------------ 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c index bb06fe8..7810fe8 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c @@ -924,19 +924,11 @@ static void _rtl92d_ccxpower_index_check(struct ieee80211_hw *hw, static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl) { - u8 channel_5g[59] = { - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, - 60, 62, 64, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, - 130, 132, 134, 136, 138, 140, 149, 151, - 153, 155, 157, 159, 161, 163, 165 - }; u8 place = chnl; if (chnl > 14) { - for (place = 14; place < sizeof(channel_5g); place++) { - if (channel_5g[place] == chnl) { + for (place = 14; place < sizeof(channel5g); place++) { + if (channel5g[place] == chnl) { place++; break; } @@ -2471,16 +2463,9 @@ static bool _rtl92d_is_legal_5g_channel(struct ieee80211_hw *hw, u8 channel) { int i; - u8 channel_5g[45] = { - 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, - 60, 62, 64, 100, 102, 104, 106, 108, 110, 112, - 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, - 134, 136, 138, 140, 149, 151, 153, 155, 157, 159, - 161, 163, 165 - }; - for (i = 0; i < sizeof(channel_5g); i++) - if (channel == channel_5g[i]) + for (i = 0; i < sizeof(channel5g); i++) + if (channel == channel5g[i]) return true; return false; }