[PATCH]: use of IEEE80211_IOCTL_FILTERFRAME

Ted Merrill ted at atheros.com
Wed Oct 10 17:36:49 EDT 2007


According to Atheros engineers, the IEEE80211_IOCTL_FILTERFRAME
ioctl (for madwifi) must be always be passed out of line (see patch).
Although this is not yet used by hostapd, it will (hopefully) be soon
as WPS supported is added.

Thanks,
Ted Merrill
Atheros Communications

The patch:

diff --git a/hostapd/driver_madwifi.c b/hostapd/driver_madwifi.c
index 8dc97d5..5acd5a6 100644
--- a/hostapd/driver_madwifi.c
+++ b/hostapd/driver_madwifi.c
@@ -82,7 +82,20 @@ set80211priv(struct madwifi_driver_data *drv, int op, void *data, int len)
 
 	memset(&iwr, 0, sizeof(iwr));
 	os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
-	if (len < IFNAMSIZ) {
+	int do_inline = (len < IFNAMSIZ);
+	#ifdef IEEE80211_IOCTL_FILTERFRAME
+	/* 
+	* FILTERFRAME must be NOT inline, regardless of size.
+	* Not all madwifi implementations may have FILTERFRAME,
+	* but without it they cannot be a proper WPS server.
+	* See:
+	* http://www.mail-archive.com/madwifi-tickets@lists.sourceforge.net/
+	*			msg05509.html
+	* dated 2006-10-16 ...
+	*/
+	if ( op == IEEE80211_IOCTL_FILTERFRAME ) do_inline = 0;
+	#endif // IEEE80211_IOCTL_FILTERFRAME
+	if (do_inline) {
 		/*
 		 * Argument data fits inline; put it there.
 		 */



More information about the HostAP mailing list