On Mon, Mar 07, 2016 at 09:06:12AM +0200, cho...@jtan.com wrote: > I've been poking at it (and little more than poking in ignorance) and a > few more symptoms have cropped up: > > * If I include any chan setting in hostname.athn0 and reboot, I can't > set the chan at runtime to anything between 1 and 11 though can to > (some) values >11: ifconfig: SIOCS80211CHANNEL: Invalid argument > > Some values result in my 'good' laptop being able to find the AP and > some don't. Booting with anything <= 11 can't be seen; 36, 56 and 44 > can. > > * If I remove the chan option from hostname.athn0 ifconfig shows that > chan 1 was selected but nothing (not even my 'good' laptop) finds the > network. However I can now change the chan at runtime, and doing so > allows (all) the other devices to find the AP, even after switching > back to chan 1. > > I don't know what either of these things means, but they're odd.
Apart from hardware support, available channels depend on the current "mode" of the interface. 11a mode allows 5GHz channels (36 and up), and 11g mode allows channels 1 to 11, or perhaps up to 14 depending on the regulatory domain that your athn card was set to during manufacturing. (OpenBSD doesn't support run-time switching of regulatory domains at present and will just use whatever the hardware has been set up for.) Since you're running the card in hostap mode you should specify a mode first and then a channel. If you don't specify either, the wireless stack will automatically select a channel and a mode when the athn0 interface is put up. If you try to set a channel that's not valid for the curret mode, you'll see the 'Invalid argument' error. You can change the mode to 11a or 11g with: ifconfig athn0 media autoselect mode 11a ifconfig athn0 media autoselect mode 11g (Yes, you need to type all of that. This has been fixed in 5.9, where just 'ifconfig athn0 mode 11a' and 'ifconfig athn0 mode 11g' will work). You can put either of these lines in /etc/hostname.athn0 to force a particular mode at boot time: media autoselect mode 11a media autoselect mode 11g I hope this helps. I realize this interface, and perhaps the documentation, may lack some general friendliness towards those who aren't aware of all the quirks.