Hi,
Trying to send in my patches (these were attached to my original
mails but seemingly squished by demime).
Re: rum: malformed hostap beacon frames
--- if_rum.c.orig 2011-07-03 16:47:17.000000000 +0100
+++ if_rum.c 2011-10-23 17:55:06.000000000 +0100
@@ -1486,17 +1486,23 @@
{
usb_device_request_t req;
usbd_status error;
+ int offset;
req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
req.bRequest = RT2573_WRITE_MULTI_MAC;
USETW(req.wValue, 0);
- USETW(req.wIndex, reg);
- USETW(req.wLength, len);
- error = usbd_do_request(sc->sc_udev, &req, buf);
- if (error != 0) {
- printf("%s: could not multi write MAC register: %s\n",
- sc->sc_dev.dv_xname, usbd_errstr(error));
+ /* write at most 64 bytes at a time */
+ for (offset = 0; offset < len; offset += 64) {
+ USETW(req.wIndex, reg + offset);
+ USETW(req.wLength, MIN(len - offset, 64));
+
+ error = usbd_do_request(sc->sc_udev, &req, (uint8_t *)buf +
offset);
+ if (error != 0) {
+ printf("%s: could not multi write MAC register: %s\n",
+ sc->sc_dev.dv_xname, usbd_errstr(error));
+ return;
+ }
}
}
Re: hostapd: handle reassociations
--- apme.c.orig 2007-02-08 11:15:55.000000000 +0000
+++ apme.c 2011-10-23 01:11:12.000000000 +0100
@@ -368,8 +368,10 @@
IEEE80211_FC1_DIR_NODS &&
(wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) ==
IEEE80211_FC0_TYPE_MGT &&
- (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) ==
- IEEE80211_FC0_SUBTYPE_ASSOC_RESP))
+ ((wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) ==
+ IEEE80211_FC0_SUBTYPE_ASSOC_RESP ||
+ (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) ==
+ IEEE80211_FC0_SUBTYPE_REASSOC_RESP)))
return;
/*