2021-02-24 08:35:24

by Bassem Dawood

[permalink] [raw]
Subject: stall receiving change PS notification

Hi Jahannes, All,

I'm trying to get our WiFi driver to get power save notifications
from the mac80211. For this I have set the below flags:

ieee80211_hw_set(hw, SUPPORTS_PS);
ieee80211_hw_set(hw, PS_NULLFUNC_STACK);

My tracing shows that, once power save is enabled, we get a QoS NULL
Function packet. mac80211 is then waiting for the ACK confirmation of
the packet. However even when this ACK is received (in the tx_status),
no change notification is sent to the driver.

The code below (in __ieee80211_tx_status), indicates that we set the
IEEE80211_STA_NULLFUNC_ACKED flag (for the managed interface), yet we
don't invoke ieee80211_dynamic_ps_enable_work (to notify the change of
PS state).

should we be calling the dynamic_ps_timer again or am I missing something?


if (ieee80211_is_any_nullfunc(fc) &&
ieee80211_has_pm(fc) &&
ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
!(info->flags & IEEE80211_TX_CTL_INJECTED) &&
local->ps_sdata && !(local->scanning)) {
if (info->flags & IEEE80211_TX_STAT_ACK) {
local->ps_sdata->u.mgd.flags |=
IEEE80211_STA_NULLFUNC_ACKED;
} else
mod_timer(&local->dynamic_ps_timer, jiffies +
msecs_to_jiffies(10));
}
}

Thanks
Bassem