Search Linux Wireless

Re: [PATCH] wifi: mac80211: support ieee80211_ext format

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

 



Going through all the old patches ...


> +	const u8 *addr;
> +
> +	if (ieee80211_is_s1g_beacon(hdr->frame_control)) {
> +		struct ieee80211_ext *ext_hdr = (struct ieee80211_ext *)skb->data;

nit: can just use void * cast.

for reference below:

> +		addr = ext_hdr->u.s1g_beacon.sa;


> -	if (ieee80211_is_mgmt(fc)) {
> +	if (ieee80211_is_mgmt(fc) || ieee80211_is_ext(fc)) {
>  		/* drop frame if too short for header */
>  		if (skb->len < ieee80211_hdrlen(fc))
> 

I don't understand the addition of this check in this patch.

ieee80211_hdrlen() just ensures that you have _four_ bytes header for an
ext frame. So maybe that makes sense on its own, but above you're
casting to struct ieee80211_ext * and then using the u.s1g_beacon thing,
so you need to ensure many more bytes are present _somewhere_?

johannes




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

  Powered by Linux