Skip to content

Commit 1f6158b

Browse files
Ping-Ke Shihpopcornmix
authored andcommitted
wifi: rtw89: phy: add dummy C2H event handler for report of TAS power
commit 0948981 upstream. 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 <pkshih@realtek.com> Link: https://patch.msgid.link/20241209042127.21424-1-pkshih@realtek.com Signed-off-by: Zenm Chen <zenmchen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e25696f commit 1f6158b

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
@@ -5513,11 +5513,11 @@ void rtw89_mac_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
55135513
case RTW89_MAC_C2H_CLASS_FWDBG:
55145514
return;
55155515
default:
5516-
rtw89_info(rtwdev, "c2h class %d not support\n", class);
5516+
rtw89_info(rtwdev, "MAC c2h class %d not support\n", class);
55175517
return;
55185518
}
55195519
if (!handler) {
5520-
rtw89_info(rtwdev, "c2h class %d func %d not support\n", class,
5520+
rtw89_info(rtwdev, "MAC c2h class %d func %d not support\n", class,
55215521
func);
55225522
return;
55235523
}

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

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

3065+
static void
3066+
rtw89_phy_c2h_rfk_log_tas_pwr(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
3067+
{
3068+
}
3069+
30653070
static
30663071
void (* const rtw89_phy_c2h_rfk_report_handler[])(struct rtw89_dev *rtwdev,
30673072
struct sk_buff *c2h, u32 len) = {
30683073
[RTW89_PHY_C2H_RFK_REPORT_FUNC_STATE] = rtw89_phy_c2h_rfk_report_state,
3074+
[RTW89_PHY_C2H_RFK_LOG_TAS_PWR] = rtw89_phy_c2h_rfk_log_tas_pwr,
30693075
};
30703076

30713077
bool rtw89_phy_c2h_chk_atomic(struct rtw89_dev *rtwdev, u8 class, u8 func)
@@ -3119,11 +3125,11 @@ void rtw89_phy_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
31193125
return;
31203126
fallthrough;
31213127
default:
3122-
rtw89_info(rtwdev, "c2h class %d not support\n", class);
3128+
rtw89_info(rtwdev, "PHY c2h class %d not support\n", class);
31233129
return;
31243130
}
31253131
if (!handler) {
3126-
rtw89_info(rtwdev, "c2h class %d func %d not support\n", class,
3132+
rtw89_info(rtwdev, "PHY c2h class %d func %d not support\n", class,
31273133
func);
31283134
return;
31293135
}

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)