From patchwork Mon Sep 4 17:51:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9937493 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 107FB6035F for ; Mon, 4 Sep 2017 17:51:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 009E828796 for ; Mon, 4 Sep 2017 17:51:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E693F287EF; Mon, 4 Sep 2017 17:51:56 +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 14A0D28796 for ; Mon, 4 Sep 2017 17:51:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754017AbdIDRvz (ORCPT ); Mon, 4 Sep 2017 13:51:55 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:38379 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753987AbdIDRvw (ORCPT ); Mon, 4 Sep 2017 13:51:52 -0400 Received: by mail-oi0-f66.google.com with SMTP id t75so810031oie.5; Mon, 04 Sep 2017 10:51:52 -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=9t/IpF9T81c2wM/rvR4CUTEYDeP/OqBgqka8+Yp1rHE=; b=ixmQZb1IaLhzPXHlqsZCKDprbmFkr942lEb55PRsTO521+np3A7prJSQ5H5B+jy0jm 95kh1tbdBlAseM8b6tKTWmKxBFtHyj+Ooc4fCH3vkSw6uy6sIfDMgoX89nnb54kHjqjK HsegBHWb9L0QvvnHe4fKO8fO0DTcDczw7b47h2i7SGGmiRH1esUs4vZKGYgaCUf1NsB6 FKwFFrN+7cuBuExpK7AkS7LLcuVSXh6Zmz7cQT1ckfqT+Hf6SHX3GJDlFy+N6wv2H7gU uh/OecYLr8wmj+XhVeyBC9KYwfK6Z2q2i7C+K6KHNwmShzJqs0UEIC3qQIN29bGtFm/P L2LA== 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=9t/IpF9T81c2wM/rvR4CUTEYDeP/OqBgqka8+Yp1rHE=; b=Z3aST+7F5BXe2A6u5d+wcyj6lHBwQ0z2tPEjL/uiVSUa+NpKBnAYseMZe29c33vgWJ Ig94vE3hb3eCmxcLNdJBA/RuN5q4Kj4Qfuu7NgC9zowVaeJR4vxhwlgmFmKTocz0s/Ly u/ijwnjl8oEktZDpKdaGPQgzPro6G7HlEVuBdxeXQdowLoFLZj8TI6cu1iuaBgC+STw+ Q0TAvVo82JMvSPEKqlDvWVUM9gru8Zdr1I59kIKhcHSCeVENcNpSTBVGWc3qoBOVpR/s b/iV3B5ri9ZBanOzY2X4C3uVS0d0915twP2+8sPOBmKgg231vhzIJAW/lneJzOePmc3x c56g== X-Gm-Message-State: AHPjjUi93k2RyxCX6PGXx4UPlVXdg5HjM8A4s5DPl62PmqDWGiyXEuOE Ze/BpXSQXCSbPQ== X-Google-Smtp-Source: ADKCNb5N/rYi1NlLEpmn4ffsslGbIHJEGqFrpcVOgmwBsuKlOPcBSwfKVFPOG0x8JE84N3ZDI8mlqg== X-Received: by 10.202.213.199 with SMTP id m190mr1269146oig.278.1504547512179; Mon, 04 Sep 2017 10:51:52 -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 e184sm10514531oih.35.2017.09.04.10.51.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 10:51:51 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Larry Finger , Ping-Ke Shih , Yan-Hsuan Chuang , Birming Chiu , Shaofu , Steven Ting , Stable Subject: [PATCH 1/2] rtlwifi: btcoexist: Fix breakage of ant_sel for rtl8723be Date: Mon, 4 Sep 2017 12:51:33 -0500 Message-Id: <20170904175134.8331-2-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170904175134.8331-1-Larry.Finger@lwfinger.net> References: <20170904175134.8331-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 In commit bcd37f4a0831 ("rtlwifi: btcoex: 23b 2ant: let bt transmit when hw initialisation done"), there is an additional error when the module parameter ant_sel is used to select the auxilary antenna. The error is that the antenna selection is not checked when writing the antenna selection register. Fixes: bcd37f4a0831 ("rtlwifi: btcoex: 23b 2ant: let bt transmit when hw initialisation done") Signed-off-by: Larry Finger Cc: Ping-Ke Shih Cc: Yan-Hsuan Chuang Cc: Birming Chiu Cc: Shaofu Cc: Steven Ting Cc: Stable # 4.12+ --- Kalle, This material is intended for kernel 4.14. --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c index 31965f0ef69d..e8f07573aed9 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c @@ -1183,7 +1183,10 @@ static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist, } /* fixed internal switch S1->WiFi, S0->BT */ - btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); + if (board_info->btdm_ant_pos == BTC_ANTENNA_AT_MAIN_PORT) + btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); + else + btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); switch (antpos_type) { case BTC_ANT_WIFI_AT_MAIN: