ifconfig reporting SIOCSIFMEDIA Device not configured error

From: Farhan Khan <farhan_at_farhan.codes>
Date: Thu, 21 Jul 2022 21:05:19 UTC
Hi all,

I am setting up a device driver in monitor mode, but appear to be getting an 
`ifconfig` error that I do not understand.

Specifically, when I set my device to be in monitor mode, I receive this 
error:

```
$ ifconfig wlan create wlandev athn0 mode monitor
ifconfig: SIOCSIFMEDIA (media): Device not configured
```

This creates a `wlan0` interface, but `ifconfig` reports this error. What 
might be causing this? I am certain I am missing a step in the ic_vap_create 
or ic_ioctl handlers or something related, but what might that be?

I searched for SIOCSIFMEDIA in the kernel source of drivers I know, but do not 
see anything that looks relevant. I could back out from the ifconfig source to 
figure out the exact cause, but that might take a while and was hoping someone 
here could/would shortcut that research.

For context my WIP code is located here (https://github.com/khanzf/freebsd/
tree/ar9271/sys/dev/athn). This is an attempt to port OpenBSD's athn, 
currently focusing on the USB driver.

Thank you.

- Farhan