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

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

 



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);
> -	WL_LOCK(wl);
>  	ieee80211_stop_queues(hw);
> -	WL_UNLOCK(wl);
> +	return;
        ^^^^^^
not needed.

>  }
>  
>  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?

regards,
dan carpenter

>  	wiphy_rfkill_set_hw_state(wl->pub->ieee_hw->wiphy, blocked);
>  	if (blocked)
>  		wiphy_rfkill_start_polling(wl->pub->ieee_hw->wiphy);
> +	WL_LOCK(wl);
>  	return blocked;
>  }

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux