diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index c32889a1e39c..6b1082797861 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -551,6 +551,13 @@ struct hwsim_radiotap_hdr { u8 rt_rate; __le16 rt_channel; __le16 rt_chbitmask; + __le16 reserved; + struct { + __le64 ts; + __le16 accuracy; + u8 unit_pos; + u8 flags; + } ts; } __packed; struct hwsim_radiotap_ack_hdr { @@ -831,6 +838,7 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw, hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | (1 << IEEE80211_RADIOTAP_RATE) | (1 << IEEE80211_RADIOTAP_TSFT) | + BIT(22) | (1 << IEEE80211_RADIOTAP_CHANNEL)); hdr->rt_tsft = __mac80211_hwsim_get_tsf(data); hdr->rt_flags = 0; @@ -842,6 +850,10 @@ static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw, else flags |= IEEE80211_CHAN_CCK; hdr->rt_chbitmask = cpu_to_le16(flags); + hdr->ts.ts = cpu_to_le64(ktime_get_boot_ns()); + hdr->ts.accuracy = 0; + hdr->ts.unit_pos = 0x22; + hdr->ts.flags = 0x02; skb->dev = hwsim_mon; skb_set_mac_header(skb, 0);