From: Grazvydas Ignotas Date: Sun, 7 Jun 2015 00:39:52 +0000 (+0300) Subject: wl1251: allow to disable dynamic ps X-Git-Tag: sz_173~41 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=7e0d48a08c817b34136922a3ec7238df90996226 wl1251: allow to disable dynamic ps Some people with CC units reported they get better wifi without dynamic PS enabled, so allow to disable it. I guess this could be related to missing clock driver resistor tweak, which breaks chip's own PS. --- diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c index 42b8df58da31..e7f1818ad29e 100644 --- a/drivers/net/wireless/wl1251/main.c +++ b/drivers/net/wireless/wl1251/main.c @@ -43,6 +43,13 @@ #include "debugfs.h" #include "boot.h" +static bool use_fw_ps = true; +module_param(use_fw_ps, bool, 0644); +MODULE_PARM_DESC(use_fw_ps, "Enable powersave once and leave it for chip's " + "firmware to manage. When disabled, mac80211 " + "will toggle powersave on tx activity instead. " + "Default: y/Y/1"); + void wl1251_enable_interrupts(struct wl1251 *wl) { wl->if_ops->enable_irq(wl); @@ -1596,11 +1603,13 @@ int wl1251_init_ieee80211(struct wl1251 *wl) wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_SUPPORTS_PS | - IEEE80211_HW_SUPPORTS_DYNAMIC_PS | IEEE80211_HW_BEACON_FILTER | IEEE80211_HW_SUPPORTS_UAPSD | IEEE80211_HW_SUPPORTS_CQM_RSSI; + if (use_fw_ps) + wl->hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_PS; + wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); wl->hw->wiphy->max_scan_ssids = 1;