Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has
been enabled for this skb. This is a common practice in handling TX
timestamp. It fixes the issue where normal socks that aren't
expecting a timestamp will not wake up on select.
Fixed if statement, modified commit description and tested.
- Harini
Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
/* First, update TX stats if needed */
if (skb) {
- if (gem_ptp_do_txstamp(queue, skb, desc) == 0) {
+ if (unlikely(skb_shinfo(skb)->tx_flags &
+ SKBTX_HW_TSTAMP) &&
+ (gem_ptp_do_txstamp(queue, skb, desc) == 0)) {
/* skb now belongs to timestamp buffer
* and will be removed later
*/