WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power...

18
Linux Wireless Linux Wireless WLAN Power Save Mode in Linux Kalle Valo kalle.valo@iki.fi ([email protected]) FUDCon Berlin 2009

Transcript of WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power...

Page 1: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux WirelessLinux Wireless

WLAN Power Save Mode in Linux

Kalle [email protected]([email protected])

FUDCon Berlin 2009

Page 2: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

Outline

1 Introduction

2 Status

3 Future

Linux Wireless

Page 3: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

IntroductionIntroduction

Linux Wireless

Page 4: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

IntroductionWhy?

• Total system power consumption of Nokia N800 (stlc45xx,mac80211, 2.6.29-omap-wl):

0

200

400

600

800

1000

1200

PSM off PSM on PSM + beacon filter WLAN off

pow

er (

mW

)

Linux Wireless

Page 5: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

IntroductionPower Save Mode (PSM) simplified

• client informs Access Point (AP) of the PSM status with a flag inFrame Control header

• AP buffers all unicast, broadcast and multicast frames• AP informs of buffered unicast frames with TIM bits in beacons• AP sends broadcast and multicast frames immediately after the

DTIM beacons with a special TIM bit set• AP sends buffered unicast frames either when client wakes up or

requests them with a PS-Poll frame

Linux Wireless

Page 6: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

IntroductionPSM example

Linux Wireless

Page 7: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

IntroductionDownsides

• few ms latency in transmission due to firmware wakeup (dependson hardware)

• hundreds of ms latency in receive, depends on:• beacon interval• DTIM period• how often client wakes up for beacons

• broken APs→ strange packet loss• broken firmware and/or HW, timing is very delicate

Linux Wireless

Page 8: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

StatusStatus

Linux Wireless

Page 9: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

StatusDynamic and Static PSM

• timeout > 0→ Dynamic PSM• stays awake a certain period after a last transmission• wakes up with Nullfunc• should not affect throughput• in certain cases increases latency considerably, but user won’t

notice in practise• timeout = 0→ Static PSM

• goes immediately to sleep after transmitting a frame• fetches buffered frames with PS-Poll frame• decreases throughput• increases latency significantly

Linux Wireless

Page 10: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

StatusUser space interface

• Wireless Extensions have power and power timeout:• iwconfig wlan0 power timeout 200m• the dynamic PSM timeout value

• no support in nl80211, yet• network latency PM QoS interface

• /dev/network_latency• how often hardware wakes up for beacons

Linux Wireless

Page 11: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

Statusmac80211 status

• supported HW types:• HW supports PSM (IEEE80211_HW_SUPPORTS_PS)• Stack must create Nullfunc and PS-Poll frames

(IEEE80211_HW_PS_NULLFUNC_STACK)• HW has timers for dynamic PSM transitions

(IEEE80211_HW_SUPPORTS_DYNAMIC_PS)• drivers supporting PSM:

• ath9k• rt2x00• iwlwifi (was disabled due to bugs, just re-enabled today)• stlc45xx (staging, patches pending)• wl1251 (patches pending)

• PSM enabled by default for the drivers which claim to support it,default timeout 500 ms

Linux Wireless

Page 12: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

StatusFullmac driver support

• unknown, any comments?

Linux Wireless

Page 13: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

StatusBeacon filtering

• in softmac beacons are normally forwarded to the host CPU• wakes up CPU unnecessarily• some HWs support a feature to only forward beacons which have

chaned in relevant parts• HW sends an event when beacons are lost

Linux Wireless

Page 14: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

FutureFuture

Linux Wireless

Page 15: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

FutureUnscheduled Automatic Power Save Delivery (U-APSD)

• also known as WMM Power Save• needs QoS support from the applications, otherwise legacy PSM

is used

Linux Wireless

Page 16: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

FutureImprovements to Dynamic Power Save

• an interface for the applications to influence the timeout value• use PM QoS network_latency somehow?

• more advanced algorithm for adaptation• academic papers available

Linux Wireless

Page 17: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

FutureUser space

• nl80211 support• wpa_supplicant:

• support to disable PSM?• configure timeout value?

• more QoS information from applications?

Linux Wireless

Page 18: WLAN Power Save Mode in Linuxlinuxwireless.sipsolutions.net/attachments/en/...Linux Wireless Power Save Mode (PSM) simplified Introduction • client informs Access Point (AP) of

Linux Wireless

Thanks for listening.

Questions?

http://wireless.kernel.org/