Skip to contentSkip to conversation

Question on power-save

DISCUSSION Ben Greear 2 participants 2 messages Jan 27, 2011

lore
Share & tools
lore

Ben Greear

author
#0 lore raw

I was looking at this ps_enable method:

static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata)

{
	struct ieee80211_local *local = sdata->local;
	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

	local->offchannel_ps_enabled = false;

	/* FIXME: what to do when local->pspolling is true? */

	del_timer_sync(&local->dynamic_ps_timer);
	del_timer_sync(&ifmgd->bcn_mon_timer);
	del_timer_sync(&ifmgd->conn_mon_timer);

	cancel_work_sync(&local->dynamic_ps_enable_work);

	if (local->hw.conf.flags & IEEE80211_CONF_PS) {
		local->offchannel_ps_enabled = true;
		local->hw.conf.flags &= ~IEEE80211_CONF_PS;
		ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
	}

I must be missing something, but it appears that the code above _disables_ power-save instead of enables it?

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#1 lore raw
Quoted 3 lines · Ben Greear

I was looking at this ps_enable method:

static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata)

If you read the comment in front of the function, is it clearer?

Yes, it disables PS locally, but it tells the AP we've gone to PS.

johannes