From patchwork Sun Jun 18 16:12:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9794913 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 BBEC6603F1 for ; Sun, 18 Jun 2017 16:13:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB60927FA9 for ; Sun, 18 Jun 2017 16:13:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0657283AF; Sun, 18 Jun 2017 16:13:04 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 3A3E027FAD for ; Sun, 18 Jun 2017 16:13:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbdFRQNA (ORCPT ); Sun, 18 Jun 2017 12:13:00 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:34501 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753094AbdFRQM5 (ORCPT ); Sun, 18 Jun 2017 12:12:57 -0400 Received: by mail-oi0-f68.google.com with SMTP id w127so7233873oiw.1 for ; Sun, 18 Jun 2017 09:12:57 -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=78aOrD0+BJfQQMTLpXdlj+NzVmmxN8aTECadTsK5A1Y=; b=mwhFnDG4skpfSUUPGpZOY6rtzE8TDjq4OBCK+nRmC6WUUbjIEvmUISeZ9MiC+0qw9L jTZB++85PaJOwuNcWsOloHkGMjJV1ajFAker2WGAL8l9iXDbkxWwiVmTe+4dDWBT6Tjy +U61DoJYJaxAVoUu7IzLz2Q2dJQpry5xQNN030OTgnQUd0Ea9bTbGhJsgNu1mzLNbjq2 dN+7N/UgbmgTBmSSoXSs81VfUL3ehnESovfbt8DM02pEclsAkbleph6LQRPc82Bzc0l7 SJFyw0h1XhhcHcvPFHXpkAT78JQIQlfmqordYybCYwzElZyvCfP1dZP3NSq56XFH76Na Ok6w== 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=78aOrD0+BJfQQMTLpXdlj+NzVmmxN8aTECadTsK5A1Y=; b=qmo2RdZeTEHYyqlfJkC23Qcq3/Dhe6+RcxjF43GJHgzs0olq/vJsgASgU8+Tta1D+6 V7quoyqlceMqfxh2TSi/VwyzxWdt1s5oY3FeRshmDGdK4OV4nRM9C10cxhCmV7wr2tJ8 fXHTY6HQwrrhqnkLNKiU24ty8ItqQqO37n2uUZI27sKILz3vDkKk/62lRAjqkf3UX4sM zc4CkMplGBXxguV94zNmQzmnDPdge2cF1/UgZthxqM1oiH41pe4lArtPam/InsAs+nBo 2aHb9luPPOWAp+BwhEKK86hs7dCK0UZJgQhilzcpMwRBBFLLZx0BmF3KLIfkSnnlggfv 3dpg== X-Gm-Message-State: AKS2vOzEZOIfog0ATEDDuPI37cdJ/QY8hFVpcxndj3oDdg/7NSWE+Mi/ 1wDa4I4vK7aQ4hD2 X-Received: by 10.202.244.66 with SMTP id s63mr6131805oih.25.1497802376922; Sun, 18 Jun 2017 09:12:56 -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 s41sm4473985ots.54.2017.06.18.09.12.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Jun 2017 09:12:56 -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/11] rtlwifi: btcoex: rtl8723be: fix ant_sel not work Date: Sun, 18 Jun 2017 11:12:41 -0500 Message-Id: <20170618161249.6146-4-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170618161249.6146-1-Larry.Finger@lwfinger.net> References: <20170618161249.6146-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 To make ant_sel work, we should call power_on_setting to set antenna correctly. 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/rtl8723be/hw.c | 3 +++ drivers/net/wireless/realtek/rtlwifi/wifi.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c index a79f936bb394..0ce2900722f4 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c @@ -846,6 +846,9 @@ static bool _rtl8723be_init_mac(struct ieee80211_hw *hw) return false; } + if (rtlpriv->cfg->ops->get_btc_status()) + rtlpriv->btcoexist.btc_ops->btc_power_on_setting(rtlpriv); + bytetmp = rtl_read_byte(rtlpriv, REG_MULTI_FUNC_CTRL); rtl_write_byte(rtlpriv, REG_MULTI_FUNC_CTRL, bytetmp | BIT(3)); diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index c0d2601bc55f..31fcf43e24c1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h @@ -2534,6 +2534,7 @@ struct bt_coexist_info { struct rtl_btc_ops { void (*btc_init_variables) (struct rtl_priv *rtlpriv); void (*btc_init_hal_vars) (struct rtl_priv *rtlpriv); + void (*btc_power_on_setting)(struct rtl_priv *rtlpriv); void (*btc_init_hw_config) (struct rtl_priv *rtlpriv); void (*btc_ips_notify) (struct rtl_priv *rtlpriv, u8 type); void (*btc_lps_notify)(struct rtl_priv *rtlpriv, u8 type);