Search Linux Wireless

mwifiex & cfg80211: Problems with power save mode

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

 



Hello!

I'm looking at power save mode provided by mwifiex driver and I see that
current implementation is suboptimal and probably default settings quite
suspicious for me.

If I understand mwifiex driver correctly, it supports power save mode,
but its setting is global for all interfaces. mwifiex is fullmac driver
and power save mode is controlled by firmware and it is not possible to
set it per-bssid. There is just command which affects all bssids.
Ganapathi, please correct me if I'm wrong here.

On the other hand, current cfg80211 layer supports controlling power
save mode by NL80211_CMD_SET_POWER_SAVE and NL80211_CMD_GET_POWER_SAVE
commands, which are per-net-interface, not per-wiphy-interface.

Moreover NL80211_CMD_GET_POWER_SAVE does not use any driver callback,
just use cached value from the last NL80211_CMD_SET_POWER_SAVE call. So
kernel driver cannot provide correct state of power save by asking
firmware for it.

So currently it is not possible to implement power save mode for mwifiex
driver correctly when more bssid interfaces for wiphy are used.

Current situation is following: If I create two wlan interfaces (wlan0
and wlan1) for mwifiex wiphy and turn power save just only for wlan0
then mwifiex turn power save for both wlan0 and wlan1 (as firmware does
not support per-bssid powe save), but cfg80211 for wlan1 still inform
that power save is enabled.

Do you have any idea how to fix this issue "properly"? So kernel would
not lay about power save state of mwifiex interfaces? I guess that some
extension or modification would be needed to core wireless cfg80211
code.


And I have another question about power save. How should be handled
WIPHY_FLAG_PS_ON_BY_DEFAULT flag? I see that kernel by default set it
based on CONFIG_CFG80211_DEFAULT_PS compile option. But mwifiex driver
always enable it independently of how is CONFIG_CFG80211_DEFAULT_PS was
set at compile time.

Should mwifiex driver respect CONFIG_CFG80211_DEFAULT_PS compile time
option and do not enable WIPHY_FLAG_PS_ON_BY_DEFAULT when
CONFIG_CFG80211_DEFAULT_PS is not set to power save?


And the last question about power save mode and mwifiex. As power save
mode for mwifiex firmware is global for all interfaces, what should be
the correct behavior when there is wlan0 interface in managed/sta mode
with enabled power save mode and then user add a new wlan1 interface in
AP mode? Should driver turn off power save mode automatically (as it AP
with enabled power save mode may cause problems) or should power save
mode stay enabled (as user explicitly did not turned it off for wlan0)?

And what should be the correct behavior when there are two interfaces
wlan0 and wlan1, both have power save mode turned off and user try to
enable power save mode just for wlan0? Should mwifiex driver turn power
save mode and therefore enable it for both wlan0 and wlan1? Or it should
not enable power save mode until command is send for both wlan0 and
wlan1 interfaces?



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux