mac80211: Change WARN_ON to WARN_ON_ONCE
authorSujith <Sujith.Manoharan@atheros.com>
Thu, 23 Oct 2008 06:44:02 +0000 (12:14 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 31 Oct 2008 23:00:54 +0000 (19:00 -0400)
A warning would be printed for every packet that
is transmitted if the rate control information isn't
setup. Change this to WARN_ON_ONCE.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/tx.c

index 21951bac1ef799d7a167c2ee9b0255e974c3f2cc..541e3e64493d73f5497ece370915aab491eeb7a5 100644 (file)
@@ -563,8 +563,8 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
                                IEEE80211_TX_RC_USE_RTS_CTS;
 
                /* RC is busted */
-               if (WARN_ON(info->control.rates[i].idx >=
-                           sband->n_bitrates)) {
+               if (WARN_ON_ONCE(info->control.rates[i].idx >=
+                                sband->n_bitrates)) {
                        info->control.rates[i].idx = -1;
                        continue;
                }