I have a TP-LINK device[1] and I'd like to get this running on FreeBSD. I
have searched the interwebs[2][3] and, as I understand, the only thing
that's blocking this is the missing usb glue in ath / ath_hal [4][5].

I'm not entirely sure of how it all works together. What all should the USB
glue be doing? uath seems to be handling stuff like radiotap headers that
I'm not really sure belong in this USB glue. otus[6] seems a more likely
candidate of what this glue code should look like. Or is this about adding
USB support to the existing ath hal code (like checking if USB device is
supported when ath_hal_probe() is called?)

I started writing an if_ath_usb.c file under sys/dev/ath and have probe()
working for my device. I'm looking at the ukbd, uath, otus and if_ath_pci
modules to understand what if_ath_usb should do (along with man usbdi).

Have I completely misunderstood what needs to be done?

>From the if_ath_usb.c I have right now:

static int
ath_usb_probe(device_t dev)
        struct usb_attach_arg *uaa = device_get_ivars(dev);
        printf("[ath_usb_probe] vendorId = %x, productId %x\n",
uaa->info.idVendor, uaa->info.idProduct);

        /* Skipping ath_hal_probe here as we have not registered a chip
(YET).. */
        /* Check if product is AR9271 chip */

        /* idVendor = 0x0cf3  */
        /* idProduct = 0x9271  */
        if(uaa->info.idVendor == 0x0cf3 && uaa->info.idProduct == 0x9271)
            return BUS_PROBE_DEFAULT;

        return ENXIO;

[1] https://wikidevi.com/wiki/TP-LINK_TL-WN721N
[3] https://wiki.freebsd.org/dev/ath_hal%284%29/HardwareSupport (Chipsets I
won't be working on)
[4] https://wiki.freebsd.org/dev/ath_hal%284%29
[5] https://wiki.freebsd.org/dev/ath_hal%284%29/ApiOverview

freebsd-wireless@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"

Reply via email to