From patchwork Fri Nov 18 23:10:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manoharan, Rajkumar" X-Patchwork-Id: 9437521 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 EC18160237 for ; Fri, 18 Nov 2016 23:17:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D32E9299EC for ; Fri, 18 Nov 2016 23:17:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C650229A3C; Fri, 18 Nov 2016 23:17:18 +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=unavailable 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 51678299EC for ; Fri, 18 Nov 2016 23:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752513AbcKRXRQ (ORCPT ); Fri, 18 Nov 2016 18:17:16 -0500 Received: from sabertooth02.qualcomm.com ([65.197.215.38]:50530 "EHLO sabertooth02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168AbcKRXRP (ORCPT ); Fri, 18 Nov 2016 18:17:15 -0500 X-Greylist: delayed 371 seconds by postgrey-1.27 at vger.kernel.org; Fri, 18 Nov 2016 18:17:15 EST DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1479511035; x=1511047035; h=from:to:cc:subject:date:message-id:mime-version; bh=1o0g4Ja3Go/yukU+rqoZkeWhLlsjvtTYzDjU6jANHg8=; b=hiK50fLDM8EqXEts2gPxepYtRuVkpyNWDZ+wZwQ1d6FeeRv8ei38ODvt 39Ezx4IlwMUQM7Ck2QruTeQOrJkC6Ak3ERjSpfN92LjEFH/3H8bBqB6wr 6GemHoY500of3K2KNP5v6sNR+EtfspPuGOZ6x+jnLdykitf0OKS1qdCf6 A=; X-IronPort-AV: E=Sophos;i="5.31,660,1473145200"; d="scan'208";a="108354831" Received: from las-a1-dmz-lb-0102.qualcomm.com (HELO ironmsg08-lv.qualcomm.com) ([65.197.215.149]) by sabertooth02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Nov 2016 15:11:03 -0800 X-IronPort-AV: E=McAfee;i="5700,7163,8353"; a="375184" X-Amp-Result: CLEAN Received: from nalasexr01h.na.qualcomm.com ([10.49.56.54]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 18 Nov 2016 15:11:04 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by NALASEXR01H.na.qualcomm.com (10.49.56.54) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 18 Nov 2016 15:11:02 -0800 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 18 Nov 2016 15:11:01 -0800 From: Rajkumar Manoharan To: CC: , , Rajkumar Manoharan Subject: [PATCH] ath10k: fix monitor vdev for receiving other bss frames Date: Fri, 18 Nov 2016 15:10:58 -0800 Message-ID: <1479510658-8326-1-git-send-email-rmanohar@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01G.na.qualcomm.com (10.85.0.33) To NALASEXR01H.na.qualcomm.com (10.49.56.54) 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 In order to receive other BSS entries in mesh mode, Monitor vdev is created whenever filter flag is set with OTHER_BSS. Recently it is root caused that setting promisc filter for Mesh interface is causing performance and stability issues. To fix this issue, firmware will configure appropriate rxfilters by default for mesh vdev during vdev creation. This change fixes monitor vdev creation based on firmware IE Signed-off-by: Rajkumar Manoharan --- drivers/net/wireless/ath/ath10k/core.c | 1 + drivers/net/wireless/ath/ath10k/core.h | 7 +++++++ drivers/net/wireless/ath/ath10k/mac.c | 4 +++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 7005e2a98726..b796be1d6318 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -326,6 +326,7 @@ [ATH10K_FW_FEATURE_PEER_FLOW_CONTROL] = "peer-flow-ctrl", [ATH10K_FW_FEATURE_BTCOEX_PARAM] = "btcoex-param", [ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR] = "skip-null-func-war", + [ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST] = "allows-mesh-bcast", }; static unsigned int ath10k_core_get_fw_feature_str(char *buf, diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index e8decfaba5b6..179e52fbad55 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -562,6 +562,13 @@ enum ath10k_fw_features { */ ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR = 15, + /* Firmware allow other BSS mesh broadcast/multicast frames without + * creating monitor interface. Appropriate rxfilters are programmed for + * mesh vdev by firmware itself. This feature flags will be used for + * not creating monitor vdev while configuring mesh node. + */ + ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST = 16, + /* keep last */ ATH10K_FW_FEATURE_COUNT, }; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 717b2fad9a8a..56b8859d4a72 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1167,7 +1167,9 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar) return false; return ar->monitor || - ar->filter_flags & FIF_OTHER_BSS || + (!test_bit(ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST, + ar->running_fw->fw_file.fw_features) && + (ar->filter_flags & FIF_OTHER_BSS)) || test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags); }