Confused about which driver to extend for AR9271

From: Farhan Khan <>
Date: Mon, 28 Feb 2022 23:54:06 UTC
Hi all,

I am considering to add ATHEROS2/AR9271 support. This driver is currently available on OpenBSD and NetBSD as athn (/usr/src/sys/dev/usb/if_athn_usb.c, which extends to include /usr/src/sys/dev/ic/athn.c.

Per discussions in #freebsd-wifi on EFnet, it was suggested to extend uath or otus. At this point I am a little confused on which to extend. Based on the NetBSD/OpenBSD code, the usb_config SEEMS to differ from both uath and otus, which suggests (but isn't certain) that AR9271 would not be a sub-driver of either. But I am not certain either way.

What would be a good approach to determine which driver AR9271 (athn) would conform with? My currently idea is to compare the ops and ieee80211 interfaces of the driver. Please let me know if this is a sound approach.

Farhan Khan