Skip to content

Commit

Permalink
mac80211: Change WARN_ON to WARN_ON_ONCE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujith authored and John W. Linville committed Oct 31, 2008
1 parent 5c020dc commit 075cbc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 075cbc9

Please sign in to comment.