2013-02-14 13:14:19

by Wojciech Dubowik

[permalink] [raw]
Subject: [PATCH] mac80211: fix ieee80211_sta_tx_notify for nullfunc

Function ieee80211_sta_reset_conn_monitor has been
resetting probe_send_count too early and nullfunc
check was never called after succesfull ack.

Reported-by: Magnus Cederlöf <[email protected]>
Signed-off-by: Wojciech Dubowik <[email protected]>
---
net/mac80211/mlme.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index cafefb2..a7fb276 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1637,17 +1637,18 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
if (!ieee80211_is_data(hdr->frame_control))
return;

- if (ack)
- ieee80211_sta_reset_conn_monitor(sdata);
-
if (ieee80211_is_nullfunc(hdr->frame_control) &&
sdata->u.mgd.probe_send_count > 0) {
if (ack)
- sdata->u.mgd.probe_send_count = 0;
+ ieee80211_sta_reset_conn_monitor(sdata);
else
sdata->u.mgd.nullfunc_failed = true;
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+ return;
}
+
+ if (ack)
+ ieee80211_sta_reset_conn_monitor(sdata);
}

static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
--
1.7.10.4



2013-02-14 14:16:38

by Magnus Cederlöf

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix ieee80211_sta_tx_notify for nullfunc

> Function ieee80211_sta_reset_conn_monitor has been
> resetting probe_send_count too early and nullfunc
> check was never called after succesfull ack.

I can confirm that the patch fixes the power save problem I had.

Thanks,
Magnus

2013-02-14 15:43:11

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: fix ieee80211_sta_tx_notify for nullfunc

On Thu, 2013-02-14 at 14:08 +0100, Wojciech Dubowik wrote:
> Function ieee80211_sta_reset_conn_monitor has been
> resetting probe_send_count too early and nullfunc
> check was never called after succesfull ack.
>
> Reported-by: Magnus Cederlöf <[email protected]>
> Signed-off-by: Wojciech Dubowik <[email protected]>

Applied, thanks!

johannes