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

Commit 075cbc9e authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

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: default avatarSujith <Sujith.Manoharan@atheros.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5c020dc6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -563,7 +563,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
				IEEE80211_TX_RC_USE_RTS_CTS;
				IEEE80211_TX_RC_USE_RTS_CTS;


		/* RC is busted */
		/* RC is busted */
		if (WARN_ON(info->control.rates[i].idx >=
		if (WARN_ON_ONCE(info->control.rates[i].idx >=
				 sband->n_bitrates)) {
				 sband->n_bitrates)) {
			info->control.rates[i].idx = -1;
			info->control.rates[i].idx = -1;
			continue;
			continue;