Skip to content

Commit 0948981

Browse files
author
Ping-Ke Shih
committed
wifi: rtw89: phy: add dummy C2H event handler for report of TAS power
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]
1 parent 5fdf5e5 commit 0948981

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

drivers/net/wireless/realtek/rtw89/mac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5558,11 +5558,11 @@ void rtw89_mac_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
55585558
case RTW89_MAC_C2H_CLASS_FWDBG:
55595559
return;
55605560
default:
5561-
rtw89_info(rtwdev, "c2h class %d not support\n", class);
5561+
rtw89_info(rtwdev, "MAC c2h class %d not support\n", class);
55625562
return;
55635563
}
55645564
if (!handler) {
5565-
rtw89_info(rtwdev, "c2h class %d func %d not support\n", class,
5565+
rtw89_info(rtwdev, "MAC c2h class %d func %d not support\n", class,
55665566
func);
55675567
return;
55685568
}

drivers/net/wireless/realtek/rtw89/phy.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,10 +3444,16 @@ rtw89_phy_c2h_rfk_report_state(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u3
34443444
(int)(len - sizeof(report->hdr)), &report->state);
34453445
}
34463446

3447+
static void
3448+
rtw89_phy_c2h_rfk_log_tas_pwr(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
3449+
{
3450+
}
3451+
34473452
static
34483453
void (* const rtw89_phy_c2h_rfk_report_handler[])(struct rtw89_dev *rtwdev,
34493454
struct sk_buff *c2h, u32 len) = {
34503455
[RTW89_PHY_C2H_RFK_REPORT_FUNC_STATE] = rtw89_phy_c2h_rfk_report_state,
3456+
[RTW89_PHY_C2H_RFK_LOG_TAS_PWR] = rtw89_phy_c2h_rfk_log_tas_pwr,
34513457
};
34523458

34533459
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,
35013507
return;
35023508
fallthrough;
35033509
default:
3504-
rtw89_info(rtwdev, "c2h class %d not support\n", class);
3510+
rtw89_info(rtwdev, "PHY c2h class %d not support\n", class);
35053511
return;
35063512
}
35073513
if (!handler) {
3508-
rtw89_info(rtwdev, "c2h class %d func %d not support\n", class,
3514+
rtw89_info(rtwdev, "PHY c2h class %d func %d not support\n", class,
35093515
func);
35103516
return;
35113517
}

drivers/net/wireless/realtek/rtw89/phy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ enum rtw89_phy_c2h_rfk_log_func {
151151

152152
enum rtw89_phy_c2h_rfk_report_func {
153153
RTW89_PHY_C2H_RFK_REPORT_FUNC_STATE = 0,
154+
RTW89_PHY_C2H_RFK_LOG_TAS_PWR = 6,
154155
};
155156

156157
enum rtw89_phy_c2h_dm_func {

0 commit comments

Comments
 (0)