From: Sujith Date: Thu, 23 Oct 2008 06:44:02 +0000 (+0530) Subject: mac80211: Change WARN_ON to WARN_ON_ONCE X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=075cbc9eb15da8f4cba7c7eaadedd8b030d3a87a;p=openwrt%2Fstaging%2Fblogic.git mac80211: Change WARN_ON to WARN_ON_ONCE 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 Acked-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 21951bac1ef7..541e3e64493d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -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; }