Skip to contentSkip to conversation

mac80211: warn only once about not finding a rate

PATCH New Johannes Berg 1 participant 1 message Nov 4, 2011 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: warn only once about not finding a rate

From: Johannes Berg <[email protected]>

The warning really shouldn't happen, but until we find the reason why it does don't spew it all the time, just once is enough to know we've hit it.

---
 include/net/mac80211.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/net/mac80211.h +2 -1
@@ -3576,8 +3576,9 @@ rate_lowest_index(struct ieee80211_suppo
 			return i;
 
 	/* warn when we cannot find a rate. */
-	WARN_ON(1);
+	WARN_ON_ONCE(1);
 
+	/* and return 0 (the lowest index) */
 	return 0;
 }