Search Linux Wireless

mac80211 and powersaving

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

 



(sorry if this mail is sent twice, but the first attempt was bounced due to html text)

I recently ran into trouble when using the RT73 with powersave enabled.
So I started to investigate the problem and saw the the powersave mode as it was implemented in de rt73usb driver could never function. The rt73usb driver seems to switch to sleep on receival of the IEEE80211_CONF_CHANGE_PS flag, while it should only enable the powersave feature (and essentially, it would go to sleep immediatly). However after the sleep period the rt73usb awakens for receival of a beacon, en then never goes back to sleep.

I discussed this issue with Ivo van Doorn (we discussed it in Dutch, so I won't be including it here) and he suggested to post the issue the to mailing list.

Assuming the powersave implementation of the RT73 is indeed incorrect, I would actually have the following question: Should it not be best if the mac80211 would directly enable and disable the sleep modes of the hardware/driver.

I do realize that this might seriously change a lot of code, but:
- If the driver is responsible for going to and from sleep, it needs to have a notion of the contents of the packets it receives (as it only may go to sleep on a beacon without a "directed_tim"). And thus this would require the driver to implement a lot of code that is already present in the mac80211. - It makes it much easier for drivers to support PS. The driver basically only need to implement a "sleep" and "awake" callback. - Only 3 drivers seem to have a viable PS code (ath9k / iwlwifi / p54). However I only quickly scanned the code. - All Ralink drivers seem to be similar to the rt73usb, that they only go to sleep once.

So, a quick (and very rough) idea:
- The driver should implement an "sleep" and "awake" function
- The driver should inform the mac80211 if it supports sleep and wake and tell if it can do this auto(nomous). - If the driver cannot auto-sleep, the mac80211 should call the sleep callback (likely from "ieee80211_rx_mgmt_beacon()") - If the driver cannot auto-wake, the mac80211 should start a timer to wake the driver - Nullframes will normally also be handled by the mac80211 (unless otherwise specified by the driver)

This would allow almost any hardware to support (dynamic) PS, as all steps performed and managed by the mac80211.

Jelle Martijn Kok

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux