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: 9058771 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 B9E049F1C1 for ; Tue, 10 May 2016 15:11:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82C8720145 for ; Tue, 10 May 2016 15:11:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E3FF20148 for ; Tue, 10 May 2016 15:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbcEJPLV (ORCPT ); Tue, 10 May 2016 11:11:21 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:26187 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752556AbcEJPLU (ORCPT ); Tue, 10 May 2016 11:11:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qti.qualcomm.com; i=@qti.qualcomm.com; q=dns/txt; s=qcdkim; t=1462893080; x=1494429080; h=from:to:cc:subject:date:message-id:mime-version; bh=QosnjcQSUKANEKm4/h6vIxubjYqutQEQy1//eGLqgRM=; b=wvrXgX16wEitK+UbBHXYnkRuoj2veqTKTbTipZi6Mbk7koigs9ZRiD0z VKtWsgWLblrei4Z+q3IwVXPtMlKYf/Iz4sSsvE23TAhoGBNYNNhFXTWY4 2PuW0gYaJWSK41Iea8ryYHXHfUYwaDWggDLZf1eBj5MhO70z40pGuEBcI A=; X-IronPort-AV: E=Sophos;i="5.24,604,1455004800"; d="scan'208";a="191942752" Received: from ironmsg02-l-new.qualcomm.com (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine01.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: CC: , , "Mohammed Shafi Shajakhan" 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) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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;