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: 9986453 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 651C8602B8 for ; Thu, 5 Oct 2017 06:06:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56FFD223A0 for ; Thu, 5 Oct 2017 06:06:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4BDE228B96; Thu, 5 Oct 2017 06:06:47 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D647D223A0 for ; Thu, 5 Oct 2017 06:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zRinE32oMQlUTXL1dBOYdLSW0s2EjnKFqI8to94t4Lg=; b=XkXW77eZX0pa19 feOka2thz5xWigx4cJa2OIBCZI/LK6SkUWsHWTq5Sk6S+RuO/Tu3SO96nKk9vtpYRy3JRPakUg4JB oqVQaRtSAHQDfOXB5UktnHDyl3lFlm7V7f9NouFLNssq4U76Ry6HKbtBtdj4jJ3KQSq95X2HUySDP qhK8YZyS+OLOEmz+eFVwW9SJwCA2i1HImPhUpJB4nD9DWII0dPJE827ljkGQFYlDhrKJtx6ZPZIw+ 8U1RSY+/l9JyzVC9elR/DJmQmp2C9SJQ2c/JI++C65GtAkUBfiY3At87VV2YclKGooOXp896IxSZl 170IFwiuViGAnK/Qly8A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dzzIw-0006kK-CP; Thu, 05 Oct 2017 06:06:42 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dzzIZ-0006b7-NJ for ath10k@lists.infradead.org; Thu, 05 Oct 2017 06:06:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1507183580; x=1538719580; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=O+JLKiqKnw5JFvPrT2CbkIKjRG8WikY5FtGD/cRvFvU=; b=gVSPZj+Ff0C/MEbmX0ZfWDlTuHdOCHAkMriVdfqCCwQMMOwMvDjFeO61 ZgZ9hn0ZXBVfXyN6BPhFaCvWAYPEF0Lf4SvEBxwnzto7xQNv0J1AKcmvH d/mjVlp3egJedgVuodS4ySXqg8zZLDc3chSUtPyRY7ONptYwU9f0mtBnY I=; X-IronPort-AV: E=Sophos;i="5.42,480,1500966000"; d="scan'208";a="6090377" 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:58 -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: 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171004_230619_918160_D330F5BF X-CRM114-Status: UNSURE ( 7.23 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anilkumar Kolli , akolli@codeaurora.org, linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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: