rtw89: add C2H handle of BCN_CNT
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 7 Jan 2022 03:42:24 +0000 (11:42 +0800)
committerKalle Valo <kvalo@kernel.org>
Fri, 28 Jan 2022 15:56:35 +0000 (17:56 +0200)
This C2H notify driver the beacon count we send out. We don't handle the
content for now, so add a dummy handler to avoid messages, like
  rtw89_pci 0000:03:00.0: c2h class 0 func 3 not support
  C2H: 00000000: 01 03 01 3f 0f 00 00 00 80 0a 00 00 00 00 a0
  rtw89_pci 0000:03:00.0: c2h class 0 func 3 not support
  C2H: 00000000: 01 03 01 40 0f 00 00 00 00 03 20 00 00 00 a5

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220107034239.22002-5-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/mac.c
drivers/net/wireless/realtek/rtw89/mac.h

index e73f5cc0138cadf571f9c6afbf0c572877a4d0df..bbf3ddd45f8c5f513477157058bf359a7f9944d1 100644 (file)
@@ -3126,6 +3126,11 @@ rtw89_mac_c2h_log(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
                   RTW89_GET_C2H_LOG_SRT_PRT(c2h->data));
 }
 
+static void
+rtw89_mac_c2h_bcn_cnt(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
+{
+}
+
 static
 void (* const rtw89_mac_c2h_ofld_handler[])(struct rtw89_dev *rtwdev,
                                            struct sk_buff *c2h, u32 len) = {
@@ -3142,6 +3147,7 @@ void (* const rtw89_mac_c2h_info_handler[])(struct rtw89_dev *rtwdev,
        [RTW89_MAC_C2H_FUNC_REC_ACK] = rtw89_mac_c2h_rec_ack,
        [RTW89_MAC_C2H_FUNC_DONE_ACK] = rtw89_mac_c2h_done_ack,
        [RTW89_MAC_C2H_FUNC_C2H_LOG] = rtw89_mac_c2h_log,
+       [RTW89_MAC_C2H_FUNC_BCN_CNT] = rtw89_mac_c2h_bcn_cnt,
 };
 
 void rtw89_mac_c2h_handle(struct rtw89_dev *rtwdev, struct sk_buff *skb,
index 75d41db53e5170a7074da0c1814f1c2c1aea2dc7..9fe7629f1da16192c7b49f347bfee5d844768b73 100644 (file)
@@ -308,6 +308,7 @@ enum rtw89_mac_c2h_info_func {
        RTW89_MAC_C2H_FUNC_REC_ACK,
        RTW89_MAC_C2H_FUNC_DONE_ACK,
        RTW89_MAC_C2H_FUNC_C2H_LOG,
+       RTW89_MAC_C2H_FUNC_BCN_CNT,
        RTW89_MAC_C2H_FUNC_INFO_MAX,
 };