]> Git Repo - linux.git/commitdiff
wifi: rtw89: phy: add dummy C2H event handler for report of TAS power
authorPing-Ke Shih <[email protected]>
Mon, 9 Dec 2024 04:21:27 +0000 (12:21 +0800)
committerPing-Ke Shih <[email protected]>
Thu, 12 Dec 2024 03:09:12 +0000 (11:09 +0800)
The newer firmware, lik RTL8852C version 0.27.111.0, will notify driver
report of TAS (Time Averaged SAR) power by new C2H events. This is to
assist in higher accurate calculation of TAS.

For now, driver doesn't use the report yet, so add a dummy handler to
avoid it throws info like:
   rtw89_8852ce 0000:03:00.0: c2h class 9 func 6 not support

Also add "MAC" and "PHY" to the message to disambiguate the source of
C2H event.

Signed-off-by: Ping-Ke Shih <[email protected]>
Link: https://patch.msgid.link/[email protected]
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/phy.c
drivers/net/wireless/realtek/rtw89/phy.h

index bb4f58118e05ada2813504bd989df3766f77b825..c78066fd45048696316f75bc41a1f6e1b4faa287 100644 (file)
@@ -5558,11 +5558,11 @@ void rtw89_mac_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
        case RTW89_MAC_C2H_CLASS_FWDBG:
                return;
        default:
-               rtw89_info(rtwdev, "c2h class %d not support\n", class);
+               rtw89_info(rtwdev, "MAC c2h class %d not support\n", class);
                return;
        }
        if (!handler) {
-               rtw89_info(rtwdev, "c2h class %d func %d not support\n", class,
+               rtw89_info(rtwdev, "MAC c2h class %d func %d not support\n", class,
                           func);
                return;
        }
index 604ea048c3abceeaa59a1f1575eeb6f14d40c22a..4e3754fd18fd4c697e240dc580bc31fb09df201d 100644 (file)
@@ -3444,10 +3444,16 @@ rtw89_phy_c2h_rfk_report_state(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u3
                    (int)(len - sizeof(report->hdr)), &report->state);
 }
 
+static void
+rtw89_phy_c2h_rfk_log_tas_pwr(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
+{
+}
+
 static
 void (* const rtw89_phy_c2h_rfk_report_handler[])(struct rtw89_dev *rtwdev,
                                                  struct sk_buff *c2h, u32 len) = {
        [RTW89_PHY_C2H_RFK_REPORT_FUNC_STATE] = rtw89_phy_c2h_rfk_report_state,
+       [RTW89_PHY_C2H_RFK_LOG_TAS_PWR] = rtw89_phy_c2h_rfk_log_tas_pwr,
 };
 
 bool rtw89_phy_c2h_chk_atomic(struct rtw89_dev *rtwdev, u8 class, u8 func)
@@ -3501,11 +3507,11 @@ void rtw89_phy_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
                        return;
                fallthrough;
        default:
-               rtw89_info(rtwdev, "c2h class %d not support\n", class);
+               rtw89_info(rtwdev, "PHY c2h class %d not support\n", class);
                return;
        }
        if (!handler) {
-               rtw89_info(rtwdev, "c2h class %d func %d not support\n", class,
+               rtw89_info(rtwdev, "PHY c2h class %d func %d not support\n", class,
                           func);
                return;
        }
index cf33c1655b7a7ab9ab83265a1710681a35199d8c..697ee47fe325cc2d0cb1ba6202c280f8ac6caaea 100644 (file)
@@ -151,6 +151,7 @@ enum rtw89_phy_c2h_rfk_log_func {
 
 enum rtw89_phy_c2h_rfk_report_func {
        RTW89_PHY_C2H_RFK_REPORT_FUNC_STATE = 0,
+       RTW89_PHY_C2H_RFK_LOG_TAS_PWR = 6,
 };
 
 enum rtw89_phy_c2h_dm_func {
This page took 0.296527 seconds and 4 git commands to generate.