mac80211: warn only once about not finding a rate
authorJohannes Berg <johannes.berg@intel.com>
Fri, 4 Nov 2011 17:07:43 +0000 (18:07 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 4 Nov 2011 17:38:06 +0000 (13:38 -0400)
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.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h

index dc1123a..72eddd1 100644 (file)
@@ -3567,8 +3567,9 @@ rate_lowest_index(struct ieee80211_supported_band *sband,
                        return i;
 
        /* warn when we cannot find a rate. */
-       WARN_ON(1);
+       WARN_ON_ONCE(1);
 
+       /* and return 0 (the lowest index) */
        return 0;
 }