Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2022 17:05:19 -0400
From:      Farhan Khan <farhan@farhan.codes>
To:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   ifconfig reporting SIOCSIFMEDIA Device not configured error
Message-ID:  <2130592.irdbgypaU6@pc.farhan.codes>

next in thread | raw e-mail | index | archive | help
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






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2130592.irdbgypaU6>