From patchwork Tue Jun 20 00:32:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 9798293 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 4DF0560328 for ; Tue, 20 Jun 2017 00:32:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 432F026E51 for ; Tue, 20 Jun 2017 00:32:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38075274D0; Tue, 20 Jun 2017 00:32:35 +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 DCBF026E51 for ; Tue, 20 Jun 2017 00:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690AbdFTAcc (ORCPT ); Mon, 19 Jun 2017 20:32:32 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:33002 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbdFTAcb (ORCPT ); Mon, 19 Jun 2017 20:32:31 -0400 Received: by mail-oi0-f68.google.com with SMTP id j63so971319oiy.0 for ; Mon, 19 Jun 2017 17:32:31 -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=N1L0oeO2QHfOxeE7jAurFyeaD/bB9kUiogm2FRHSMLQc8fzDL6/J0m3BRjiRpQKJXD FTknh7Bmu0rraVFKsLVbciWL/0bgba52GS99jWlmOBxpnECX44ahzSIA53hPjmvT4Lsn Q0INZraxDzSYSgmnmtPEDc9Jo0t9dbOnYXxxCq8zwPvtZ/9FFEswyIVrROfctMBZ8Wzv 6XQAB4sNmaCBwJOlaYwn5XVBBMq4lLyzblzSql4Ih5f8bX5ZTBHEuJh9qFRbbT5L8ATy lbdxFJGC1i7lTjuQ8bxM03rYaTWBc/VJmaerFQbaykNjTY82OVk6VOcNBNw4HT+RZlCO qVnQ== 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=bmY8/+vuKUD092p4zDN0O9y09ptfuzHXzxwcTdaxJ8YdSnEHC30I77zA/qNP6zWVZb z7t8GjVhpgmnjSRgXXw/ApZJfLwcc/ueQikfdEMhVGf2QChEcpse8N14LU9C5gBwT+gt 8MV+63R8GVfU66eNoSKer6hQ5pjgdtEGgCRJKIhuprlN5bdDyIpWmToHOoNs23jaVk6b pPCpx/07byAImSX7KJDrtlOFyhVIT7ilRf8H1nYIrCswDXGcWyfi9xBWj4IxaB4nDOTl YunJrPJmqOnRYNvUiXFekg7x4BJ1E1+pQiFV//3w625+HvQmXfaA1j9t9bvPw4Pcm90I fUQg== X-Gm-Message-State: AKS2vOxzGJhDKjbf0418oyBfaJw0ni3YqPlXLjXfgBaWcbUkSc33Fmld 71kYrv40loby/s23 X-Received: by 10.202.49.13 with SMTP id x13mr12365234oix.148.1497918751084; Mon, 19 Jun 2017 17:32:31 -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 198sm5841023oii.16.2017.06.19.17.32.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jun 2017 17:32:30 -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 06/10] rtlwifi: Add ap_num field for btcoexist Date: Mon, 19 Jun 2017 19:32:14 -0500 Message-Id: <20170620003218.17010-7-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20170620003218.17010-1-Larry.Finger@lwfinger.net> References: <20170620003218.17010-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 {