#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);
goto out_sleep;
}
+ if (intr & WL1251_ACX_INTR_TX_RESULT) {
+ wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_TX_RESULT");
+ wl1251_tx_complete(wl);
+ }
+
if (intr & WL1251_ACX_INTR_RX0_DATA) {
wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_RX0_DATA");
wl1251_rx(wl);
+
+ if ((intr & WL1251_ACX_INTR_RX1_DATA)
+ && skb_queue_len(&wl->tx_queue) > 0)
+ wl1251_tx_work_unlocked(wl, false);
}
if (intr & WL1251_ACX_INTR_RX1_DATA) {
wl1251_rx(wl);
}
- if (intr & WL1251_ACX_INTR_TX_RESULT) {
- wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_TX_RESULT");
- wl1251_tx_complete(wl);
- }
-
if (intr & WL1251_ACX_INTR_EVENT_A) {
wl1251_debug(DEBUG_IRQ, "WL1251_ACX_INTR_EVENT_A");
wl1251_event_handle(wl, 0);
wl1251_debug(DEBUG_IRQ,
"WL1251_ACX_INTR_INIT_COMPLETE");
- while (skb_queue_len(&wl->tx_queue) > 0
- && wl1251_tx_path_status(wl) == 0) {
-
- struct sk_buff *skb = skb_dequeue(&wl->tx_queue);
- if (skb == NULL)
- goto out_sleep;
-
- ret = wl1251_tx_frame(wl, skb);
- if (ret == -EBUSY) {
- skb_queue_head(&wl->tx_queue, skb);
- break;
- } else if (ret < 0) {
- dev_kfree_skb(skb);
- }
- }
+ if (skb_queue_len(&wl->tx_queue) > 0)
+ wl1251_tx_work_unlocked(wl, false);
if (--ctr == 0)
break;
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;