From patchwork Thu Oct 5 06:08:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: akolli@qti.qualcomm.com X-Patchwork-Id: 9986449 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 D4FF4602B8 for ; Thu, 5 Oct 2017 06:06:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C74EE223A0 for ; Thu, 5 Oct 2017 06:06:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB88D28B96; Thu, 5 Oct 2017 06:06:00 +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 485F4223A0 for ; Thu, 5 Oct 2017 06:06:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751273AbdJEGF6 (ORCPT ); Thu, 5 Oct 2017 02:05:58 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:10864 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbdJEGF6 (ORCPT ); Thu, 5 Oct 2017 02:05:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1507183558; x=1538719558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=O+JLKiqKnw5JFvPrT2CbkIKjRG8WikY5FtGD/cRvFvU=; b=IvTV25rc2aDwYPGBodB3YgE2okJE11hye+YW0MR0VnZQQwigh6NTwiO9 8/6m/mirr+aB3qynLd6LEwDEF9NkDc6bhCePTyf3tWQ1xbl8GI5Wj6TJj ZkTzVKjJm7sLZz9hrUU8ABiNmlVpi4zFM1aI4+g5kjvCjNcT+mdZ2fhQJ w=; X-IronPort-AV: E=Sophos;i="5.42,480,1500966000"; d="scan'208";a="6062181" Received: from ironmsg04-l-new.qualcomm.com (HELO Ironmsg04-L.qualcomm.com) ([10.53.140.111]) by alexa-out.qualcomm.com with ESMTP; 04 Oct 2017 23:05:57 -0700 X-IronPort-AV: E=McAfee;i="5900,7806,8674"; a="1436794419" X-MGA-submission: =?us-ascii?q?MDGzuyKgKjUhmq91KFqQVo4AZbA9a6ZCI/X8VV?= =?us-ascii?q?f+5YtRCuxK71kUJuH3SNtOpRlzk++edU0wPcbLM0UVvjb/ziqQOHOA0h?= =?us-ascii?q?907FXAJwSYTOKePBOB4yUbnDxWIQT/09EpEK3Ppe1+ne6ECdAUSLAyIC?= =?us-ascii?q?bU?= Received: from nasanexm01e.na.qualcomm.com ([10.85.0.31]) by Ironmsg04-L.qualcomm.com with ESMTP/TLS/AES256-SHA; 04 Oct 2017 23:05:57 -0700 Received: from aphydexm01a.ap.qualcomm.com (10.252.127.10) by NASANEXM01E.na.qualcomm.com (10.85.0.31) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Wed, 4 Oct 2017 23:05:56 -0700 Received: from localhost (10.80.80.8) by aphydexm01a.ap.qualcomm.com (10.252.127.10) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Thu, 5 Oct 2017 11:35:50 +0530 From: To: CC: , , Anilkumar Kolli Subject: [PATCH 2/2] ath10k: block offchannel operations if TDLS session is active Date: Thu, 5 Oct 2017 11:38:29 +0530 Message-ID: <1507183709-585-2-git-send-email-akolli@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1507183709-585-1-git-send-email-akolli@qti.qualcomm.com> References: <1507183709-585-1-git-send-email-akolli@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To aphydexm01a.ap.qualcomm.com (10.252.127.10) 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: Anilkumar Kolli Do not allow off channel operations like scans/roc when there are active TDLS sessions. The Current firmware 10.4-3.5.1-00035 on QCA9888 does not supports any offchannel operations on active TDLS sessions, either driver needs to block the offchannel operation requests or should teardown the TDLS connection. Signed-off-by: Anilkumar Kolli --- drivers/net/wireless/ath/ath10k/mac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 0f14da73cf64..2f3851e688f4 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -5641,6 +5641,11 @@ static int ath10k_hw_scan(struct ieee80211_hw *hw, mutex_lock(&ar->conf_mutex); + if (ath10k_mac_tdls_vif_stations_count(hw, vif) > 0) { + ret = -EBUSY; + goto exit; + } + spin_lock_bh(&ar->data_lock); switch (ar->scan.state) { case ATH10K_SCAN_IDLE: @@ -6477,6 +6482,11 @@ static int ath10k_remain_on_channel(struct ieee80211_hw *hw, mutex_lock(&ar->conf_mutex); + if (ath10k_mac_tdls_vif_stations_count(hw, vif) > 0) { + ret = -EBUSY; + goto exit; + } + spin_lock_bh(&ar->data_lock); switch (ar->scan.state) { case ATH10K_SCAN_IDLE: