2022-03-04 20:05:00

by Alex Deucher

[permalink] [raw]
Subject: Way to enumerate wireless adapters in kernel

Hi, is there a way to enumerate wireless adapters in the kernel and
determine what their channel and frequency is? I'm looking for a way
to determine this from another component in the kernel so as to avoid
any potential frequency interface from another device in the kernel.

Thanks,

Alex


2022-03-04 21:03:47

by Alex Deucher

[permalink] [raw]
Subject: Re: Way to enumerate wireless adapters in kernel

On Fri, Mar 4, 2022 at 3:48 PM Larry Finger <[email protected]> wrote:
>
> On 3/4/22 13:59, Alex Deucher wrote:
> > Hi, is there a way to enumerate wireless adapters in the kernel and
> > determine what their channel and frequency is? I'm looking for a way
> > to determine this from another component in the kernel so as to avoid
> > any potential frequency interface from another device in the kernel.
>
> The command 'iw dev' will list the device name and frequency if the device is
> connected. There is a bit of extraneous output, but it is not difficult to sort
> it outwith something like iw dev | egrep "Interface|channel"

What about within the kernel itself? E.g., from another kernel driver?

Alex

2022-03-04 21:26:08

by Larry Finger

[permalink] [raw]
Subject: Re: Way to enumerate wireless adapters in kernel

On 3/4/22 13:59, Alex Deucher wrote:
> Hi, is there a way to enumerate wireless adapters in the kernel and
> determine what their channel and frequency is? I'm looking for a way
> to determine this from another component in the kernel so as to avoid
> any potential frequency interface from another device in the kernel.

The command 'iw dev' will list the device name and frequency if the device is
connected. There is a bit of extraneous output, but it is not difficult to sort
it outwith something like iw dev | egrep "Interface|channel"

Larry