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

From: Jan Kiszka <[email-masked]>
Date: Sat, 06 Jan 2007 17:33:28 +0100

Ivo van Doorn wrote:
> +#define __bss_tim_set(__bss, __aid)	__set_bit((__aid), &(__bss)->tim)
> +

__set/clear_bit demands unsigned long, tim is u8. That causes quite some
warnings here.

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

Probably forgotten: we need _bh here as well.

Jan