From patchwork Thu Feb 12 04:59:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 5816211 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1189D9F380 for ; Thu, 12 Feb 2015 05:04:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A9FC2017E for ; Thu, 12 Feb 2015 05:04:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 61E8520149 for ; Thu, 12 Feb 2015 05:04:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLlwS-0006PV-5r; Thu, 12 Feb 2015 05:03:56 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLlwP-0006M6-EG for ath10k@lists.infradead.org; Thu, 12 Feb 2015 05:03:53 +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=1423717433; x=1455253433; h=from:to:cc:subject:date:message-id:mime-version; bh=sbc6MLC2bata75BtTlyBv6nAKLHXIwdzT+EkJ3oKZL4=; b=PxfNDhzTXlJ0bh5jEbGXBbh7TSMVtvguzlgDPT1DjzqAEsqjThhpYDmk U044Ew0xMsEe3J95lYt+Xn9oDfzW6gbRTlQVAYpacL4y3wglNqfTBr1/N wSZsdkC1wFExSPlORsrwsac6qhFE6qsffhn8psjgd2sX2Rb3EKhyzWt+I w=; X-IronPort-AV: E=McAfee;i="5600,1067,7709"; a="195184152" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by wolverine02.qualcomm.com with ESMTP; 11 Feb 2015 21:03:30 -0800 X-IronPort-AV: E=Sophos;i="5.09,563,1418112000"; d="scan'208";a="31740483" Received: from nasanexm01d.na.qualcomm.com ([10.85.0.84]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 11 Feb 2015 21:03:29 -0800 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by NASANEXM01D.na.qualcomm.com (10.85.0.84) with Microsoft SMTP Server (TLS) id 15.0.995.29; Wed, 11 Feb 2015 21:03:28 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01f.ap.qualcomm.com (10.252.127.15) with Microsoft SMTP Server (TLS) id 15.0.995.29; Wed, 11 Feb 2015 21:03:20 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Thu, 12 Feb 2015 10:29:24 +0530 From: Vasanthakumar Thiagarajan To: Subject: [PATCH] ath10k: Fix interrupt storm Date: Thu, 12 Feb 2015 10:29:22 +0530 Message-ID: <1423717162-7788-1-git-send-email-vthiagar@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm01a.na.qualcomm.com (10.85.0.81) To aphydexm01f.ap.qualcomm.com (10.252.127.15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150211_210353_564625_E01CE20E X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.1 (-----) Cc: Vasanthakumar Thiagarajan , linux-wireless@vger.kernel.org X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Promiscuous mode is enabled when wlan interface is added to bridge. ath10k creates a monitor mode when promiscuous mode is enabled. When monitor vdev is runing along with other vdev(s) there is a huge number of interrupts generated especially in noisy condition. Fix this by not enabling promiscuous(monitor) mode when already a vdev is running. This does not change the support of virtual interface of type monitor along with other vdevs. Signed-off-by: Vasanthakumar Thiagarajan --- drivers/net/wireless/ath/ath10k/mac.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d6d2f0f..310e608 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -932,6 +932,14 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif, bool restart) return ret; } + if (ar->filter_flags & FIF_PROMISC_IN_BSS) { + ar->filter_flags &= ~FIF_PROMISC_IN_BSS; + ath10k_dbg(ar, ATH10K_DBG_MAC, "Disabling promiscuous mode when we start a vdev\n"); + ret = ath10k_monitor_recalc(ar); + if (ret) + return ret; + } + ar->num_started_vdevs++; ath10k_recalc_radar_detection(ar); @@ -3369,6 +3377,14 @@ static void ath10k_configure_filter(struct ieee80211_hw *hw, changed_flags &= SUPPORTED_FILTERS; *total_flags &= SUPPORTED_FILTERS; + if (*total_flags & FIF_PROMISC_IN_BSS) { + if (ar->num_started_vdevs) { + ath10k_dbg(ar, ATH10K_DBG_MAC, + "Not enabling promiscuous mode when already a vdev is running\n"); + mutex_unlock(&ar->conf_mutex); + return; + } + } ar->filter_flags = *total_flags; ret = ath10k_monitor_recalc(ar);