I'm using iw version 0.9.21, with linux kernel 2.6.35.3 on meego development for handset platform. I have seen this bug with following commands: Step 1 - set a correct country-code: [root@localhost ~]# iw reg set JP [root@localhost ~]# iw reg get The result is ok. Step 2 - set a wrong country-code: [root@localhost ~]# iw reg set ZZ [root@localhost ~]# iw reg get ZZ doesn't exist in reg-db, but regulatory setting don't return an error, and when you get regulatory domain information, it's like it never change from the previous setting. Step 3 - set a correct but different country-code: [root@localhost ~]# iw reg set US [root@localhost ~]# iw reg get After the step 2, "iw reg set" command does nothing, and we can't change regulatory domain anymore... We can repeat step 3, issue is the same after doing step 2
Created attachment 46172 [details] log trace showing iw reg set blocked by a wrong country code
I confirm the issue reported here -- Luis, can you either describe why this is or confirm that it is a bug?
The reason this fails is that we never added a timeout value for CRDA to reply, and only CRDA will know if the country is valid. So the regulatory domain request is a setting request which gets accepted and queued. We can either change the setting to wait for CRDA to reply or else we fail. This is a change that is required, just needs to be added.
Created attachment 52832 [details] [PATCH v2] cfg80211: add work for processing invalid user reg hints Subject: [PATCH v2] cfg80211: add work for processing invalid user reg hints We have no other option but to inform userspace that we have queued up their regulatory hint request when we are given one given that nl80211 operates atomically on user requests. The best we can do is accept the request, and add a delayed work item for processing failures and cancel it if we succeeed. Upon failure we restore the regulatory settings and ignore the supplied user input. This fixes this reported bug: https://bugzilla.kernel.org/show_bug.cgi?id=28112 Reported-by: gregoryx.alagnou@intel.com Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> --- Try this.
Should be fixed :D
A patch referencing this bug report has been merged in v3.0-rc1: commit a90c7a313a1c5b4fc99f987a2ae8f92ab0ae35c7 Author: Luis R. Rodriguez <lrodriguez@atheros.com> Date: Tue Apr 5 10:49:04 2011 -0700 cfg80211: add a timer for invalid user reg hints