From patchwork Sat Jun 24 01:53:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9807527 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0632F60329 for ; Sat, 24 Jun 2017 01:53:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E79652857B for ; Sat, 24 Jun 2017 01:53:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC5312879C; Sat, 24 Jun 2017 01:53:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3CA4287CA for ; Sat, 24 Jun 2017 01:53:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754804AbdFXBxX (ORCPT ); Fri, 23 Jun 2017 21:53:23 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:36768 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754336AbdFXBxR (ORCPT ); Fri, 23 Jun 2017 21:53:17 -0400 Received: by mail-ot0-f196.google.com with SMTP id r67so6466359ota.3 for ; Fri, 23 Jun 2017 18:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=cxMPgS3FJWgc7u5QZWLh+5Dh/dyzwoePrBjhkSv1Llc=; b=SqdWvXAOPZ6KchxlzQDSkcvtNeMitKbFNBB7C8fzmimzQUs9a5EC3SdntXa3qp83Ps tbRrX57PMVrLrnisgO+JnxOlQvMKhwmZhCVLXdyrZrMW/EJUon0H0GZSWIa9d8YsLNWe Bw4E7ycl9LNqVSPAjpDHOnKjpQUBuOJ31LaWQCCyoGVe9OLLSA07jtzgp9KJkrsMkPlT cXjPkztoL703ZV+bXEJSP4Ai7EVBCukJFQ+sP597XfP6CZGVbZ5rvzrsy7a+8WLZvL6H OdrnNH8hLh2EJB0DsW6c3/ycLEW0yhoEMi/ZylHxbQhuikAfCzTPYyxmyr/ndzLIJkjK uX/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=cxMPgS3FJWgc7u5QZWLh+5Dh/dyzwoePrBjhkSv1Llc=; b=EXugZV/qb7RrwzD7WcJIhqHlTzi471sLagoJzL+mFxuVuqDuwBBYsCthfcVw4V25NC ljyamTwF03Zo8OglythbBXk/AI4h0prEmvH8yKAFgHK5rfI2wa9joXD9BMzWv25cZvTh lhVFCl7LyvpdkqzgEX769IHxdbzf8eHXwGPQhEbydvgYj+orQCgaPdG264WEMweXgzZG sQF9tU3ye70lg2Q82NchhS0N0oKgTPYxDitGN4IYRA/fpksLVIVzOepn5fafy+a/betC HL+7f0/tj421P1i/Q0Y305ufl76+d/j/oLg5xWGrjzMheK/mVlcLUAdCp3hh8a1N0gby EhcQ== X-Gm-Message-State: AKS2vOyTJ9p5daNL/AtiOwAzbkNzz1iNc3BEz/rXGIUMESp5vXUCTRlF UW/S0Hz5P7/qCA== X-Received: by 10.157.89.146 with SMTP id u18mr5431823oth.135.1498269197193; Fri, 23 Jun 2017 18:53:17 -0700 (PDT) Received: from linux-4v1g.suse (cpe-24-31-249-175.kc.res.rr.com. [24.31.249.175]) by smtp.gmail.com with ESMTPSA id t190sm2833277oie.29.2017.06.23.18.53.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Jun 2017 18:53:16 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Ping-Ke Shih , Larry Finger , Yan-Hsuan Chuang , Birming Chiu , Shaofu , Steven Ting Subject: [PATCH 03/10] rtlwifi: Add board type for 8723be and 8192ee Date: Fri, 23 Jun 2017 20:53:02 -0500 Message-Id: <20170624015309.28099-4-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170624015309.28099-1-Larry.Finger@lwfinger.net> References: <20170624015309.28099-1-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ping-Ke Shih With correct board_type, the phy praser can choose correct parameters. Signed-off-by: Ping-Ke Shih Signed-off-by: Larry Finger Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 5 +++++ drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c index d84ac7adfd82..ef9394be7016 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c @@ -2133,7 +2133,12 @@ static void _rtl92ee_read_adapter_info(struct ieee80211_hw *hw) if ((*(u8 *)&hwinfo[EEPROM_RF_BOARD_OPTION_92E]) == 0xFF) rtlefuse->board_type = 0; + if (rtlpriv->btcoexist.btc_info.btcoexist == 1) + rtlefuse->board_type |= BIT(2); /* ODM_BOARD_BT */ + rtlhal->board_type = rtlefuse->board_type; + RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, + "board_type = 0x%x\n", rtlefuse->board_type); /*parse xtal*/ rtlefuse->crystalcap = hwinfo[EEPROM_XTAL_92E]; if (hwinfo[EEPROM_XTAL_92E] == 0xFF) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c index 2a7ad5ffe997..0b9366e7acbd 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c @@ -2114,6 +2114,13 @@ static void _rtl8723be_read_adapter_info(struct ieee80211_hw *hw, rtlefuse->autoload_failflag, hwinfo); + if (rtlpriv->btcoexist.btc_info.btcoexist == 1) + rtlefuse->board_type |= BIT(2); /* ODM_BOARD_BT */ + + rtlhal->board_type = rtlefuse->board_type; + RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, + "board_type = 0x%x\n", rtlefuse->board_type); + rtlhal->package_type = _rtl8723be_read_package_type(hw); /* set channel plan from efuse */