From patchwork Fri Jul 21 04:24:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9856045 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 512C0601C0 for ; Fri, 21 Jul 2017 04:25:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3741628706 for ; Fri, 21 Jul 2017 04:25:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C2C728744; Fri, 21 Jul 2017 04:25:14 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham 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 B020D28706 for ; Fri, 21 Jul 2017 04:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750972AbdGUEZH (ORCPT ); Fri, 21 Jul 2017 00:25:07 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35483 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbdGUEYz (ORCPT ); Fri, 21 Jul 2017 00:24:55 -0400 Received: by mail-oi0-f67.google.com with SMTP id h143so3947605oic.2 for ; Thu, 20 Jul 2017 21:24:55 -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=bGhsu/OBRg+zc7Y3Yb1WKjPIxfyfqLtRw9WJpzAchzg=; b=lefS1DnV1XaHZ37DSeFd/6uZf1HnYL4Hyy058FU2k9bb0ti1/fkPkNkpKcWAJgITVE xNEc2CcjczFTCaPKdcDI9M0GDKt2S9cR9kiqrUNioZpAd+8lkBxDcUEq5C5tDrNdkFvV 1O6gxrmQdB83f9hi1gpAOD/mDOPaYm8hgibV5zMyXRgApvdzXn/m2sUiTAGAKATnqSMi uNwFVTkuYU5TnvNhZhLqWaQrCFnRROE6NHZfhJXTMJPbsWbTX1XEFmefX3dXF6Hn/5S8 O1CDOgJAp7MIQIHVOsR1VeL/tmY3q7FQH7dtMRPBuvVoR87rQOwJkUDoIQBwrjMx5ee7 9ptA== 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=bGhsu/OBRg+zc7Y3Yb1WKjPIxfyfqLtRw9WJpzAchzg=; b=Bkxjk6nfdRDfsBr0ZV0bFTCg2QMY1aS3CdaO9+kpYv8cGP01Iu63w+8Jh7bWGxqD3o KXbV+OULRFD/NqlZW3+qW8o5PVzlQrT1Ery/gLdZKEruex0PD532Xw8umDGqL0I22zdi iYH8y+RJQPPgQqvKzWm+57NHJYL8M4+0N5TEeeeekINff4O+N0ahkhVNBlpd8VO+97pr BsMNMZpOaW7gfO3g6Aym3GAX9+5az39jj8hhce1fjRkSt1b3AS4pdQ1jT5VG7ARArN4Z 821ZDLBY+FXxLilRgyzlK1VmNa3/UbV94Oqh/McQVvsRUWUDuizvLd//svAFAESTzAG1 mQaQ== X-Gm-Message-State: AIVw112zpzfHpo1GRCE3fN5nKt+0cNg/zXIg21c7yAnSt9N6KnChBJeo KzmjJEiEUMyQ3m2I X-Received: by 10.202.51.137 with SMTP id z131mr959988oiz.129.1500611095359; Thu, 20 Jul 2017 21:24:55 -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 s69sm1832947ois.15.2017.07.20.21.24.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Jul 2017 21:24:54 -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 07/10] rtlwifi: btcoex: btcoexist needs rfe_type to make decision Date: Thu, 20 Jul 2017 23:24:37 -0500 Message-Id: <20170721042440.15839-8-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170721042440.15839-1-Larry.Finger@lwfinger.net> References: <20170721042440.15839-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 btcoex uses rfe_type to configure antenna properly. 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/btcoexist/halbtcoutsrc.c | 10 ++++++++++ drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c index e26bbdf3a733..6847b1abb4ab 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c @@ -200,6 +200,14 @@ u8 rtl_get_hwpg_package_type(struct rtl_priv *rtlpriv) return rtlhal->package_type; } +static +u8 rtl_get_hwpg_rfe_type(struct rtl_priv *rtlpriv) +{ + struct rtl_hal *rtlhal = rtl_hal(rtlpriv); + + return rtlhal->rfe_type; +} + /* ************************************ * Hal helper function * ************************************ @@ -1215,6 +1223,8 @@ bool exhalbtc_bind_bt_coex_withadapter(void *adapter) RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_LOUD, "[BTCoex], Package Type = Non-TFBGA\n"); + btcoexist->board_info.rfe_type = rtl_get_hwpg_rfe_type(rtlpriv); + return true; } diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h index 8704d632bac8..91ba49586dbe 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h @@ -153,6 +153,8 @@ struct btc_board_info { u8 btdm_ant_pos; u8 single_ant_path; /* current used for 8723b only, 1=>s0, 0=>s1 */ bool tfbga_package; + + u8 rfe_type; }; enum btc_dbg_opcode {