[PATCH 2/2] brcm80211: Fix for suspend/resume bug

Arend van Spriel arend at broadcom.com
Tue May 3 09:10:01 UTC 2011


On 05/03/2011 09:00 AM, sukeshs at broadcom.com wrote:
> From: Sukesh Srikakula<sukeshs at xl-sj1-20.sj.broadcom.com>
>
> Currently, there are 2 callbacks registered with OS for getting notifications when system goes to suspend/resume.
> Racing between these 2 callbacks leads to failure in the suspend/resume path.
> With this fix, we avoid registering dhd callback for suspend/resume notification when cfg80211 is used. Relevant functionality in dhd suspend/resume callback function is moved to cfg80211 suspend/resume functions.
>
> Signed-off-by: Sukesh Srikakula<sukeshs at broadcom.com>
> Signed-off-by: Sukesh Srikakula<sukeshs at xl-sj1-20.sj.broadcom.com>
> ---
> diff --git a/drivers/staging/brcm80211/brcmfmac/dhd.h b/drivers/staging/brcm80211/brcmfmac/dhd.h
> index 99c38dd..41c55a6 100644
> --- a/drivers/staging/brcm80211/brcmfmac/dhd.h
> +++ b/drivers/staging/brcm80211/brcmfmac/dhd.h
> @@ -123,6 +124,8 @@ typedef struct dhd_pub {
>
>   #if defined(CONFIG_PM_SLEEP)
>
> +extern volatile bool dhd_mmc_suspend;
> +

You probably should run checkpatch.pl on this patch. The volatile 
keyword triggers a warning here. I grepped the fullmac code and this 
variable is only set so what is its purpose (debugging?)? See 
Documentation/volatile-considered-harmful.txt on this topic.

Gr. AvS





More information about the devel mailing list