Search Linux Wireless

[RFC 2/2] mac80211: stop data transmission while probing AP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux