Search Linux Wireless

Re: [PATCH rtw-next 2/2] wifi: rtw89: add dummy C2H handlers for BCN resend and update done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/3/25 21:22, Ping-Ke Shih wrote:
> Two C2H events are not listed, and driver throws
> 
>   MAC c2h class 0 func 6 not support
>   MAC c2h class 1 func 3 not support
> 
> Since the implementation in vendor driver does nothing, add two dummy
> functions for them.
> 
> Reported-by: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>
> Closes: https://lore.kernel.org/linux-wireless/d2d62793-046c-4b55-93ed-1d1f43cff7f2@xxxxxxxxx/
> Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> ---
>  drivers/net/wireless/realtek/rtw89/mac.c | 13 ++++++++++++-
>  drivers/net/wireless/realtek/rtw89/mac.h |  1 +
>  2 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
> index ef17a307b770..33a7dd9d6f0e 100644
> --- a/drivers/net/wireless/realtek/rtw89/mac.c
> +++ b/drivers/net/wireless/realtek/rtw89/mac.c
> @@ -5235,6 +5235,11 @@ rtw89_mac_c2h_bcn_cnt(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
>  {
>  }
>  
> +static void
> +rtw89_mac_c2h_bcn_upd_done(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
> +{
> +}
> +
>  static void
>  rtw89_mac_c2h_pkt_ofld_rsp(struct rtw89_dev *rtwdev, struct sk_buff *skb_c2h,
>  			   u32 len)
> @@ -5257,6 +5262,11 @@ rtw89_mac_c2h_pkt_ofld_rsp(struct rtw89_dev *rtwdev, struct sk_buff *skb_c2h,
>  	rtw89_complete_cond(wait, cond, &data);
>  }
>  
> +static void
> +rtw89_mac_c2h_bcn_resend(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len)
> +{
> +}
> +
>  static void
>  rtw89_mac_c2h_tx_duty_rpt(struct rtw89_dev *rtwdev, struct sk_buff *skb_c2h, u32 len)
>  {
> @@ -5646,7 +5656,7 @@ void (* const rtw89_mac_c2h_ofld_handler[])(struct rtw89_dev *rtwdev,
>  	[RTW89_MAC_C2H_FUNC_EFUSE_DUMP] = NULL,
>  	[RTW89_MAC_C2H_FUNC_READ_RSP] = NULL,
>  	[RTW89_MAC_C2H_FUNC_PKT_OFLD_RSP] = rtw89_mac_c2h_pkt_ofld_rsp,
> -	[RTW89_MAC_C2H_FUNC_BCN_RESEND] = NULL,
> +	[RTW89_MAC_C2H_FUNC_BCN_RESEND] = rtw89_mac_c2h_bcn_resend,
>  	[RTW89_MAC_C2H_FUNC_MACID_PAUSE] = rtw89_mac_c2h_macid_pause,
>  	[RTW89_MAC_C2H_FUNC_SCANOFLD_RSP] = rtw89_mac_c2h_scanofld_rsp,
>  	[RTW89_MAC_C2H_FUNC_TX_DUTY_RPT] = rtw89_mac_c2h_tx_duty_rpt,
> @@ -5661,6 +5671,7 @@ void (* const rtw89_mac_c2h_info_handler[])(struct rtw89_dev *rtwdev,
>  	[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,
> +	[RTW89_MAC_C2H_FUNC_BCN_UPD_DONE] = rtw89_mac_c2h_bcn_upd_done,
>  };
>  
>  static
> diff --git a/drivers/net/wireless/realtek/rtw89/mac.h b/drivers/net/wireless/realtek/rtw89/mac.h
> index 241e89983c4a..25fe5e5c8a97 100644
> --- a/drivers/net/wireless/realtek/rtw89/mac.h
> +++ b/drivers/net/wireless/realtek/rtw89/mac.h
> @@ -419,6 +419,7 @@ enum rtw89_mac_c2h_info_func {
>  	RTW89_MAC_C2H_FUNC_DONE_ACK,
>  	RTW89_MAC_C2H_FUNC_C2H_LOG,
>  	RTW89_MAC_C2H_FUNC_BCN_CNT,
> +	RTW89_MAC_C2H_FUNC_BCN_UPD_DONE = 0x06,
>  	RTW89_MAC_C2H_FUNC_INFO_MAX,
>  };
>  

It's not how I would fix it, but fine with me.

Reviewed-by: Sean Anderson <sean.anderson@xxxxxxxxx>




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux