Search Linux Wireless

Re: [PATCHv3 1/2] mac80211_hwsim: Add tsf to beacons, probe responses and radiotap header.

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

 



Oops, just saw something else:

>  struct hwsim_radiotap_hdr {
>  	struct ieee80211_radiotap_header hdr;
> +	u64 rt_tsft;

That should be __le64

> @@ -779,6 +805,11 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
>  		return;
>  	info = IEEE80211_SKB_CB(skb);
>  
> +	/* add the timestamp to the beacon */
> +	hdr = (struct ieee80211_hdr_3addr *) skb->data;
> +	tsfpos = (__le64 *) (hdr + 1);
> +	put_unaligned(__mac80211_hwsim_get_tsf(data), tsfpos);
> +

And I saw this but wondered ... maybe it should just be

struct ieee80211_mgmt *mgmt = skb->data;

mgmt->u.beacon.timestamp = __mac80211_hwsim_get_tsf(data);

as you then also don't need the unaligned trick since the struct is
packed.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux