mac80211: improve __rate_control_send_low warning
authorJohannes Berg <johannes.berg@intel.com>
Wed, 23 Sep 2015 12:02:47 +0000 (14:02 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 29 Sep 2015 13:56:48 +0000 (15:56 +0200)
If there are no supported rates in the rate mask with the required
flags, we warn, but it's not clear which part causes the warning.

Add the relevant data to the warning to understand why it happens.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rate.c

index 9857693b91ec721ff71e3f3cd1087ccc289912e1..48d053b0085804d77e826d2705e767a08e517472 100644 (file)
@@ -305,7 +305,10 @@ static void __rate_control_send_low(struct ieee80211_hw *hw,
                info->control.rates[0].idx = i;
                break;
        }
-       WARN_ON_ONCE(i == sband->n_bitrates);
+       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,
+                 rate_mask, rate_flags);
 
        info->control.rates[0].count =
                (info->flags & IEEE80211_TX_CTL_NO_ACK) ?