Search Linux Wireless

Re: [PATCH 1/6] wifi: rtw88: use struct instead of macros to set TX desc

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

 



On Fri, 2023-06-16 at 14:10 +0300, Bitterblue Smith wrote:
> 
> On 16/06/2023 06:44, Ping-Ke Shih wrote:
> > From: Po-Hao Huang <phhuang@xxxxxxxxxxx>
> > 
> > Remove macros that set TX descriptors. Use struct and
> > le32_encode_bits() with mask definitions.
> > 
> > Signed-off-by: Po-Hao Huang <phhuang@xxxxxxxxxxx>
> > Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> > ---
> >  drivers/net/wireless/realtek/rtw88/rtw8723d.c |   5 +-
> >  drivers/net/wireless/realtek/rtw88/tx.c       |  79 +++++++-----
> >  drivers/net/wireless/realtek/rtw88/tx.h       | 121 +++++++-----------
> >  drivers/net/wireless/realtek/rtw88/usb.c      |  12 +-
> >  4 files changed, 104 insertions(+), 113 deletions(-)
> > 
> 
> [...]
> 
> > diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c
> > index 976eafa739a2d..dbfd5576cc120 100644
> > --- a/drivers/net/wireless/realtek/rtw88/usb.c
> > +++ b/drivers/net/wireless/realtek/rtw88/usb.c
> > @@ -24,11 +24,12 @@ struct rtw_usb_txcb {
> >  static void rtw_usb_fill_tx_checksum(struct rtw_usb *rtwusb,
> >                                    struct sk_buff *skb, int agg_num)
> >  {
> > +     struct rtw_tx_desc *tx_desc = (struct rtw_tx_desc *)skb->data;
> >       struct rtw_dev *rtwdev = rtwusb->rtwdev;
> >       struct rtw_tx_pkt_info pkt_info;
> > 
> > -     SET_TX_DESC_DMA_TXAGG_NUM(skb->data, agg_num);
> > -     pkt_info.pkt_offset = GET_TX_DESC_PKT_OFFSET(skb->data);
> > +     le32_replace_bits(tx_desc->w7, agg_num, RTW_TX_DESC_W7_TXDESC_CHECKSUM);
> 
> This looks like the wrong mask. Should it be RTW_TX_DESC_W7_DMA_TXAGG_NUM ?

That is wrong indeed. Also, should use le32p_replace_bits() instead. 
We have sent v2 to correct them. 
Thanks for pointing out this. 

> 
> > +     pkt_info.pkt_offset = le32_get_bits(tx_desc->w1, RTW_TX_DESC_W1_PKT_OFFSET);
> >       rtw_tx_fill_txdesc_checksum(rtwdev, &pkt_info, skb->data);
> >  }
> > 
> 
> ------Please consider the environment before printing this e-mail.




[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