From patchwork Fri Feb 17 11:45:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Shafi Shajakhan X-Patchwork-Id: 9579679 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 CB895600C5 for ; Fri, 17 Feb 2017 11:57:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B70F7276D6 for ; Fri, 17 Feb 2017 11:57:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A761C283E2; Fri, 17 Feb 2017 11:57:23 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable 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 37619276D6 for ; Fri, 17 Feb 2017 11:57:22 +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: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:In-Reply-To:References: List-Owner; bh=vzFTmjLJlZ2IqveTgRYwc20GR0LtuC3MwcJirbIuwWI=; b=PSEdccJck+/Z6Q W2NaCprwpq/4k9q0cQ0RhWwaLm+5ZvKgWws7ZgDmDvUXLvZkeqg9c/F9W79vpqoAooy5l7i+XSy/7 evUo+lLWsdO4kWehvEo5vTA6lhmUUe9k342Dn8prNuZpZ4h/f5wZjdXrILhPrf2fuCcPNFFC60hdv ZmaUgBDsIXGy66+yXo0T0RYOtLPcpq2txmREm+5mhIzl0taoYXMIzQWGeVZ5QVPvERGWR8pUzvV46 zchpPZjJhs1mlip0YX3WD55Riyd+wKycboDXxTNY4g8qGZNfuDLVJasgHiRzGLwn87iDgyohcKshK eQxa+zzkwGevBTLEsaug==; 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 1cehA4-0006LB-6X; Fri, 17 Feb 2017 11:57:16 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cegxz-0008BJ-4d for ath10k@lists.infradead.org; Fri, 17 Feb 2017 11:44:52 +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=1487331887; x=1518867887; h=from:to:cc:subject:date:message-id:mime-version; bh=2uosUG0LBfHkUwcUHd2CpFT1NdEJbp29OYE9xo6d+5g=; b=UMmHODZPtEXdH30gkrsK/ZvTaRt9SGewoXEaZ3BbnhnToIqC0HMlvbTl rE6sWZX6Hw5UVOlgGEHKx9GGZbXmfp8OY+x8RiYcDAkYic/NQwSJ+6xD0 ccCgy8fQ4r+POA9n4LukUnp5GzFkLF7GGf07/cwiP22FqZuxu5+jyRx83 8=; X-IronPort-AV: E=Sophos;i="5.35,171,1484035200"; d="scan'208";a="359213405" Received: from unknown (HELO ironmsg02-R.qualcomm.com) ([10.53.140.106]) by wolverine02.qualcomm.com with ESMTP; 17 Feb 2017 03:44:26 -0800 From: Mohammed Shafi Shajakhan X-IronPort-AV: E=McAfee;i="5800,7501,8440"; a="902648977" Received: from nasanexm01b.na.qualcomm.com ([10.85.0.82]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 17 Feb 2017 03:44:25 -0800 Received: from aphydexm01b.ap.qualcomm.com (10.252.127.11) by NASANEXM01B.na.qualcomm.com (10.85.0.82) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 17 Feb 2017 03:44:24 -0800 Received: from qcmail1.qualcomm.com (10.80.80.8) by aphydexm01b.ap.qualcomm.com (10.252.127.11) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 17 Feb 2017 17:14:17 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Fri, 17 Feb 2017 17:15:04 +0530 To: Subject: [PATCH v2] ath10k: Fix a warning during channel switch with multiple vaps Date: Fri, 17 Feb 2017 17:15:02 +0530 Message-ID: <1487331902-12034-1-git-send-email-mohammed@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01F.na.qualcomm.com (10.85.0.32) To aphydexm01b.ap.qualcomm.com (10.252.127.11) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170217_034448_224044_876A19C7 X-CRM114-Status: UNSURE ( 8.51 ) 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: mohammed@codeaurora.org, linux-wireless@vger.kernel.org, Mohammed Shafi Shajakhan Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mohammed Shafi Shajakhan Doing a channel switch via hostapd_cli seems to update the new channel context for each VAP's appropriately as below in 'ath10k_mac_update_vif_chan', hence we can safely suppress the warning that shows up during this operation and dump the warning only if no vaps are available for channel switch hostapd_cli -i wlan0 chan_switch 5 5200 OK ath10k_pci : mac chanctx switch n_vifs 3 mode 1 ath10k_pci : mac chanctx switch vdev_id 2 freq 5180->5200 width 0->0 ath10k_pci : mac chanctx switch vdev_id 1 freq 5180->5200 width 0->0 ath10k_pci : mac chanctx switch vdev_id 0 freq 5180->5200 width 0->0 Call Trace: WARNING: backports-20161201-3.14.77-9ab3068/drivers/net/wireless/ath/ath10k/mac.c:7126 [] (warn_slowpath_null) from [] (ath10k_reconfig_complete+0xe4/0x25c [ath10k_core]) [] (ath10k_reconfig_complete [ath10k_core]) [] (ath10k_mac_vif_ap_csa_work+0x214/0x370 [ath10k_core]) [] (ath10k_mac_op_change_chanctx+0x108/0x128 [ath10k_core]) [] (ieee80211_recalc_chanctx_min_def+0x30c/0x430 [mac80211]) [] (ieee80211_recalc_smps_chanctx+0x2ec/0x840 [mac80211]) [] (ieee80211_vif_use_reserved_context+0x7c/0xf8 [mac80211]) [] (ieee80211_vif_use_reserved_context [mac80211]) [] (ieee80211_csa_finalize_work+0x5c/0x88 [mac80211]) Fixes: d7bf4b4aba05 ("ath10k: fix ar->rx_channel updating logic") Signed-off-by: Mohammed Shafi Shajakhan --- drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d1b7edb..b416958 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -7085,7 +7085,7 @@ static int ath10k_ampdu_action(struct ieee80211_hw *hw, lockdep_assert_held(&ar->data_lock); WARN_ON(ctx && vifs); - WARN_ON(vifs && n_vifs != 1); + WARN_ON(vifs && !n_vifs); /* FIXME: Sort of an optimization and a workaround. Peers and vifs are * on a linked list now. Doing a lookup peer -> vif -> chanctx for each