summaryrefslogtreecommitdiff
path: root/package/hostapd/patches/160-sta_roam_between_bss.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-20 02:26:00 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-01-20 02:26:00 +0000
commit92ca87f9e7ed1b52208366537d563a211f6680c1 (patch)
treee6a906f8f05d9071a63a33d03aa990593b6d916d /package/hostapd/patches/160-sta_roam_between_bss.patch
parente25263b21def36527d39e1e20aa72e6449c0c510 (diff)
hostapd: upgrade to latest git version, add patches to fix multi-bss support with a single hostapd instance
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19234 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/hostapd/patches/160-sta_roam_between_bss.patch')
-rw-r--r--package/hostapd/patches/160-sta_roam_between_bss.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/package/hostapd/patches/160-sta_roam_between_bss.patch b/package/hostapd/patches/160-sta_roam_between_bss.patch
new file mode 100644
index 0000000000..dfd5fd88c8
--- /dev/null
+++ b/package/hostapd/patches/160-sta_roam_between_bss.patch
@@ -0,0 +1,79 @@
+--- a/src/ap/sta_info.c
++++ b/src/ap/sta_info.c
+@@ -32,8 +32,8 @@
+ #include "vlan_init.h"
+ #include "sta_info.h"
+
+-static int ap_sta_in_other_bss(struct hostapd_data *hapd,
+- struct sta_info *sta, u32 flags);
++static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
++ struct sta_info *sta);
+ static void ap_handle_session_timer(void *eloop_ctx, void *timeout_ctx);
+ #ifdef CONFIG_IEEE80211W
+ static void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx);
+@@ -123,8 +123,8 @@ void ap_free_sta(struct hostapd_data *ha
+
+ if (sta->flags & WLAN_STA_WDS)
+ hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
+- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
+- !(sta->flags & WLAN_STA_PREAUTH))
++
++ if (!(sta->flags & WLAN_STA_PREAUTH))
+ hapd->drv.sta_remove(hapd, sta->addr);
+
+ ap_sta_hash_del(hapd, sta);
+@@ -451,6 +451,7 @@ struct sta_info * ap_sta_add(struct host
+ hapd->num_sta++;
+ ap_sta_hash_add(hapd, sta);
+ sta->ssid = &hapd->conf->ssid;
++ ap_sta_remove_in_other_bss(hapd, sta);
+
+ return sta;
+ }
+@@ -472,8 +473,8 @@ static int ap_sta_remove(struct hostapd_
+ }
+
+
+-static int ap_sta_in_other_bss(struct hostapd_data *hapd,
+- struct sta_info *sta, u32 flags)
++static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
++ struct sta_info *sta)
+ {
+ struct hostapd_iface *iface = hapd->iface;
+ size_t i;
+@@ -488,11 +489,11 @@ static int ap_sta_in_other_bss(struct ho
+ if (bss == hapd || bss == NULL)
+ continue;
+ sta2 = ap_get_sta(bss, sta->addr);
+- if (sta2 && ((sta2->flags & flags) == flags))
+- return 1;
+- }
++ if (!sta2)
++ continue;
+
+- return 0;
++ ap_sta_disconnect(bss, sta2, sta2->addr, WLAN_REASON_DEAUTH_LEAVING);
++ }
+ }
+
+
+@@ -502,8 +503,7 @@ void ap_sta_disassociate(struct hostapd_
+ wpa_printf(MSG_DEBUG, "%s: disassociate STA " MACSTR,
+ hapd->conf->iface, MAC2STR(sta->addr));
+ sta->flags &= ~WLAN_STA_ASSOC;
+- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC))
+- ap_sta_remove(hapd, sta);
++ ap_sta_remove(hapd, sta);
+ sta->timeout_next = STA_DEAUTH;
+ eloop_cancel_timeout(ap_handle_timer, hapd, sta);
+ eloop_register_timeout(AP_MAX_INACTIVITY_AFTER_DISASSOC, 0,
+@@ -521,8 +521,7 @@ void ap_sta_deauthenticate(struct hostap
+ wpa_printf(MSG_DEBUG, "%s: deauthenticate STA " MACSTR,
+ hapd->conf->iface, MAC2STR(sta->addr));
+ sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
+- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC))
+- ap_sta_remove(hapd, sta);
++ ap_sta_remove(hapd, sta);
+ sta->timeout_next = STA_REMOVE;
+ eloop_cancel_timeout(ap_handle_timer, hapd, sta);
+ eloop_register_timeout(AP_MAX_INACTIVITY_AFTER_DEAUTH, 0,