Thread (3 messages) 3 messages, 2 authors, 2012-07-27

Re: [PATCH] mac80211: add PS flag to bss_conf

From: Eliad Peller <hidden>
Date: 2012-07-27 06:56:24

On Thu, Jul 26, 2012 at 8:47 PM, Johannes Berg
[off-list ref] wrote:
On Wed, 2012-07-25 at 18:49 +0300, Eliad Peller wrote:
quoted
@@ -2085,6 +2092,9 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,

      ieee80211_recalc_ps(local, -1);

+     sdata->vif.bss_conf.ps = ieee80211_powersave_allowed(sdata);
+     ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_PS);
It need not have changed, since the AP could be broken? We might also
not even be associated, so I don't think this is right.
sure i'll fix it.
i think i'll just refactor this code to ieee80211_recalc_ps_vif() that
will do the recalc-and-notify-if-changed instead of duplicating it
each time.
I also wonder if ieee80211_recalc_ps() should use vif.bss_conf.ps
instead of calling powersave_allowed() itself?
i think we should better keep them decoupled. this way we can change
the per-vif functionality without affecting the legacy per-device one.

Eliad.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help