Search Linux Wireless

Re: [PATCH 2/2] mac80211: make rx radiotap header more flexible

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

 



> +static void
> +ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
> +				 struct sk_buff *skb,
> +				 struct ieee80211_rx_status *status,
> +				 struct ieee80211_rate *rate,
> +				 int rtap_len)
> +{
> +	struct ieee80211_radiotap_header *rthdr;
> +	unsigned char *pos;
> +
> +	rthdr = (struct ieee80211_radiotap_header *)skb_push(skb, rtap_len);
> +	memset(rthdr, 0, rtap_len);
> +
> +	/* radiotap header, set always present flags */
> +	rthdr->it_present =
> +		cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) |
> +			    (1 << IEEE80211_RADIOTAP_RATE) |
> +			    (1 << IEEE80211_RADIOTAP_CHANNEL) |
> +			    (1 << IEEE80211_RADIOTAP_ANTENNA) |
> +			    (1 << IEEE80211_RADIOTAP_RX_FLAGS));

Is all this alignment-safe now? Not sure it was before but it'd be nice
if we could fix it up.

Radiotap explicitly allows you to have a longer length than you need so
maybe we should just make sure to align things?

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux