mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
wifi: rtw89: print just once for unknown C2H events
When driver receives new or unknown C2H events, it print out messages repeatedly once events are received, like rtw89_8922ae 0000:81:00.0: PHY c2h class 2 not support To avoid the thousands of messages, use rtw89_info_once() instead. Also, print out class/func for unknown (undefined) class. Reported-by: Sean Anderson <sean.anderson@linux.dev> Closes: https://lore.kernel.org/linux-wireless/20250729204437.164320-1-sean.anderson@linux.dev/ Reviewed-by: Sean Anderson <sean.anderson@linux.dev> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250804012234.8913-2-pkshih@realtek.com
This commit is contained in:
parent
26a8bf978a
commit
7e1c44fe4c
|
|
@ -56,6 +56,7 @@ static inline void rtw89_debugfs_deinit(struct rtw89_dev *rtwdev) {}
|
|||
#endif
|
||||
|
||||
#define rtw89_info(rtwdev, a...) dev_info((rtwdev)->dev, ##a)
|
||||
#define rtw89_info_once(rtwdev, a...) dev_info_once((rtwdev)->dev, ##a)
|
||||
#define rtw89_warn(rtwdev, a...) dev_warn((rtwdev)->dev, ##a)
|
||||
#define rtw89_err(rtwdev, a...) dev_err((rtwdev)->dev, ##a)
|
||||
|
||||
|
|
|
|||
|
|
@ -5813,12 +5813,11 @@ void rtw89_mac_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
|
|||
case RTW89_MAC_C2H_CLASS_ROLE:
|
||||
return;
|
||||
default:
|
||||
rtw89_info(rtwdev, "MAC c2h class %d not support\n", class);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if (!handler) {
|
||||
rtw89_info(rtwdev, "MAC c2h class %d func %d not support\n", class,
|
||||
func);
|
||||
rtw89_info_once(rtwdev, "MAC c2h class %d func %d not support\n",
|
||||
class, func);
|
||||
return;
|
||||
}
|
||||
handler(rtwdev, skb, len);
|
||||
|
|
|
|||
|
|
@ -3626,12 +3626,11 @@ void rtw89_phy_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
|
|||
handler = rtw89_phy_c2h_dm_handler[func];
|
||||
break;
|
||||
default:
|
||||
rtw89_info(rtwdev, "PHY c2h class %d not support\n", class);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if (!handler) {
|
||||
rtw89_info(rtwdev, "PHY c2h class %d func %d not support\n", class,
|
||||
func);
|
||||
rtw89_info_once(rtwdev, "PHY c2h class %d func %d not support\n",
|
||||
class, func);
|
||||
return;
|
||||
}
|
||||
handler(rtwdev, skb, len);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user