2013-03-18 10:31:49

by Francisco Cuesta

[permalink] [raw]
Subject: IW channels list question

Hello iw developers,


I would like to ask a question related to the command iw list. The
channels shown with this command where are they taken from? I mean,
does iw call the drivers' API to see which frequencies it can provide?

I ask this in that if I change the regulatory domain to Japan for
instance, I cannot see the 4.9GHz channels with iw list, does it mean
that the driver doesn't support such a channels or that I maybe have
to modify iw list source in order to make them show up?

Thanks in advance,

REgards,

Francisco


2013-03-19 22:08:20

by Julian Calaby

[permalink] [raw]
Subject: Re: IW channels list question

Hi Francisco,

Firstly, don't drop the mailing list CC, I do _not_ do private support.

Secondly, don't top post.

On Tue, Mar 19, 2013 at 10:59 PM, Francisco Cuesta <[email protected]> wrote:
> Hi Julian,
>
> First of all thanks for replying.
>
> Concerning to the call of iw to the API in an openwrt system do you
> know if this is the same? I mean, I have tried to find some file
> called nl80211 but without succeeding.

nl80211 is an interface with the kernel, it's not a file. It's
essentially commands to control Wifi (802.11) interfaces over NetLink.

All 'iw' commands, regardless of the Linux distribution or whatever use nl80211.

> On the other hand, I'm working with openwrt and I was aware about the
> eemprom stuff, indeed, I have enabled an openwrt feature that allows
> you to force the atheros eemprom to take into account the regulatory
> domain set by the user, but event though if I set Japan I don't see an
> update on iw list channels. Is that due to the fact that my card
> doesn't support such a frequency?

That is most likely the case.

Thanks,

--
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

2013-03-18 22:47:30

by Julian Calaby

[permalink] [raw]
Subject: Re: IW channels list question

Hi Francisco,

On Mon, Mar 18, 2013 at 9:31 PM, Francisco Cuesta <[email protected]> wrote:
> Hello iw developers,
>
> I would like to ask a question related to the command iw list. The
> channels shown with this command where are they taken from? I mean,
> does iw call the drivers' API to see which frequencies it can provide?

iw calls the kernel's API (nl80211) to get a list of channels
available for the device specified.

> I ask this in that if I change the regulatory domain to Japan for
> instance, I cannot see the 4.9GHz channels with iw list, does it mean
> that the driver doesn't support such a channels or that I maybe have
> to modify iw list source in order to make them show up?

There is much more going on. Everything is working exactly as it should.

Most wireless cards contain a small EEPROM which, amongst other
things, specifies the calibration parameters and some regulatory
information for that specific card. A card sold in a particular
country is generally calibrated to work with the channels specified by
that country's laws, and no calibration is performed for any other
channels. The driver restricts the usage of that card so that it only
uses the channels specified in the laws it was calibrated against.

As each country has different laws relating to which channels are
usable, the kernel regulatory code takes every piece of information we
have, whether this is data from the card or specified by the user, and
calculates a set of channels which satisfies the laws of all the
countries we may be in, given the information at hand.

In your case, firstly, your card is probably calibrated for a country
that doesn't allow wifi on 4.9GHz channels, so when you tell the
kernel that you're in Japan it calculates a set of channels that is
allowed where the card is from, and is also allowed in Japan and uses
that. Secondly, if I recall correctly, cards which can use the 4.9GHz
channels are fairly rare, as they're only developed for the Japanese
market.

I hope that explains it.

Thanks,

--
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/