diff mbox series

[09/10] mac80211: Use warn-on-once for queue mis-configuration.

Message ID 20191108194210.23618-10-greearb@candelatech.com (mailing list archive)
State Rejected
Delegated to: Johannes Berg
Headers show
Series Ben's grab bag of mac80211 patches | expand

Commit Message

Ben Greear Nov. 8, 2019, 7:42 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

Don't spam logs if a user manages to hit this warning.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
 net/mac80211/util.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

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;