Received: by 10.223.176.5 with SMTP id f5csp1491856wra; Wed, 7 Feb 2018 21:29:22 -0800 (PST) X-Google-Smtp-Source: AH8x224c6haNvhqOr5tDH/SZm5YrH+JI5s6Nwa6Q2soFv2e6G5/rdsDF6k387WQQm3XK1d4w8EYe X-Received: by 10.101.64.74 with SMTP id h10mr6705346pgp.200.1518067762561; Wed, 07 Feb 2018 21:29:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518067762; cv=none; d=google.com; s=arc-20160816; b=V+XUkHuGeSI1c7qqAUUmyLbwOzqmtSYX/wYhUF6yi+w1bqXuSqS7nGldOYllxBtJQs o0vxKYmvbaf/4XS0YvgiMi2c4IKaQM4BVF5DdykN68W7dJAJlj1vGSRKOSEc0pYcub8a oyUGsPTNnuHDmnC7eSlRk084mn8byApqproXqo5ZJ2+uQK8nUHBJkVGGkk8TTBvvwaXU wSRossD2lMxkq/bR/qMzSr3MHQ/HyHNovOLrRf/nCbqP3ogSfisLh8Z4do8CwBzZkhDU bnuJuN2r1FNNq+3iS6P8W7oNI43DmNugAs8bYLiJmKq6csCqH3QPDQJrZ9sULeAx42Ff yg3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=okVikoLz807Hs9OAlFROqsKDofvgTiLoByz8wP1Cg6w=; b=cUwpsuyg7lZCPDcnetEx8uAkmx3sYEu4lV6M80C72I5B8k+pbL931xT1+Tq3OCySSW S07/MpObgOJotmv/QEMw64Y8JotTweRBMcEArRvb+3rox9gW4v8OzcKMGFiEb0AHTbUe VaVIkp+X6UZj94ONUzccSGv4H4SkJC4QvCz7bGlK6JW8oep9R2BoiObOEri/IhSf4qjk 38KACV2WHEp3/AsVHni6U28MJ6CAderebGR8fWksmFVz0JMcy8tAi+MOZlhQPxop4YiA vhJWTFtbu+kGoMtoxl6C0soFqzTYi+rfih56+0YzTUIBZrs50BVOWEmRW9JabTISHV59 5qcw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26-v6si930238pli.252.2018.02.07.21.28.52; Wed, 07 Feb 2018 21:29:22 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750986AbeBHF2L (ORCPT + 99 others); Thu, 8 Feb 2018 00:28:11 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:60251 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbeBHF2K (ORCPT ); Thu, 8 Feb 2018 00:28:10 -0500 Received: from 2.general.khfeng.us.vpn ([10.172.68.175] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ejekg-0005LX-3w; Thu, 08 Feb 2018 05:28:06 +0000 From: Kai-Heng Feng To: kvalo@codeaurora.org Cc: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH] ath9k: turn on btcoex_enable as default Date: Thu, 8 Feb 2018 13:28:01 +0800 Message-Id: <20180208052801.15670-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without btcoex_enable, WiFi activies make both WiFi and Bluetooth unstable if there's a bluetooth connection. Enable this option when bt_ant_diversity is disabled. BugLink: https://bugs.launchpad.net/bugs/1746164 Signed-off-by: Kai-Heng Feng --- drivers/net/wireless/ath/ath9k/init.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index e479fae5aab9..f8f6b091a077 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -56,7 +56,7 @@ static int ath9k_led_active_high = -1; module_param_named(led_active_high, ath9k_led_active_high, int, 0444); MODULE_PARM_DESC(led_active_high, "Invert LED polarity"); -static int ath9k_btcoex_enable; +static int ath9k_btcoex_enable = 1; module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444); MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence"); @@ -693,7 +693,6 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, common->hw = sc->hw; common->priv = sc; common->debug_mask = ath9k_debug; - common->btcoex_enabled = ath9k_btcoex_enable == 1; common->disable_ani = false; /* @@ -715,14 +714,17 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, /* * Enable WLAN/BT RX Antenna diversity only when: * - * - BTCOEX is disabled. * - the user manually requests the feature. * - the HW cap is set using the platform data. */ - if (!common->btcoex_enabled && ath9k_bt_ant_diversity && + if (ath9k_bt_ant_diversity && (pCap->hw_caps & ATH9K_HW_CAP_BT_ANT_DIV)) common->bt_ant_diversity = 1; + /* Enable btcoex when ant_diversity is disabled */ + if (!common->bt_ant_diversity && ath9k_btcoex_enable) + common->btcoex_enabled = 1; + spin_lock_init(&common->cc_lock); spin_lock_init(&sc->intr_lock); spin_lock_init(&sc->sc_serial_rw); -- 2.15.1