Subject: Re: [PATCH] d80211: Fix inconsistent sta_lock usage

From: Christoph Hellwig <[email-masked]>
Date: Tue, 2 Jan 2007 16:22:01 +0000

On Tue, Jan 02, 2007 at 04:30:41PM +0100, Ivo Van Doorn wrote:
> +static inline void __bss_tim_set(struct ieee80211_local *local,
> +				 struct ieee80211_if_ap *bss, int aid)
> +{
> +	bss->tim[(aid)/8] |= 1<<((aid) % 8);
> +}

This really screams to be converted to __set_bit.  Also the local
argument is entirely unused.  I'd probaby not even add a helper for
this but just opencode it as:

	__set_bit(&bss->time, aid);

> +static inline void __bss_tim_clear(struct ieee80211_local *local,
> +				   struct ieee80211_if_ap *bss, int aid)
> +{
> +	bss->tim[(aid)/8] &= !(1<<((aid) % 8));

Similarly this should just be __clear_bit