From patchwork Fri Nov 8 19:42:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 11235445 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56F1D1864 for ; Fri, 8 Nov 2019 19:42:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D63F206A3 for ; Fri, 8 Nov 2019 19:42:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=candelatech.com header.i=@candelatech.com header.b="NmtTIL7x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732270AbfKHTm1 (ORCPT ); Fri, 8 Nov 2019 14:42:27 -0500 Received: from mail2.candelatech.com ([208.74.158.173]:46198 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731422AbfKHTm1 (ORCPT ); Fri, 8 Nov 2019 14:42:27 -0500 Received: from ben-dt4.candelatech.com (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id C964D13C345; Fri, 8 Nov 2019 11:42:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com C964D13C345 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1573242146; bh=9yAS5sc0FE5J2LJfFvzsHqDYBNzwes8YiVMiKrUTMzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NmtTIL7xjY1ZqSxdomV3NWwVPn7uqRtkEH8wxqrVdOk73HPeI2DcfkeblsmBa9tOy KOj9fDJsveyoX0pRsKtgKe8kIGZu4nUPcdeowkYmR3swdoXMXywFZW8rOjdWa+1dUB DQwaC6mmi0Sb6vEB7cpqIN+6XIJIaCkyb0EwO9gE= From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Ben Greear Subject: [PATCH 09/10] mac80211: Use warn-on-once for queue mis-configuration. Date: Fri, 8 Nov 2019 11:42:10 -0800 Message-Id: <20191108194210.23618-10-greearb@candelatech.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191108194210.23618-1-greearb@candelatech.com> References: <20191108194210.23618-1-greearb@candelatech.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ben Greear Don't spam logs if a user manages to hit this warning. Signed-off-by: Ben Greear --- net/mac80211/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 32a7a53833c0..21c2f439fc6a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -387,8 +387,11 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue, trace_wake_queue(local, queue, reason); - if (WARN_ON(queue >= hw->queues)) + if (WARN_ON_ONCE(queue >= hw->queues)) { + pr_err("wake-queue, queue: %d > hw->queues: %d\n", + queue, hw->queues); return; + } if (!test_bit(reason, &local->queue_stop_reasons[queue])) return;