From patchwork Tue Feb 17 07:43:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasanthakumar Thiagarajan X-Patchwork-Id: 5837861 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@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 6E90D9F373 for ; Tue, 17 Feb 2015 07:49:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8426201D3 for ; Tue, 17 Feb 2015 07:49:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCF50201CD for ; Tue, 17 Feb 2015 07:49:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbbBQHtR (ORCPT ); Tue, 17 Feb 2015 02:49:17 -0500 Received: from wolverine02.qualcomm.com ([199.106.114.251]:29441 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752435AbbBQHtQ (ORCPT ); Tue, 17 Feb 2015 02:49:16 -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=1424159357; x=1455695357; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=eLZSHIk0FxwvBfeSEMIcfdX3kB+2/5c7HgaJECO/2zk=; b=SkHwmWIJZMORDJajV5eSdo735r7yWsc+5723dQsJUrOP+Q+OlshOcj1O T5oVj15PY7l6tYwZErEJVIYzmKaKenJa9OLyhnKHlAfUpOisJtRKA58St FL1XFcO3ngpxgq049X/1rWVesjDDxXLqDR7lQNb6c7su6RvFsou3wRsbD w=; X-IronPort-AV: E=McAfee;i="5600,1067,7714"; a="195927955" Received: from ironmsg03-l.qualcomm.com ([172.30.48.18]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Feb 2015 23:49:17 -0800 X-IronPort-AV: E=Sophos;i="5.09,593,1418112000"; d="scan'208";a="842143610" Received: from nasanexm01d.na.qualcomm.com ([10.85.0.84]) by Ironmsg03-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 16 Feb 2015 23:49:16 -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; Mon, 16 Feb 2015 23:49:15 -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; Mon, 16 Feb 2015 23:49:06 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Tue, 17 Feb 2015 13:14:21 +0530 From: Vasanthakumar Thiagarajan To: CC: , Vasanthakumar Thiagarajan Subject: [PATCH V2 2/2] ath10k: Fix interrupt storm Date: Tue, 17 Feb 2015 13:13:16 +0530 Message-ID: <1424158996-8830-2-git-send-email-vthiagar@qti.qualcomm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1424158996-8830-1-git-send-email-vthiagar@qti.qualcomm.com> References: <1424158996-8830-1-git-send-email-vthiagar@qti.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To aphydexm01f.ap.qualcomm.com (10.252.127.15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 3b5aaa3..66cc0a8 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -969,6 +969,15 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif, bool restart) ar->num_started_vdevs++; ath10k_recalc_radar_detection(ar); + if (ar->filter_flags & FIF_PROMISC_IN_BSS) { + ar->filter_flags &= ~FIF_PROMISC_IN_BSS; + ath10k_dbg(ar, ATH10K_DBG_MAC, + "mac disabling promiscuous mode because vdev is started\n"); + ret = ath10k_monitor_recalc(ar); + if (ret) + ath10k_vdev_stop(arvif); + } + return ret; } @@ -3476,6 +3485,13 @@ 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, + "mac does not enable promiscuous mode when already a vdev is running\n"); + *total_flags &= ~FIF_PROMISC_IN_BSS; + } + } ar->filter_flags = *total_flags; ret = ath10k_monitor_recalc(ar);