2008-12-23 00:32:48

by Fabio Rossi

[permalink] [raw]
Subject: p54: ad-hoc mode doesn't work

I was trying to test the ad-hoc mode with my wireless nic (p54 driver, latest
wireless-testing git) but I get the following error result:

# iwconfig wlan0 mode ad-hoc
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Operation not supported.

The documentation page on linuxwireless.org states that the ad-hoc mode should
be supported: what's wrong?

Thank you,
Fabio


2008-12-24 17:37:29

by Pavel Roskin

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

Quoting Fabio Rossi <[email protected]>:

> It seems strange to me, on the other PC I'm using the ath5k driver with a PCI
> wireless NIC and the interface enters in ad-hoc mode without complaining
> (CRDA is not installed).

Maybe you have CONFIG_WIRELESS_OLD_REGULATORY enabled on the systems
with ath5k.

--
Regards,
Pavel Roskin

2008-12-24 22:10:39

by Pavel Roskin

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

Quoting Fabio Rossi <[email protected]>:

> According to my opinion the error message posted in the original message of
> this thread might be misleading for the user: the network card doesn't enter
> in ad-hoc mode because the country for the CRDA is not set while the error
> says that the ad-hoc mode is not supported. What do you think about?

Perhaps we need a separate error code "not permitted by regulations".
Or we need to reuse one of the existing error codes for that.

--
Regards,
Pavel Roskin

2008-12-23 22:52:41

by Pavel Roskin

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

On Tue, 2008-12-23 at 01:32 +0100, Fabio Rossi wrote:
> I was trying to test the ad-hoc mode with my wireless nic (p54 driver, latest
> wireless-testing git) but I get the following error result:
>
> # iwconfig wlan0 mode ad-hoc
> Error for wireless request "Set Mode" (8B06) :
> SET failed on device wlan0 ; Operation not supported.
>
> The documentation page on linuxwireless.org states that the ad-hoc mode should
> be supported: what's wrong?

I think you need to install crda:
http://wireless.kernel.org/en/developers/Regulatory/CRDA

Once CRDA is installed, use "iw" to set your regulatory domain. Without
CRDA, the kernel uses very conservative rules that don't allow beaconing
and thus the ad-hoc mode.

--
Regards,
Pavel Roskin

2008-12-24 17:29:20

by Fabio Rossi

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

It seems strange to me, on the other PC I'm using the ath5k driver with a PCI
wireless NIC and the interface enters in ad-hoc mode without complaining
(CRDA is not installed).

I'll try to install also CRDA to see if something changes, maybe there is a
difference between the ath5k and p54 drivers.

Thanks,
Fabio

On Tuesday 23 December 2008, Pavel Roskin wrote:

> Once CRDA is installed, use "iw" to set your regulatory domain. Without
> CRDA, the kernel uses very conservative rules that don't allow beaconing
> and thus the ad-hoc mode.

2008-12-24 21:04:50

by Fabio Rossi

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

On Wednesday 24 December 2008, Pavel Roskin wrote:

> Maybe you have CONFIG_WIRELESS_OLD_REGULATORY enabled on the systems
> with ath5k.

Thank you very much Pavel, you got the point :-) I had set
CONFIG_WIRELESS_OLD_REGULATORY on the PC with the ath5k card.

Regards,
Fabio

2008-12-24 17:40:41

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

On Wed, Dec 24, 2008 at 9:28 AM, Fabio Rossi <[email protected]> wrote:
> It seems strange to me, on the other PC I'm using the ath5k driver with a PCI
> wireless NIC and the interface enters in ad-hoc mode without complaining
> (CRDA is not installed).
>
> I'll try to install also CRDA to see if something changes, maybe there is a
> difference between the ath5k and p54 drivers.

Most distributions are using >= 2.6.28 kernels with
CONFIG_WIRELESS_OLD_REGULATORY which means the US is the default
regulatory domain and its built statically into the kernel so the
values are used CRDA does not have to be queried. If CRDA is present
the regulatory domain is just updated with
CONFIG_WIRELESS_OLD_REGULATORY.

To find out the details of your channel configuration install iw and
then do: iw list

http://wireless.kernel.org/en/users/Documentation/iw

For example for my dual band card I get (after running iw reg set US
though) for the frequencies:

Frequencies:
* 2412 MHz
* 2417 MHz
* 2422 MHz
* 2427 MHz
* 2432 MHz
* 2437 MHz
* 2442 MHz
* 2447 MHz
* 2452 MHz
* 2457 MHz
* 2462 MHz
* 2467 MHz (disabled)
* 2472 MHz (disabled)
* 2484 MHz (disabled)
Frequencies:
* 5180 MHz
* 5200 MHz
* 5220 MHz
* 5240 MHz
* 5260 MHz (radar detection)
* 5280 MHz (radar detection)
* 5300 MHz (radar detection)
* 5320 MHz (radar detection)
* 5500 MHz (radar detection)
* 5520 MHz (radar detection)
* 5540 MHz (radar detection)
* 5560 MHz (radar detection)
* 5580 MHz (radar detection)
* 5600 MHz (radar detection)
* 5620 MHz (radar detection)
* 5640 MHz (radar detection)
* 5660 MHz (radar detection)
* 5680 MHz (radar detection)
* 5700 MHz (radar detection)
* 5745 MHz
* 5765 MHz
* 5785 MHz
* 5805 MHz
* 5825 MHz

Luis

2008-12-29 19:39:35

by Fabio Rossi

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

On Wednesday 24 December 2008, Pavel Roskin wrote:

> Perhaps we need a separate error code "not permitted by regulations".
> Or we need to reuse one of the existing error codes for that.

Yes, this would be better for the end-user.

Fabio

2008-12-24 21:04:50

by Fabio Rossi

[permalink] [raw]
Subject: Re: p54: ad-hoc mode doesn't work

On Wednesday 24 December 2008, Luis R. Rodriguez wrote:

> Most distributions are using >= 2.6.28 kernels with
> CONFIG_WIRELESS_OLD_REGULATORY which means the US is the default
> regulatory domain and its built statically into the kernel so the
> values are used CRDA does not have to be queried. If CRDA is present
> the regulatory domain is just updated with
> CONFIG_WIRELESS_OLD_REGULATORY.

Thank you for the explanation! Now I have disabled
CONFIG_WIRELESS_OLD_REGULATORY and I have installed CRDA and iw. After
setting the country I'm able to create the ad-hoc IBSS between the two PCs.

According to my opinion the error message posted in the original message of
this thread might be misleading for the user: the network card doesn't enter
in ad-hoc mode because the country for the CRDA is not set while the error
says that the ad-hoc mode is not supported. What do you think about?

Regards,
Fabio