This patch moves the beacon loss timer to future on receiving tx
ack status from the associated AP. So that we can avoid unnecessary
AP probing.
Signed-off-by: Rajkumar Manoharan <[email protected]>
---
net/mac80211/mlme.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index a984f1f..65f1262 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1209,8 +1209,10 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
if (!ieee80211_is_data(hdr->frame_control))
return;
- if (ack)
+ if (ack) {
ieee80211_sta_reset_conn_monitor(sdata);
+ ieee80211_sta_reset_beacon_monitor(sdata);
+ }
if (ieee80211_is_nullfunc(hdr->frame_control) &&
sdata->u.mgd.probe_send_count > 0) {
--
1.7.8
If the station is out of coverage of AP and it tries to probe the AP
because of the beacon loss then there is not point in pushing the
data from the higher layer. So lets suspend the data transmission
till the probing succeeds.
Signed-off-by: Rajkumar Manoharan <[email protected]>
---
net/mac80211/mlme.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 65f1262..d0b4a32 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1239,6 +1239,8 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
if (ifmgd->probe_send_count >= unicast_limit)
dst = NULL;
+ if (ifmgd->flags & IEEE80211_STA_BEACON_POLL)
+ netif_tx_stop_all_queues(sdata->dev);
/*
* When the hardware reports an accurate Tx ACK status, it's
* better to send a nullfunc frame instead of a probe request,
@@ -1255,6 +1257,10 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
(u32) -1, true, false);
}
+ if (ifmgd->flags & IEEE80211_STA_BEACON_POLL) {
+ drv_flush(sdata->local, false);
+ netif_tx_wake_all_queues(sdata->dev);
+ }
ifmgd->probe_send_count++;
ifmgd->probe_timeout = jiffies + msecs_to_jiffies(probe_wait_ms);
run_again(ifmgd, ifmgd->probe_timeout);
--
1.7.8
On Sat, 2011-12-17 at 20:35 +0530, Rajkumar Manoharan wrote:
> This patch moves the beacon loss timer to future on receiving tx
> ack status from the associated AP. So that we can avoid unnecessary
> AP probing.
>
> Signed-off-by: Rajkumar Manoharan <[email protected]>
> ---
> net/mac80211/mlme.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index a984f1f..65f1262 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -1209,8 +1209,10 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
> if (!ieee80211_is_data(hdr->frame_control))
> return;
>
> - if (ack)
> + if (ack) {
> ieee80211_sta_reset_conn_monitor(sdata);
> + ieee80211_sta_reset_beacon_monitor(sdata);
> + }
This doesn't make a lot of sense. You can argue that beacon monitoring
isn't worthwhile, but side-stepping it completely when there's traffic
seems not what's intended as it is?
johannes
On Sat, 2011-12-17 at 20:35 +0530, Rajkumar Manoharan wrote:
> If the station is out of coverage of AP and it tries to probe the AP
> because of the beacon loss then there is not point in pushing the
> data from the higher layer. So lets suspend the data transmission
> till the probing succeeds.
We could argue about the idea,
> + if (ifmgd->flags & IEEE80211_STA_BEACON_POLL)
> + netif_tx_stop_all_queues(sdata->dev);
> /*
> * When the hardware reports an accurate Tx ACK status, it's
> * better to send a nullfunc frame instead of a probe request,
> @@ -1255,6 +1257,10 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
> (u32) -1, true, false);
> }
>
> + if (ifmgd->flags & IEEE80211_STA_BEACON_POLL) {
> + drv_flush(sdata->local, false);
> + netif_tx_wake_all_queues(sdata->dev);
> + }
but this implementation is completely bogus anyway. Think about what
this really does.
johannes