[rt2x00-users] [RFC PATCH repeat] rt2x00: FIF_PSPOLL filter flag support

Ivo van Doorn ivdoorn at gmail.com
Sat Aug 1 12:26:38 EST 2009


Hi,

>  	/*
> +	 * Driver capabilities
> +	 */
> +	DRIVER_HAS_MULTIPLE_CONTROL_FILTER,
> +	DRIVER_HAS_PSPOLL_FILTER,

<...snip...>
>  	/*
> +	 * If the device has a single filter for all control frames,
> +	 * FIF_CONTROL and FIF_PSPOLL flags imply each other.
> +	 * And if the device has more than one filter for control frames
> +	 * of different types, but has no a separate filter for PS Poll frames,
> +	 * FIF_CONTROL flag implies FIF_PSPOLL.
> +	 */
> +	if (!test_bit(DRIVER_HAS_MULTIPLE_CONTROL_FILTER, &rt2x00dev->flags)) {
> +		if (*total_flags & FIF_CONTROL ||
> +			*total_flags & FIF_PSPOLL)
> +			*total_flags |= FIF_CONTROL | FIF_PSPOLL;
> +	} else if (!test_bit(DRIVER_HAS_PSPOLL_FILTER, &rt2x00dev->flags)) {
> +		if (*total_flags & FIF_CONTROL)
> +			*total_flags |= FIF_PSPOLL;
> +	}

I don't see the need for DRIVER_HAS_MULTIPLE_CONTROL_FILTER, all drivers support
the CONTROL filter, only a few others support more fine-grained levels for PSPOLL.

So isn't having a DRIVER_SUPPORT_PSPOLL_FILTER flag sufficient?
That way if the driver sets the flag we can handle the FIF_ flags individually,
otherwise havign FIF_CONTROL implies FIF_PSPOLL and FIF_PSPOLL implies FIF_CONTROL.

You also said that rt2500usb and rt73usb work with this patch, seeing that you
made no changes to rt2500usb and the PSPOLL filter support works the same in both
devices the usage of DRIVER_HAS_MULTIPLE_CONTROL_FILTER suggests it isn't
needed. ;)

That will make your patch a bit easier since you won't need to change anything
to rt61pci and rt73usb. ;)

Ivo



More information about the users mailing list