[PATCH]: Madwifi driver set countermeasures bug workaround

Ted Merrill ted
Wed Oct 10 14:58:34 PDT 2007


Jouni,

According to Atheros engineers, the following is a necessary 
workaround for a bug in some versions of madwifi linux driver,
see comment in the patch.
It is not clear what the distribution of such driver code outside
of Atheros is; possibly it applies only to drivers distributed by
Atheros to customers, or possibly it has a wider distribution.

If you are not comfortable with this, perhaps you could add it in 
surrounded by some sort of #if[def] ...

Thanks
Ted Merrill
Atheros Communications

The patch:



diff --git a/hostapd/driver_madwifi.c b/hostapd/driver_madwifi.c
index 5acd5a6..0fb0a1e 100644
--- a/hostapd/driver_madwifi.c
+++ b/hostapd/driver_madwifi.c
@@ -1348,6 +1348,15 @@ madwifi_set_countermeasures(void *priv, int enabled)
 {
 	struct madwifi_driver_data *drv = priv;
 	wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled);
+	/* According to Atheros engineers,
+	*  some madwifi drivers crash when this is passed enabled.
+	*  As a workaround, disable enabling... 
+	*  this is +/- ok assuming that in this case we shut down all
+	*  associations anyway, as required (see ieee802_11.c),
+	*  although setting this now can give slightly better defense
+	*  by reducing the window of opportunity? 
+	*/
+	if ( enabled ) return 0;
 	return set80211param(drv, IEEE80211_PARAM_COUNTERMEASURES, enabled);
 }
 




More information about the Hostap mailing list