提交 aa331df0 编写于 作者: L Larry Finger 提交者: John W. Linville

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: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 0298dc9f
...@@ -1327,7 +1327,7 @@ static inline struct ieee80211_rate * ...@@ -1327,7 +1327,7 @@ static inline struct ieee80211_rate *
ieee80211_get_tx_rate(const struct ieee80211_hw *hw, ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
const struct ieee80211_tx_info *c) 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 NULL;
return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx]; return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册