linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@linux.dev>
To: Ping-Ke Shih <pkshih@realtek.com>, linux-wireless@vger.kernel.org
Cc: rtl8821cerfe2@gmail.com
Subject: Re: [PATCH rtw-next 2/2] wifi: rtw89: add dummy C2H handlers for BCN resend and update done
Date: Mon, 4 Aug 2025 14:39:53 -0400	[thread overview]
Message-ID: <c523eee7-1eaa-4114-bfeb-b354cc970b94@linux.dev> (raw)
In-Reply-To: <20250804012234.8913-3-pkshih@realtek.com>

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@gmail.com>
> Closes: https://lore.kernel.org/linux-wireless/d2d62793-046c-4b55-93ed-1d1f43cff7f2@gmail.com/
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
>  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@linux.dev>

      reply	other threads:[~2025-08-04 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-04  1:22 [PATCH rtw-next 0/2] wifi: rtw89: only print once for unknown C2H events Ping-Ke Shih
2025-08-04  1:22 ` [PATCH rtw-next 1/2] wifi: rtw89: print just " Ping-Ke Shih
2025-08-04 18:40   ` Sean Anderson
2025-08-12  8:20   ` Ping-Ke Shih
2025-08-04  1:22 ` [PATCH rtw-next 2/2] wifi: rtw89: add dummy C2H handlers for BCN resend and update done Ping-Ke Shih
2025-08-04 18:39   ` Sean Anderson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c523eee7-1eaa-4114-bfeb-b354cc970b94@linux.dev \
    --to=sean.anderson@linux.dev \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).