suspend/resume support in mac80211
Hi,
we have recently been struggling with getting suspend/resume working in rt2x00. A few questions:
1. What is the recommended scheme for implementing suspend/resume with mac80211? Some drivers (p54, iwlwifi) call ieee80211_stop_queues(). rt2x00 is currently doing so, but it doesn't seem to be enough: mac80211 calls back into rt2x00 while the device is suspended, resulting in chaos.
2. Are there any mac80211 drivers that suspend/resume properly? Also when associated?
3. Shouldn't mac80211 be made suspend/resume-aware (AFAIK it is not), so we can do things like disassociating during suspend and reassociating when resuming? I'd like something in the spirit of netif_device_detach()/netif_device_attach(). Comments?
Cheers,
Mattias
Quoted 4 lines · Mattias Nissler
Hi,
we have recently been struggling with getting suspend/resume working in rt2x00. A few questions:
There is no suspend/resume support in mac80211.
Quoted 2 lines
1. What is the recommended scheme for implementing suspend/resume with mac80211? Some drivers (p54, iwlwifi) call
ieee80211_stop_queues().
Calling stop_queues() from outside of the TX handler may deadlock. That is a bug in mac80211. I don't think it has been fixed, yet.
Quoted 7 lines
2. Are there any mac80211 drivers that suspend/resume properly? Also when associated?
3. Shouldn't mac80211 be made suspend/resume-aware (AFAIK it is not), so we can do things like disassociating during suspend and reassociating when resuming? I'd like something in the spirit of netif_device_detach()/netif_device_attach(). Comments?
I think we should have a API call to mac80211 that suspends the stack (saves the state etc..) and a call the resumes (reassociates, re-handshakes...). But that's probably not that easy to implement, as parts of this does happen in userspace.
Quoted 4 lines · Michael Buesch
Quoted 2 lines
we have recently been struggling with getting suspend/resume working in rt2x00. A few questions:
There is no suspend/resume support in mac80211.
Wow, that's really bad news.
Are there plans for it?
Quoted 4 lines
Quoted 1 line
3. Shouldn't mac80211 be made suspend/resume-aware
I think we should have a API call to mac80211 that suspends the stack (saves the state etc..)
Would it be enough to add a suspended state and functions for entering/exiting the state? On transitions, the appropriate driver level functions are called of course.
Quoted 3 lines
and a call the resumes (reassociates, re-handshakes...). But that's probably not that easy to implement, as parts of this does happen in userspace.
Shouldn't that be handled by hotplugging then?
(I'm not on linux-wireless, but rt2400-devel, no need to cc if you crosspost.)
//Peter
Quoted 4 lines · Michael Buesch
I think we should have a API call to mac80211 that suspends the stack (saves the state etc..) and a call the resumes (reassociates, re-handshakes...). But that's probably not that easy to implement, as parts of this does happen in userspace.
At the minimum it should be resetting the keys. Reassocation etc. could probably be done as well if using the in-kernel MLME.
johannes