mac80211: improve station mode nullfunc probing

SVN-Revision: 24107
master
Felix Fietkau 14 years ago
parent 233c6672a9
commit 3988c6d5e3
  1. 25
      package/mac80211/patches/311-pending_work.patch

@ -117,7 +117,7 @@
sdata->u.mgd.associated = cbss;
memcpy(sdata->u.mgd.bssid, cbss->bssid, ETH_ALEN);
@@ -1026,6 +1035,50 @@ void ieee80211_sta_rx_notify(struct ieee
@@ -1026,6 +1035,51 @@ void ieee80211_sta_rx_notify(struct ieee
ieee80211_sta_reset_conn_monitor(sdata);
}
@ -159,7 +159,8 @@
+
+ ieee80211_sta_reset_conn_monitor(sdata);
+
+ if (ieee80211_is_nullfunc(hdr->frame_control)) {
+ if (ieee80211_is_nullfunc(hdr->frame_control) &&
+ sdata->u.mgd.probe_send_count > 0) {
+ sdata->u.mgd.probe_send_count = 0;
+ ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+ }
@ -168,7 +169,7 @@
static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -1041,8 +1094,19 @@ static void ieee80211_mgd_probe_ap_send(
@@ -1041,8 +1095,19 @@ static void ieee80211_mgd_probe_ap_send(
if (ifmgd->probe_send_count >= unicast_limit)
dst = NULL;
@ -190,7 +191,7 @@
ifmgd->probe_send_count++;
ifmgd->probe_timeout = jiffies + IEEE80211_PROBE_WAIT;
@@ -1509,29 +1573,8 @@ static void ieee80211_rx_mgmt_probe_resp
@@ -1509,29 +1574,8 @@ static void ieee80211_rx_mgmt_probe_resp
ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, false);
if (ifmgd->associated &&
@ -222,23 +223,25 @@
}
/*
@@ -1881,12 +1924,22 @@ void ieee80211_sta_work(struct ieee80211
@@ -1881,12 +1925,23 @@ void ieee80211_sta_work(struct ieee80211
IEEE80211_STA_CONNECTION_POLL) &&
ifmgd->associated) {
u8 bssid[ETH_ALEN];
+ int max_tries;
+
+ /* ACK received for nullfunc probing frame */
+ if (!ifmgd->probe_send_count)
+ ieee80211_reset_ap_probe(sdata);
+
+ if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
+ max_tries = IEEE80211_MAX_NULLFUNC_TRIES;
+ else
+ max_tries = IEEE80211_MAX_PROBE_TRIES;
memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
if (time_is_after_jiffies(ifmgd->probe_timeout))
- if (time_is_after_jiffies(ifmgd->probe_timeout))
+
+ /* ACK received for nullfunc probing frame */
+ if (!ifmgd->probe_send_count)
+ ieee80211_reset_ap_probe(sdata);
+
+ else if (time_is_after_jiffies(ifmgd->probe_timeout))
run_again(ifmgd, ifmgd->probe_timeout);
- else if (ifmgd->probe_send_count < IEEE80211_MAX_PROBE_TRIES) {
@ -246,7 +249,7 @@
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
wiphy_debug(local->hw.wiphy,
"%s: No probe response from AP %pM"
@@ -2012,6 +2065,8 @@ void ieee80211_sta_restart(struct ieee80
@@ -2012,6 +2067,8 @@ void ieee80211_sta_restart(struct ieee80
add_timer(&ifmgd->timer);
if (test_and_clear_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running))
add_timer(&ifmgd->chswitch_timer);

Loading…
Cancel
Save