From patchwork Thu Dec 21 14:30:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bpothuno@qti.qualcomm.com X-Patchwork-Id: 10127717 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 5857460390 for ; Thu, 21 Dec 2017 14:31:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48E2B29C0A for ; Thu, 21 Dec 2017 14:31:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DEEA29CF5; Thu, 21 Dec 2017 14:31:11 +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 5CF2129C0A for ; Thu, 21 Dec 2017 14:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751239AbdLUObH (ORCPT ); Thu, 21 Dec 2017 09:31:07 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:44513 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750757AbdLUObG (ORCPT ); Thu, 21 Dec 2017 09:31:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1513866667; x=1545402667; h=from:to:cc:subject:date:message-id:mime-version; bh=+1boxtfIbMegZBCj+WU46U92ijQuZ7yc0XX+9DLzymc=; b=BWWPnVPbdkkUIL+0rQBc/CXGWJ85UzyxnOi7tFPMo5uXVI7kta+kU4Pv 3NSYe02AdXZDYeRD2jsmKMhnRthOB8kdadN+xUCASBsMyTy4MgLhUQGr0 OCfLZN+7TxNKGB004Bj3aAWaDCm3NAvqeEgKUSdexbJiD2plITF3Vu2Xf M=; Received: from ironmsg04-l-new.qualcomm.com (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by alexa-out.qualcomm.com with ESMTP; 21 Dec 2017 06:31:06 -0800 X-IronPort-AV: E=McAfee;i="5900,7806,8751"; a="1484198772" X-MGA-submission: =?us-ascii?q?MDEnKXcZ8h6APmNAD+kP7G/ZBOTa0+35fF2mkc?= =?us-ascii?q?woV3pDVxU9a/sRaaeYeYCO2WRIpfR1KDZD5+RMcJb9fP829DDhIH+qdV?= =?us-ascii?q?UZEi/olnxptQJz8yuRsoLJji/qlIaZedxSTZzT0fg5fCRtcd0HC4PUvG?= =?us-ascii?q?LA?= Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 21 Dec 2017 06:31:05 -0800 Received: from aptaiexm02b.ap.qualcomm.com (10.249.150.12) by NASANEXM01B.na.qualcomm.com (10.85.0.82) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 21 Dec 2017 06:31:05 -0800 Received: from localhost (10.80.80.8) by aptaiexm02b.ap.qualcomm.com (10.249.150.12) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 21 Dec 2017 22:31:01 +0800 From: To: CC: , Balaji Pothunoori Subject: [PATCH] ath10k: advertising tdls wider bandwidth support for 5GHz Date: Thu, 21 Dec 2017 20:00:42 +0530 Message-ID: <1513866642-709-1-git-send-email-bpothuno@qti.qualcomm.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01E.na.qualcomm.com (10.85.0.31) To aptaiexm02b.ap.qualcomm.com (10.249.150.12) 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: Balaji Pothunoori This patch advertise tdls wider bandwidth support for 5GHz based on firmware wmi capabilties. This patch is required for chipset QCA9888. Firmware Versoin : 10.4-3.5.1-00018. Signed-off-by: Balaji Pothunoori --- drivers/net/wireless/ath/ath10k/mac.c | 3 ++- drivers/net/wireless/ath/ath10k/wmi.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 0298cce..9df455f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -8271,7 +8271,8 @@ int ath10k_mac_register(struct ath10k *ar) if (test_bit(WMI_SERVICE_TDLS, ar->wmi.svc_map) || test_bit(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, ar->wmi.svc_map)) { ar->hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; - ieee80211_hw_set(ar->hw, TDLS_WIDER_BW); + if (test_bit(WMI_SERVICE_TDLS_WIDER_BANDWIDTH, ar->wmi.svc_map)) + ieee80211_hw_set(ar->hw, TDLS_WIDER_BW); } ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index f6d60dc..0fe87ab 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -196,6 +196,7 @@ enum wmi_service { WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE, WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, WMI_SERVICE_MGMT_TX_WMI, + WMI_SERVICE_TDLS_WIDER_BANDWIDTH, /* keep last */ WMI_SERVICE_MAX, @@ -337,6 +338,7 @@ enum wmi_10_4_service { WMI_10_4_SERVICE_TDLS_UAPSD_SLEEP_STA, WMI_10_4_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE, WMI_10_4_SERVICE_TDLS_EXPLICIT_MODE_ONLY, + WMI_10_4_SERVICE_TDLS_WIDER_BANDWIDTH, }; static inline char *wmi_service_name(int service_id) @@ -445,6 +447,7 @@ static inline char *wmi_service_name(int service_id) SVCSTR(WMI_SERVICE_SMART_LOGGING_SUPPORT); SVCSTR(WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE); SVCSTR(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY); + SVCSTR(WMI_SERVICE_TDLS_WIDER_BANDWIDTH); default: return NULL; } @@ -741,6 +744,8 @@ static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out, WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE, len); SVCMAP(WMI_10_4_SERVICE_TDLS_EXPLICIT_MODE_ONLY, WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, len); + SVCMAP(WMI_10_4_SERVICE_TDLS_WIDER_BANDWIDTH, + WMI_SERVICE_TDLS_WIDER_BANDWIDTH, len); } #undef SVCMAP