Hi, I'm attaching patches for the rum device driver in freebsd and openbsd latest CVS.
Firstly I am testing this on a couple of openbsd i386 boxes which should see some heavy usage tomorrow, but so far it has fixed host AP beacons during my testing here. This has also helped some devices to connect that had trouble before. After this I should be able to test similarly on freebsd and amd64. Anyone else with rum hardware suffering beacon issues is also welcome to give these a try! Thanks, Regards, -- Steven Chamberlain ste...@pyro.eu.org
--- if_rum.c.orig 2011-07-03 16:47:17.000000000 +0100 +++ if_rum.c 2011-10-16 21:10:40.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, buf + offset); + if (error != 0) { + printf("%s: could not multi write MAC register: %s\n", + sc->sc_dev.dv_xname, usbd_errstr(error)); + return; + } } }
--- if_rum.c.orig 2011-06-24 03:30:02.000000000 +0100 +++ if_rum.c 2011-10-16 21:05:34.000000000 +0100 @@ -1407,20 +1407,25 @@ { struct usb_device_request req; usb_error_t 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 = rum_do_request(sc, &req, buf); - if (error != 0) { - device_printf(sc->sc_dev, - "could not multi write MAC register: %s\n", - 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 = rum_do_request(sc, &req, buf + offset); + if (error != 0) { + device_printf(sc->sc_dev, + "could not multi write MAC register: %s\n", + usbd_errstr(error)); + return (error); + } } - return (error); } static void
_______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"