[PATCH 2/3] staging: brcm80211: removed locks around Mac80211 calls

Arend van Spriel arend at broadcom.com
Wed Feb 23 20:24:45 UTC 2011


On Wed, 23 Feb 2011 17:01:23 +0100, Dan Carpenter <error27 at gmail.com>
wrote:

> On Wed, Feb 23, 2011 at 12:48:52PM +0100, Roland Vossen wrote:
>> @@ -185,9 +183,8 @@ static void wl_ops_stop(struct ieee80211_hw *hw)
>>  {
>>  	struct wl_info *wl = hw->priv;
>
> wl isn't used any more.  It causes a compile warning.
>
> drivers/staging/brcm80211/brcmsmac/wl_mac80211.c: In function  
> ‘wl_ops_stop’:
> drivers/staging/brcm80211/brcmsmac/wl_mac80211.c:186: warning: unused  
> variable ‘wl’
>
>>  	ASSERT(wl);

It is actually used in the statement above but only when CONFIG_BRCMDBG=y.

>
>>  }
>>
>>  static int
>> @@ -1988,8 +1985,10 @@ bool wl_rfkill_set_hw_state(struct wl_info *wl)
>>
>>  	WL_NONE("%s: update hw state: blocked=%s\n", __func__,
>>  		blocked ? "true" : "false");
>> +	WL_UNLOCK(wl);
>
> This is called from wlc_dpc() without the lock held, so the unlock here
> doesn't seem right.  What's this lock protecting here anyway?
>

Actually, wlc_dpc() is called from wl_dpc() which holds the lock.

Gr. AvS
-- 
"The most merciful thing in the world, I think, is the inability of the
human
mind to correlate all its contents." - "The Call of Cthulhu"




More information about the devel mailing list