From patchwork Tue May 10 15:12:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Shafi Shajakhan X-Patchwork-Id: 9058791 X-Patchwork-Delegate: kvalo@adurom.com 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 2A1159F1C1 for ; Tue, 10 May 2016 15:11:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4BA6120148 for ; Tue, 10 May 2016 15:11:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66E1720145 for ; Tue, 10 May 2016 15:11:50 +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 1b09K1-0007IH-1M; Tue, 10 May 2016 15:11:41 +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 1b09Jy-0007Cx-0M for ath10k@lists.infradead.org; Tue, 10 May 2016 15:11:38 +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=1462893098; x=1494429098; h=from:to:cc:subject:date:message-id:mime-version; bh=QosnjcQSUKANEKm4/h6vIxubjYqutQEQy1//eGLqgRM=; b=XHfAxeg+Lklyw3GQat8C9fzIy+Ap/x618XcWrk7I6BThhbLOm7LSb2qW m/8DQRjCHE+tpVNYOrnCUNMZ1PiASFOMAfakKDqrZUQc8p5Z9ppf82wyt iPWsPa6vhnDTHZyTsH9IJfRPAGnzVIk48UaJxarhXYiUAiglljwEE5RGI U=; X-IronPort-AV: E=Sophos;i="5.24,604,1455004800"; d="scan'208";a="287003072" Received: from ironmsg02-l-new.qualcomm.com (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine02.qualcomm.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 10 May 2016 08:11:17 -0700 From: Mohammed Shafi Shajakhan X-IronPort-AV: E=McAfee;i="5700,7163,8161"; a="695192031" Received: from nasanexm02h.na.qualcomm.com ([10.85.0.89]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 10 May 2016 08:11:17 -0700 Received: from aphydexm01f.ap.qualcomm.com (10.252.127.15) by nasanexm02h.na.qualcomm.com (10.85.0.89) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Tue, 10 May 2016 08:11:16 -0700 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.1178.4; Tue, 10 May 2016 20:41:07 +0530 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Tue, 10 May 2016 20:42:17 +0530 To: Subject: [PATCH] ath10k: Reduce warning messages during rx without proper channel context Date: Tue, 10 May 2016 20:42:16 +0530 Message-ID: <1462893136-16051-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 aphydexm01f.ap.qualcomm.com (10.252.127.15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160510_081138_242997_A9B5C2A8 X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -9.1 (---------) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 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-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 From: Mohammed Shafi Shajakhan WARN_ON_ONCE when we receive packets for self peer when mac80211 had not assigned a proper channel context. This scenario happens in QCA4019 when we start the AP via hostapd in background and start it once again in the background without killing the previous instance! This happens intermittently when we start / stop hostapd in a while loop (incase the hostapd is not properly killed). This results in mac80211 chancontext to be unassigned, while the self peer continuous receive packets in target operating channel. This results in lot of call traces in the rx path. Make this as a WARN_ON_ONCE to avoid flooding the console which result in rebooting low memory systems, while still reporting the warning once that we are receiving packets in target operating channel and to indicate that something is happening which is not the expected result. WARNING: CPU: 0 PID: 0 at ath/ath10k/htt_rx.c:803 [] (warn_slowpath_null) from [] (ath10k_htt_rx_h_channel+0xe0/0x1b8 [ath10k_core]) [] (ath10k_htt_rx_h_channel [ath10k_core]) from [] (ath10k_htt_rx_h_ppdu+0x80/0x288 [ath10k_core]) [] (ath10k_htt_rx_h_ppdu [ath10k_core]) from [] (ath10k_htt_txrx_compl_task+0x724/0x9d4 [ath10k_core]) [] (ath10k_htt_txrx_compl_task [ath10k_core]) Signed-off-by: Mohammed Shafi Shajakhan --- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index cc979a4..77d9200 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -748,7 +748,7 @@ ath10k_htt_rx_h_peer_channel(struct ath10k *ar, struct htt_rx_desc *rxd) if (WARN_ON_ONCE(!arvif)) return NULL; - if (WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) + if (WARN_ON_ONCE(ath10k_mac_vif_chan(arvif->vif, &def))) return NULL; return def.chan;