All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: <ku920601@realtek.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 3/9] rtw89: coex: Add logic to parsing rtl8852c firmware type ctrl report
Date: Fri, 02 Sep 2022 09:32:53 +0300	[thread overview]
Message-ID: <87tu5qb816.fsf@kernel.org> (raw)
In-Reply-To: <20220725023509.43114-4-pkshih@realtek.com> (Ping-Ke Shih's message of "Mon, 25 Jul 2022 10:35:03 +0800")

Ping-Ke Shih <pkshih@realtek.com> writes:

> From: Ching-Te Ku <ku920601@realtek.com>
>
> Add a part of logic to parse type of ctrl report from firmware, and
> remove Bluetooth packet counter count from driver, the feature was
> moved to firmware at rtl8852c.
>
> Signed-off-by: Ching-Te Ku <ku920601@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
>  drivers/net/wireless/realtek/rtw89/coex.c     | 44 +++++++++++--
>  drivers/net/wireless/realtek/rtw89/core.h     | 63 +++++++++++++++++--
>  drivers/net/wireless/realtek/rtw89/rtw8852c.c | 18 +-----
>  3 files changed, 98 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
> index f9c67aa1570dd..020b2628ef2c4 100644
> --- a/drivers/net/wireless/realtek/rtw89/coex.c
> +++ b/drivers/net/wireless/realtek/rtw89/coex.c
> @@ -876,7 +876,9 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev,
>  	struct rtw89_btc_dm *dm = &btc->dm;
>  	struct rtw89_btc_rpt_cmn_info *pcinfo = NULL;
>  	struct rtw89_btc_wl_info *wl = &btc->cx.wl;
> -	struct rtw89_btc_fbtc_rpt_ctrl *prpt = NULL;
> +	struct rtw89_btc_bt_info *bt = &btc->cx.bt;
> +	struct rtw89_btc_fbtc_rpt_ctrl *prpt;
> +	struct rtw89_btc_fbtc_rpt_ctrl_v1 *prpt_v1;
>  	struct rtw89_btc_fbtc_cysta *pcysta_le32 = NULL;
>  	struct rtw89_btc_fbtc_cysta_cpu pcysta[1];
>  	struct rtw89_btc_prpt *btc_prpt = NULL;
> @@ -907,8 +909,13 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev,
>  	switch (rpt_type) {
>  	case BTC_RPT_TYPE_CTRL:
>  		pcinfo = &pfwinfo->rpt_ctrl.cinfo;
> -		pfinfo = (u8 *)(&pfwinfo->rpt_ctrl.finfo);
> -		pcinfo->req_len = sizeof(pfwinfo->rpt_ctrl.finfo);
> +		if (chip->chip_id == RTL8852A) {
> +			pfinfo = (u8 *)(&pfwinfo->rpt_ctrl.finfo);
> +			pcinfo->req_len = sizeof(pfwinfo->rpt_ctrl.finfo);
> +		} else {
> +			pfinfo = (u8 *)(&pfwinfo->rpt_ctrl.finfo_v1);
> +			pcinfo->req_len = sizeof(pfwinfo->rpt_ctrl.finfo_v1);
> +		}

That u8 cast is not really pretty, shouldn't pfinfo be a void pointer
and then all these casts could be avoided? But of course that's not
introduced by this patch so need to resend the patch because of this.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2022-09-02  6:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  2:35 [PATCH v2 0/9] rtw89: coex: add materials to support 8852C Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 1/9] rtw89: coex: update radio state for RTL8852A/RTL8852C Ping-Ke Shih
2022-09-02  8:33   ` Kalle Valo
2022-07-25  2:35 ` [PATCH v2 2/9] rtw89: coex: Move Wi-Fi firmware coexistence matching version to chip Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 3/9] rtw89: coex: Add logic to parsing rtl8852c firmware type ctrl report Ping-Ke Shih
2022-09-02  6:32   ` Kalle Valo [this message]
2022-09-02 12:51     ` Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 4/9] rtw89: coex: Define BT B1 slot length Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 5/9] rtw89: coex: Add v1 version TDMA format and parameters Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 6/9] rtw89: coex: update WL role info v1 for RTL8852C branch using Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 7/9] rtw89: coex: Move _set_policy to chip_ops Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 8/9] rtw89: coex: Add v1 Wi-Fi SCC coexistence policy Ping-Ke Shih
2022-07-25  2:35 ` [PATCH v2 9/9] rtw89: coex: Update Wi-Fi driver/firmware TDMA cycle report for RTL8852c Ping-Ke Shih

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=87tu5qb816.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ku920601@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.