Search Linux Wireless

Re: [PATCH v2 3/9] rtw89: coex: Add logic to parsing rtl8852c firmware type ctrl report

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

 



On Fri, 2022-09-02 at 09:32 +0300, Kalle Valo wrote:
> Ping-Ke Shih <pkshih@xxxxxxxxxxx> writes:
> 
> > From: Ching-Te Ku <ku920601@xxxxxxxxxxx>
> > 
> > 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@xxxxxxxxxxx>
> > Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> > ---
> >  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.
> 

Thanks for pointing this out, I will change pinfo to void pointer
along with next patchset of coex changes.

Ping-Ke





[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