All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 1/2] mac80211: reset beacon monitor at tx ack notify
@ 2011-12-17 15:05 Rajkumar Manoharan
  2011-12-17 15:05 ` [RFC 2/2] mac80211: stop data transmission while probing AP Rajkumar Manoharan
  2012-01-02 13:55 ` [RFC 1/2] mac80211: reset beacon monitor at tx ack notify Johannes Berg
  0 siblings, 2 replies; 4+ messages in thread
From: Rajkumar Manoharan @ 2011-12-17 15:05 UTC (permalink / raw)
  To: johannes; +Cc: linville, linux-wireless, Rajkumar Manoharan

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 <rmanohar@qca.qualcomm.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [RFC 2/2] mac80211: stop data transmission while probing AP
  2011-12-17 15:05 [RFC 1/2] mac80211: reset beacon monitor at tx ack notify Rajkumar Manoharan
@ 2011-12-17 15:05 ` Rajkumar Manoharan
  2012-01-02 13:53   ` Johannes Berg
  2012-01-02 13:55 ` [RFC 1/2] mac80211: reset beacon monitor at tx ack notify Johannes Berg
  1 sibling, 1 reply; 4+ messages in thread
From: Rajkumar Manoharan @ 2011-12-17 15:05 UTC (permalink / raw)
  To: johannes; +Cc: linville, linux-wireless, Rajkumar Manoharan

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 <rmanohar@qca.qualcomm.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC 2/2] mac80211: stop data transmission while probing AP
  2011-12-17 15:05 ` [RFC 2/2] mac80211: stop data transmission while probing AP Rajkumar Manoharan
@ 2012-01-02 13:53   ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2012-01-02 13:53 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linville, linux-wireless

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 1/2] mac80211: reset beacon monitor at tx ack notify
  2011-12-17 15:05 [RFC 1/2] mac80211: reset beacon monitor at tx ack notify Rajkumar Manoharan
  2011-12-17 15:05 ` [RFC 2/2] mac80211: stop data transmission while probing AP Rajkumar Manoharan
@ 2012-01-02 13:55 ` Johannes Berg
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2012-01-02 13:55 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linville, linux-wireless

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 <rmanohar@qca.qualcomm.com>
> ---
>  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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-02 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-17 15:05 [RFC 1/2] mac80211: reset beacon monitor at tx ack notify Rajkumar Manoharan
2011-12-17 15:05 ` [RFC 2/2] mac80211: stop data transmission while probing AP Rajkumar Manoharan
2012-01-02 13:53   ` Johannes Berg
2012-01-02 13:55 ` [RFC 1/2] mac80211: reset beacon monitor at tx ack notify Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.