瀏覽代碼

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 <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 9 年之前
父節點
當前提交
ef95d8ba38
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/mac80211/rate.c

+ 1 - 1
net/mac80211/rate.c

@@ -307,7 +307,7 @@ static void __rate_control_send_low(struct ieee80211_hw *hw,
 	}
 	}
 	WARN_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",
 		  "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);
 		  rate_mask, rate_flags);
 
 
 	info->control.rates[0].count =
 	info->control.rates[0].count =