[PATCH] Disable functionality in hostapd_deauth_all_stas for hostap driver only

Michael Bernhard michael.bernhard at bfh.ch
Wed Apr 16 07:31:20 EDT 2008


Signed-off-by: Michael Bernhard <michael.bernhard at bfh.ch>
---
It makes no sense to disable functionality which fails for one driver only.

I'm not sure however if this is the right place to do it. It would be
probably better to implement a filter in the problematic driver.

However, we have access to the driver name and know also the name of the 
problematic driver, it's easy to implement a string compare here.

 hostapd/hostapd.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c
index 64e5b99..86d41d4 100644
--- a/hostapd/hostapd.c
+++ b/hostapd/hostapd.c
@@ -166,17 +166,16 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
 
 static void hostapd_deauth_all_stas(struct hostapd_data *hapd)
 {
-#if 0
 	u8 addr[ETH_ALEN];
 
-	os_memset(addr, 0xff, ETH_ALEN);
-	hostapd_sta_deauth(hapd, addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
-#else
 	/* New Prism2.5/3 STA firmware versions seem to have issues with this
 	 * broadcast deauth frame. This gets the firmware in odd state where
-	 * nothing works correctly, so let's skip sending this for a while
-	 * until the issue has been resolved. */
-#endif
+	 * nothing works correctly, so let's skip sending this for the hostap
+	 * driver. */
+	if (os_strcmp(hapd->driver->name,"hostap") != 0) {
+		os_memset(addr, 0xff, ETH_ALEN);
+		hostapd_sta_deauth(hapd, addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
+	}
 }
 
 
-- 
1.5.2.5



More information about the HostAP mailing list