提交 89f44d8c 编写于 作者: A Amit Khatri 提交者: Johannes Berg

mac80211_hwsim: check txrate for NULL

If the rate control algorithm messed up then the txrate pointer
here could be NULL - WARN and drop the packet from monitoring.
Signed-off-by: NAmit Khatri <amit.khatri@samsung.com>
Signed-off-by: NRahul Jain <rahul.jain@samsung.com>
[rewrite commit message, add warning]
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 7d37fcd4
...@@ -814,6 +814,9 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw, ...@@ -814,6 +814,9 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_skb); struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_skb);
struct ieee80211_rate *txrate = ieee80211_get_tx_rate(hw, info); struct ieee80211_rate *txrate = ieee80211_get_tx_rate(hw, info);
if (WARN_ON(!txrate))
return;
if (!netif_running(hwsim_mon)) if (!netif_running(hwsim_mon))
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册