Received: by 10.213.65.68 with SMTP id h4csp2113706imn; Sun, 8 Apr 2018 20:03:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/fdJOk2eu0DQNwCFzzBtOpn0g7owGEmjr4ZmbeIT1p6VWIGR3t3VyqMuaCd98jgRbyyqvQ X-Received: by 10.99.96.66 with SMTP id u63mr23928871pgb.22.1523243026016; Sun, 08 Apr 2018 20:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243025; cv=none; d=google.com; s=arc-20160816; b=KEjzNxY1BzQJu+o9e1x7nkbxWl4bQh6ljXu+VzO7fx4BHeG1LPU+8FwhGVApFt/IvS sGoPDdrsKPScLThQcdWqxOllHZB0qKjBLaGnQ19n4uUBBiBTHq3lNd17fQsN0PFtUgJ9 IgiHjehf6ri3KbW97I9exKXnOxUoq8wn7KMY0tdX4/Ji+fo62cWYjMAZ0OTG4pH3YtRz BA2wjzcHbkkzYhV3n3/hUH/V/IU+LIEMkZ47RBbPgoDUN24KWCU+dzxzYlhbxRPNPzWs IcuUjXyVOoGlpCFu5/gTelMJveo0isqxFsXZGPmz2oJlTj9KqETFZ2b5KR4sEQn1WoEu A/GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ZiMVd79+KAtuFJr4xSpT3bECMHSHXp8KH1ZwBr9oENs=; b=ZPX6Srpgzu9Cb1xB4w+LMCrkPeGUeSN36MN67549ssaC5M7l24L4TrXcKPbvSTVLM6 AIyv+FvYcbtMpag7KgyQCpUL+6jUKC9sr481HXiI9wYjwPsiQCbeA3xOCtjJQqLtB3Vh oiNtYfPX6lbXHFJdiaEgEDjdTzbx1V03IAxzj5F49TsiKxB1Itfzee6kYvCNS6iGiXFQ WYLKtlyGYKCihhMjRg8VoKDiICcMxUNfzI9sKezASsNTYSiV0dnDgGkF6U+MbFrPaz3+ sm+22AEqAa/lr8DUguat9D9OuOW4x3kf9UwZMZ49cXI4EHQaRMRBnwOrHnI//Jr8rNUD J9xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=O/AZ8hol; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si8766262pgp.666.2018.04.08.20.03.08; Sun, 08 Apr 2018 20:03:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=O/AZ8hol; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932124AbeDIA3r (ORCPT + 99 others); Sun, 8 Apr 2018 20:29:47 -0400 Received: from mail-sn1nam02on0106.outbound.protection.outlook.com ([104.47.36.106]:7529 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756049AbeDIA3n (ORCPT ); Sun, 8 Apr 2018 20:29:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZiMVd79+KAtuFJr4xSpT3bECMHSHXp8KH1ZwBr9oENs=; b=O/AZ8hola3tTe56z//EkiSSYsun5SUgmU59DRpDtc3GMEr+XkJsWCwFjU5VIzSMsxYvsnzGHI/NTi1wU1ty6+Tpkgmk1XDypJUDAsKHfVlJDyleWBaVDryx1X+HNRyayuZXylF/7iK9xAf2gijEJ8kLmDu0II79hT4AOScLNWIQ= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:29:39 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:29:39 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Ping-Ke Shih , Larry Finger , Yan-Hsuan Chuang , Birming Chiu , Shaofu , Steven Ting , Kalle Valo , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 115/293] rtlwifi: btcoex: rtl8723be: fix ant_sel not work Thread-Topic: [PATCH AUTOSEL for 4.9 115/293] rtlwifi: btcoex: rtl8723be: fix ant_sel not work Thread-Index: AQHTz5kcEIxx9h9cR0iaawAuPJHafA== Date: Mon, 9 Apr 2018 00:24:23 +0000 Message-ID: <20180409002239.163177-115-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1032;7:tsyAWNciICxSm40JCi8vzjiYVOSaRe7Wlnzh2JGa6Pi/vQQf663jxGuz6WH2ljM1vYCUH4PmsDClrlj09uj3HYKKRG+f88D1t18dnG0dqSKiv5b2xF6ec4+C1YpEBqIsfs3yqnlgR8jS9Knr86C25IM/zkEpl4c1lXABx5TdAZtO9bgGDYlB4SMvkBVvYhxyE8Ux1KrfcdNFfQdZQA+uDB/7SbGWMIatfK+IuZUutuwMxJtiHrNWEUpR4WrGLKtM;20:560dyHXazun/N73ZWaXp3CffHLcbYHptnPSXnLbXjchCjkLrLOsX/PrGnZni3AgzLrmRi40zOrXuqUVI7xLquV4YD02VYNgYyEFfV+0XkcHTqFeuc6nlhXAROX3dKvILFjIZPM/PAy3yvLv+/o9Jqa0GSyfpXK5Jly31q8f8A1E= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 65d3d3b9-c794-4f72-076c-08d59db0fb34 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1032; x-ms-traffictypediagnostic: DM5PR2101MB1032: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231221)(944501327)(52105095)(10201501046)(93006095)(93001095)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB1032;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1032; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(396003)(39860400002)(376002)(366004)(189003)(199004)(5660300001)(76176011)(99286004)(10090500001)(2900100001)(105586002)(305945005)(7736002)(107886003)(2501003)(5250100002)(14454004)(53936002)(4326008)(8936002)(68736007)(25786009)(86612001)(3846002)(66066001)(1076002)(486006)(316002)(72206003)(22452003)(106356001)(186003)(97736004)(6436002)(6116002)(476003)(2616005)(478600001)(6486002)(10290500003)(2906002)(110136005)(54906003)(6512007)(81156014)(81166006)(8676002)(36756003)(11346002)(3660700001)(446003)(6666003)(86362001)(26005)(102836004)(575784001)(3280700002)(6506007)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1032;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: jW6qWlTnz7d6s60CvwM2FYdAVVYfNSj19clGOKspju9gaK0Qd9V+LTv+xutUFr+rMFo/Bvf4DY2Q7gZhcvtuXxyzNgYCHGwSdim6lN3ClWeGHQULuawn5kHT+0e85HuWzNkQu/dRuuw6hp6b1gaVa/3GMjwHHIpCKpJX7lZtxVWpkU9KTAyRaNcoZXcKrHV8SLKrPLsbtRQzIcydPVnkpUZi7GN5/lToLjiGH6gXzTZjbhiaZYRmAikHL/gCv/KDYh5Bfpizg4CRN167dGkfO2zIQy+7XngiQoeDQmPTLfUQz1F4qoSsR+OVbxDcnO16jtnKIRfuKQ/JuylDVsc8nMUYQ10F915zbQeTgNHlEVKqUSIDFr9ZPwc6JZmzyPRehtTpbsQAVti29T6OniXeGQAvcgnEhQiaKlaB/RVmjXo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65d3d3b9-c794-4f72-076c-08d59db0fb34 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:24:23.3156 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1032 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ping-Ke Shih [ Upstream commit f95d95a7cd5514549dcf6ba754f0ee834cce3e1f ] 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 Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- 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 618e509e75d6..402977745aa7 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c @@ -848,6 +848,9 @@ static bool _rtl8723be_init_mac(struct ieee80211_hw *hw= ) return false; } =20 + if (rtlpriv->cfg->ops->get_btc_status()) + rtlpriv->btcoexist.btc_ops->btc_power_on_setting(rtlpriv); + bytetmp =3D rtl_read_byte(rtlpriv, REG_MULTI_FUNC_CTRL); rtl_write_byte(rtlpriv, REG_MULTI_FUNC_CTRL, bytetmp | BIT(3)); =20 diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wire= less/realtek/rtlwifi/wifi.h index 340e7b324ef8..7c0fd17dbcca 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h @@ -2525,6 +2525,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); --=20 2.15.1