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: Amit Khatri <[email protected]>
Signed-off-by: Rahul Jain <[email protected]>
[rewrite commit message, add warning]
Signed-off-by: Johannes Berg <[email protected]>
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_skb);
struct ieee80211_rate *txrate = ieee80211_get_tx_rate(hw, info);
+ if (WARN_ON(!txrate))
+ return;
+
if (!netif_running(hwsim_mon))
return;