Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa331df0 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville
Browse files

mac80211: Convert WARN_ON to WARN_ON_ONCE



When the control-rate tables are not set up correctly, it makes
little sense to spam the logs, thus change the WARN_ON to WARN_ON_ONCE.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0298dc9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1327,7 +1327,7 @@ static inline struct ieee80211_rate *
ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
		      const struct ieee80211_tx_info *c)
{
	if (WARN_ON(c->control.rates[0].idx < 0))
	if (WARN_ON_ONCE(c->control.rates[0].idx < 0))
		return NULL;
	return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
}