From: Johannes Berg Date: Sun, 25 Oct 2015 08:59:42 +0000 (+0200) Subject: mac80211: further improve "no supported rates" warning X-Git-Tag: firefly_0821_release~176^2~818^2~5^2~2 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ef95d8ba384781ce574c10f87b97d6bab2659735;p=firefly-linux-kernel-4.4.55.git mac80211: further improve "no supported rates" warning Allow distinguishing the non-station case from the case of a station without rates, by using -1 for the non-station case. This value cannot be reached with a station since that many legacy rates don't exist. Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index b07e2f748f93..a4e2f4e67f94 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -307,7 +307,7 @@ static void __rate_control_send_low(struct ieee80211_hw *hw, } WARN_ONCE(i == sband->n_bitrates, "no supported rates (0x%x) in rate_mask 0x%x with flags 0x%x\n", - sta ? sta->supp_rates[sband->band] : 0, + sta ? sta->supp_rates[sband->band] : -1, rate_mask, rate_flags); info->control.rates[0].count =