Article 6P3JY [net: rtw88] hwstamps value in RX side

[net: rtw88] hwstamps value in RX side

by
Dohyun Pyun
from LinuxQuestions.org on (#6P3JY)
I am porting the wifi-ptp solution implemented based on ath9k to operate in the RTL8822BU dongle.
https://github.com/zlab-pub/wifi-ptp?tab=readme-ov-file

By modifying ptp and driver on the TX side, Although it was confirmed that the TX PTP packet contains the time stamp value and is transmitted.

drivers/net/wireless/realtek/rtw88/usb.c
static int rtw_usb_tx_write(struct rtw_dev *rtwdev,
struct rtw_tx_pkt_info *pkt_info,
struct sk_buff *skb)
{
...
if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) {
skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
struct skb_shared_hwtstamps shhwtstamps;
ktime_t currtime = ktime_get_real();
shhwtstamps.hwtstamp = currtime;
skb_tstamp_tx(skb, &shhwtstamps);
rtw_err(rtwdev, "###TEST rtw_usb_tx_write() hwtstamp: %llu\n", skb_hwtstamps(skb)->hwtstamp);
}
skb_tx_timestamp(skb);

But the rtw88 driver on the RX side cannot check the hwstamps value.

drivers/net/wireless/realtek/rtw88/usb.c
static void rtw_usb_rx_handler(struct work_struct *work)
skb = skb_dequeue(&rtwusb->rx_queue);
rx_desc = skb->data;
chip->ops->query_rx_desc(rtwdev, rx_desc, &pkt_stat, &rx_status);
// skb_hwtstamps(skb)->hwtstamp // Try to print out this value, but no information

I found this definition to get RX desc TSFL, and tried to use this in RX descriptor. But, still can't get the proper value. Only see 0 (zero).
rtw88/rx.h:41:#define GET_RX_DESC_TSFL(rxdesc)

So, I want to ask the following.

1. Whether to transmit the RX hwtstamp to the driver end in the existing RTL8822BU chip
2. If so, which function and how it is possible to obtain hwtstamp
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments