From patchwork Tue May 12 12:45:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 6387621 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 14AA89F32E for ; Tue, 12 May 2015 12:45:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0CC4420414 for ; Tue, 12 May 2015 12:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DE6E20412 for ; Tue, 12 May 2015 12:45:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932710AbbELMps (ORCPT ); Tue, 12 May 2015 08:45:48 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:35805 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932507AbbELMpr (ORCPT ); Tue, 12 May 2015 08:45:47 -0400 Received: by labbd9 with SMTP id bd9so4772726lab.2 for ; Tue, 12 May 2015 05:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=m4qbHZdcinYKcZRKQ8y7QsFfnxrgm+uROwHi/cUWylA=; b=pIw3Vy9O6c4OvWs42NKeQllLAYzwYvYqtU7CH0vswlJq0CTaXos1IBiNM+g5WxXDOm oP8pR8k3mXwTUX9zg+ziAn6U2t4ovvFT9tJbnNEq3ZIHkvBxqZXsZttzkNam0IllErjl 7eUpkZxQPykvO2xNXMUGmE9YreHDEY4XEEUUY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=m4qbHZdcinYKcZRKQ8y7QsFfnxrgm+uROwHi/cUWylA=; b=D18HCsTScoI8KrgWCBFy8tl1R1ST7IhWuZlLumqAIrX+4e3IiQV+ASHtM/Ybf2aHvg F0KDD1DNqe/aG6EX+P0AMPxI4IVO79tcwKJZlodfnY1Dm1uIi4G8khl3v8dhI0sUT1ew xL1mTT+R6xpk+oximtpg3DWMyHCc52uurVWJqduVlf0KZFraHl0r1kZWjikrinqzdi5I syYXjJPHNXnryDH0bYKtdmevl+LDu1czSsP6fTiChXH2VLBMSaWGFpErQ34Yz01lZa6S q4ka/Jz5TnFMklnx/LdPdSHkiRWahBOmzyzosBFuqvimfbVCe6s2X8v+xhFI34oIzlPb P7QQ== X-Gm-Message-State: ALoCoQkV2EGnFDoCL4G/8D3ZClVBLorSapoqbtwN0yLC454Bk10gQyJBx6jrbfn2G9wJ2IwtGrNPy7WeR/rJc+//H/7AIjZweAgQPAakXmUmdAvj6CZRawC2MC5Inl+wCqB9sRG33NDN X-Received: by 10.112.161.226 with SMTP id xv2mr12038924lbb.106.1431434745696; Tue, 12 May 2015 05:45:45 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id aj4sm3822143lbd.5.2015.05.12.05.45.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 May 2015 05:45:44 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior Subject: [PATCH] amth10k: fix promisc handling Date: Tue, 12 May 2015 12:45:36 +0000 Message-Id: <1431434736-7077-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 X-DomainID: tieto.com 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=ham 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 Patch df1404650ccb ("mac80211: remove support for IFF_PROMISC") removed promiscuous flag propagation to drivers. However the patch was designed against ath10k without 548462133d98 ("ath10k: fix interrupt storm"). After merge the code drifted into being no longer correct and due to monitor vdev being overzealously started caused IBSS to crash on 999.999.0.636 for QCA988X (this firmware revision is known to have issues with monitor vdev). This patch keeps expectations of commit 548462133d98 (i.e. reduce irq storm by not enabling monitor vdev for AP) and doesn't break existing (known) setups that imply promiscuous mode on network interfaces. Contrary to what it looks like 548462133d98 functionality is not reverted since the intention was a subset of what df1404650ccb did. Fixes: c17c997d5613 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next") Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/mac.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 425dbe271495..594eb369ff7f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1031,22 +1031,6 @@ static int ath10k_monitor_stop(struct ath10k *ar) return 0; } -static bool ath10k_mac_should_disable_promisc(struct ath10k *ar) -{ - struct ath10k_vif *arvif; - - if (!ar->num_started_vdevs) - return false; - - list_for_each_entry(arvif, &ar->arvifs, list) - if (arvif->vdev_type != WMI_VDEV_TYPE_AP) - return false; - - ath10k_dbg(ar, ATH10K_DBG_MAC, - "mac disabling promiscuous mode because vdev is started\n"); - return true; -} - static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar) { int num_ctx; @@ -1065,7 +1049,6 @@ static bool ath10k_mac_monitor_vdev_is_needed(struct ath10k *ar) return false; return ar->monitor || - !ath10k_mac_should_disable_promisc(ar) || test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags); } @@ -1267,7 +1250,7 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif, { struct ath10k *ar = arvif->ar; struct wmi_vdev_start_request_arg arg = {}; - int ret = 0, ret2; + int ret = 0; lockdep_assert_held(&ar->conf_mutex); @@ -1326,16 +1309,6 @@ static int ath10k_vdev_start_restart(struct ath10k_vif *arvif, ar->num_started_vdevs++; ath10k_recalc_radar_detection(ar); - ret = ath10k_monitor_recalc(ar); - if (ret) { - ath10k_warn(ar, "mac failed to recalc monitor for vdev %i restart %d: %d\n", - arg.vdev_id, restart, ret); - ret2 = ath10k_vdev_stop(arvif); - if (ret2) - ath10k_warn(ar, "mac failed to stop vdev %i restart %d: %d\n", - arg.vdev_id, restart, ret2); - } - return ret; }