Message ID | 20240603145620.1858957-1-marcin.slusarz@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Ping-Ke Shih |
Headers | show |
Series | wifi: rtw88: usb: drop rx skbs when device is not running | expand |
diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index e1b66f339cca..c25fd4b193a7 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -570,6 +570,11 @@ static void rtw_usb_rx_handler(struct work_struct *work) continue; } + if (!test_bit(RTW_FLAG_RUNNING, rtwdev->flags)) { + dev_kfree_skb_any(skb); + continue; + } + skb_put(skb, pkt_stat.pkt_len); skb_reserve(skb, pkt_offset); memcpy(skb->cb, &rx_status, sizeof(rx_status));