Skip to contentSkip to conversation

rt2x00: do not set timestamp for injected frames

PATCH In review [email protected] 2 participants 2 messages May 4, 2021 – Jun 15, 2021 Ralink RT2X00 wireless LAN driver

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 rt2x00: do not set timestamp for injected frames

From: Stanislaw Gruszka <[email protected]>

We setup hardware to insert TSF timestamp for beacon and probe response frames. This is undesired for injected frames, which might want to set their own timestamp values, so disable this setting for injected frames.

---
 drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/ralink/rt2x00/rt2x00queue.c +3 -2
index d4d389e8f1b4..fb1d31b2d52a 100644
@@ -446,8 +446,9 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 	 * Beacons and probe responses require the tsf timestamp
 	 * to be inserted into the frame.
 	 */
-	if (ieee80211_is_beacon(hdr->frame_control) ||
-	    ieee80211_is_probe_resp(hdr->frame_control))
+	if ((ieee80211_is_beacon(hdr->frame_control) ||
+	     ieee80211_is_probe_resp(hdr->frame_control)) &&
+	    !(tx_info->flags & IEEE80211_TX_CTL_INJECTED))
 		__set_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags);
 
 	if ((tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) &&
Signature · 1 line
2.25.4
#1 lore raw
Quoted 10 lines · [email protected] wrote:

From: Stanislaw Gruszka <[email protected]>

We setup hardware to insert TSF timestamp for beacon and probe response frames. This is undesired for injected frames, which might want to set their own timestamp values, so disable this setting for injected frames.

Patch applied to wireless-drivers-next.git, thanks.

7af305a1245a rt2x00: do not set timestamp for injected frames

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

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