From patchwork Wed Jun 21 17:15:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9802337 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 79B2260329 for ; Wed, 21 Jun 2017 17:15:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F5DA285E8 for ; Wed, 21 Jun 2017 17:15:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 543E028610; Wed, 21 Jun 2017 17:15:53 +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=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_BLACK 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 EE69A285E8 for ; Wed, 21 Jun 2017 17:15:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752705AbdFURPw (ORCPT ); Wed, 21 Jun 2017 13:15:52 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:35195 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752265AbdFURPu (ORCPT ); Wed, 21 Jun 2017 13:15:50 -0400 Received: by mail-oi0-f65.google.com with SMTP id v74so16298476oie.2 for ; Wed, 21 Jun 2017 10:15:50 -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=N5hRmysnM1DsLbWv/NST4li+rp3u79pX90m9U/GBGac=; b=PRp9JLziJaE248/gn0ZMYsshAB95hnInNdhwooZGUH1Dd3j1oc/GML/Fm8wRqPebdm RVKr+pQ+Dbxwu98/RY+/Naro6nux74/YnXvrenRud0vBAs/3aCTXLtaN1UNWl/xfLiwP vrwUfRnTzICe8eLVPxTLNY+NgEv+lx1WeR1+1GMj60LzuIM4DQqWKdS7UrjAhn3vUODM wiJNQsVmnedDKY16+q2N/0a0WYgIrhpWrTagiePHVLGdFbj0v3XH99JQckGpeg1lne2J Vw/rSchCT0hu67cuKdvjrsc8P1yse1BlPszlp45LocZIPSKifUPiHfbZft0KHgXsuH4Z g5pw== 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=N5hRmysnM1DsLbWv/NST4li+rp3u79pX90m9U/GBGac=; b=WxmtDE83cmWl4KawI6iKMNYusDQw7ewDzvTlLb7DrEDkWcYIir17SqFaVAM5IiEWAO gavRNW8LsZ2rSOY2jxK5D8jyQ/VFWwPgIIO0/Q8UnwI7Jv7BsoZuug6sxFQu/3Br5O/M osisQpEulasedZLNWXknnUF4BlFVP/pJGrn23zfxxOrNM8PKyyzgKrVr42gTrrZoiB24 2hMa1bg5QNTcdxfGVAkZ7MPvTbu5DMoC6F4vQzdYRSlBvxrQo4I9UPWS/kBx/HKvJRdu Py3xbS30uAO2EocpFpVS15Yj31lgPK5Z79VCtsWeRS6fhtTwAlFBXp3gdawi5pzoLLjL ve4w== X-Gm-Message-State: AKS2vOwr5z7mn8e2TBfcYf7vDbgyn0Pq+SCVNzLQIjHYp0Wg1gyS/APm Kz7P2e4Xf2AA0w== X-Received: by 10.202.199.75 with SMTP id x72mr5225082oif.182.1498065349752; Wed, 21 Jun 2017 10:15:49 -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 i38sm6785237ota.3.2017.06.21.10.15.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Jun 2017 10:15:49 -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 v2 6/8] rtlwifi: Add ap_num field for btcoexist Date: Wed, 21 Jun 2017 12:15:36 -0500 Message-Id: <20170621171538.4462-7-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170621171538.4462-1-Larry.Finger@lwfinger.net> References: <20170621171538.4462-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 If there are many AP (dirty environment), we use another strategy set to resolve coex issue. 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 | 5 +---- drivers/net/wireless/realtek/rtlwifi/pci.c | 1 + drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c index ffa7a517b665..9dbb35f190d1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c @@ -503,10 +503,7 @@ static bool halbtc_get(void *void_btcoexist, u8 get_type, void *out_buf) ret = false; break; case BTC_GET_U1_AP_NUM: - /* driver do not know AP num, - * so the return value here is not right - */ - *u8_tmp = 1; + *u8_tmp = rtlpriv->btcoexist.btc_info.ap_num; break; case BTC_GET_U1_ANT_TYPE: *u8_tmp = (u8)BTC_ANT_TYPE_0; diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index 2e6b888bd417..00a354c85ece 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c @@ -1826,6 +1826,7 @@ static int rtl_pci_start(struct ieee80211_hw *hw) rtlpci->driver_is_goingto_unload = false; if (rtlpriv->cfg->ops->get_btc_status && rtlpriv->cfg->ops->get_btc_status()) { + rtlpriv->btcoexist.btc_info.ap_num = 36; rtlpriv->btcoexist.btc_ops->btc_init_variables(rtlpriv); rtlpriv->btcoexist.btc_ops->btc_init_hal_vars(rtlpriv); } diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index 49c0d2229274..2fb83a7061dd 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h @@ -2481,6 +2481,8 @@ struct rtl_btc_info { u8 btcoexist; u8 ant_num; u8 single_ant_path; + + u8 ap_num; }; struct bt_coexist_info {