[PATCH] staging: brcm80211: BUGFIX for issue that the system is frozen when it trys to enter into suspend mode.

Venkat Rao vrao at broadcom.com
Thu Feb 10 20:23:03 PST 2011


> Why does the system freeze?  That macro just checks if the device is in
> ready mode and if it's not, then it returns -EIO.  I wouldn't expect it
> to freeze, just to print something to dmesg and refuse to suspend.
> 
> What am I missing?

Yes that's correct frozen is not the right terminology. This bug prevents system from entering suspend state (by printing message on those lines to dmesg)

When system enters the suspend mode network layer calls ifdown() followed by cfg80211 layer calling wl_cfg80211_suspend() which is registered as suspend handler for cfg80211 layer

ifdown() call ultimately funnels down to __wl_cfg80211_down() call where WL_STATUS_READY bit is cleared via call to "clear_bit(WL_STATUS_READY, &wl->status)"

But CHECK_SYS_UP()checks WL_STATUS_READY bit thinking it's not ready and returns -EIO from suspend handler which intern prevents entering into system suspend state

CHECK_SYS_UP() is mainly used in the code path where upper layer would request certain wifi related activity to be performed by the firmware, where this calls helps to make sure our firmware would be in ready state to respond to those requests

But in the case of wl_cfg80211_suspend() code path there is no need to check for firmware status for any reason

Regards,
Venkat



More information about the devel mailing list