]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: phy: add PHY C2H event dummy handler for func 1-7 and 2-10
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 23 Jan 2026 01:39:53 +0000 (09:39 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 28 Jan 2026 03:18:41 +0000 (11:18 +0800)
The two functions aren't implemented and hard necessary by driver.
Implement dummy handler to avoid messages:

  rtw89_8922de 0000:03:00.0: PHY c2h class 1 func 7 not support
  rtw89_8922de 0000:03:00.0: PHY c2h class 2 func 10 not support

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260123013957.16418-8-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/fw.h
drivers/net/wireless/realtek/rtw89/phy.c
drivers/net/wireless/realtek/rtw89/phy.h

index 8a33a63619d5a3f7852b663d0c1e663161d5c0b3..4c50c0166d4ff39513084a9d47d525b756543678 100644 (file)
@@ -7783,6 +7783,17 @@ void rtw89_fw_free_all_early_h2c(struct rtw89_dev *rtwdev)
        __rtw89_fw_free_all_early_h2c(rtwdev);
 }
 
+void rtw89_fw_c2h_dummy_handler(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
+{
+       struct rtw89_fw_c2h_attr *attr = RTW89_SKB_C2H_CB(c2h);
+       u8 category = attr->category;
+       u8 class = attr->class;
+       u8 func = attr->func;
+
+       rtw89_debug(rtwdev, RTW89_DBG_FW,
+                   "C2H cate=%u cls=%u func=%u is dummy\n", category, class, func);
+}
+
 static void rtw89_fw_c2h_parse_attr(struct sk_buff *c2h)
 {
        const struct rtw89_c2h_hdr *hdr = (const struct rtw89_c2h_hdr *)c2h->data;
index da802482c47d283034d6dedefd3a7e337abde1f8..d45b6ea6ea1bcf13f57bea8babb287edcd941d8a 100644 (file)
@@ -5249,6 +5249,7 @@ int rtw89_fw_h2c_dctl_sec_cam_v3(struct rtw89_dev *rtwdev,
 void rtw89_fw_c2h_irqsafe(struct rtw89_dev *rtwdev, struct sk_buff *c2h);
 void rtw89_fw_c2h_work(struct wiphy *wiphy, struct wiphy_work *work);
 void rtw89_fw_c2h_purge_obsoleted_scan_events(struct rtw89_dev *rtwdev);
+void rtw89_fw_c2h_dummy_handler(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len);
 int rtw89_fw_h2c_role_maintain(struct rtw89_dev *rtwdev,
                               struct rtw89_vif_link *rtwvif_link,
                               struct rtw89_sta_link *rtwsta_link,
index 41a8ce3aaffc4c76ee472ffd490754b3c8865eee..6c6d5f1da867cdaac89d6216f6714cc584dac2fe 100644 (file)
@@ -3332,6 +3332,7 @@ void (* const rtw89_phy_c2h_ra_handler[])(struct rtw89_dev *rtwdev,
        [RTW89_PHY_C2H_FUNC_STS_RPT] = rtw89_phy_c2h_ra_rpt,
        [RTW89_PHY_C2H_FUNC_MU_GPTBL_RPT] = NULL,
        [RTW89_PHY_C2H_FUNC_TXSTS] = NULL,
+       [RTW89_PHY_C2H_FUNC_ACCELERATE_EN] = rtw89_fw_c2h_dummy_handler,
 };
 
 static void
@@ -3419,6 +3420,7 @@ void (* const rtw89_phy_c2h_dm_handler[])(struct rtw89_dev *rtwdev,
        [RTW89_PHY_C2H_DM_FUNC_LOWRT_RTY] = rtw89_phy_c2h_lowrt_rty,
        [RTW89_PHY_C2H_DM_FUNC_MCC_DIG] = NULL,
        [RTW89_PHY_C2H_DM_FUNC_LPS] = rtw89_phy_c2h_lps_rpt,
+       [RTW89_PHY_C2H_DM_FUNC_ENV_MNTR] = rtw89_fw_c2h_dummy_handler,
        [RTW89_PHY_C2H_DM_FUNC_FW_SCAN] = rtw89_phy_c2h_fw_scan_rpt,
 };
 
@@ -4009,7 +4011,7 @@ void rtw89_phy_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
 
        switch (class) {
        case RTW89_PHY_C2H_CLASS_RA:
-               if (func < RTW89_PHY_C2H_FUNC_RA_MAX)
+               if (func < ARRAY_SIZE(rtw89_phy_c2h_ra_handler))
                        handler = rtw89_phy_c2h_ra_handler[func];
                break;
        case RTW89_PHY_C2H_RFK_LOG:
index a587f83b8d67304ae20c4597faadc56fe1368d45..ab263738d2120938adb3d3ab3fdee06cb7f30ad7 100644 (file)
@@ -139,7 +139,9 @@ enum rtw89_phy_c2h_ra_func {
        RTW89_PHY_C2H_FUNC_STS_RPT,
        RTW89_PHY_C2H_FUNC_MU_GPTBL_RPT,
        RTW89_PHY_C2H_FUNC_TXSTS,
-       RTW89_PHY_C2H_FUNC_RA_MAX,
+       RTW89_PHY_C2H_FUNC_ACCELERATE_EN = 0x7,
+
+       RTW89_PHY_C2H_FUNC_RA_NUM,
 };
 
 enum rtw89_phy_c2h_rfk_log_func {
@@ -168,6 +170,7 @@ enum rtw89_phy_c2h_dm_func {
        RTW89_PHY_C2H_DM_FUNC_LOWRT_RTY,
        RTW89_PHY_C2H_DM_FUNC_MCC_DIG,
        RTW89_PHY_C2H_DM_FUNC_LPS = 0x9,
+       RTW89_PHY_C2H_DM_FUNC_ENV_MNTR = 0xa,
        RTW89_PHY_C2H_DM_FUNC_FW_SCAN = 0xc,
        RTW89_PHY_C2H_DM_FUNC_NUM,
 };