[PATCH] driver_nl80211: set_country fix

Jouni Malinen j at w1.fi
Tue Jun 25 04:19:06 EDT 2013


On Sun, Jun 23, 2013 at 04:07:46PM +0300, Igal Chernobelsky wrote:
> Regulatory domain setting may take some time.
> Getting reg domain info immediately after reg domain setting returns
> invalid reg domain data. Loop is added to read reg domain info back and
> to compare set country. If read country does not match, fail to 1 sec sleep
> and retry get/compare again.

Please add the details from your email from today to the commit
message.. It was not immediately clear why this message would map with
the implementation change and especially so why this would be needed in
the first place.

I don't really like the one second sleep (blocking everything
wpa_supplicant/hostapd is doing) here, though. cfg80211 regulatory is
supposed to use events to indicate when regulatory changes. Couldn't
those be used for this, too? A blocking sleep could work fine for cases
where there is only a single interface, but it does not behave nicely if
there are concurrent operations, so I would rather make only the case
that absolutely needs this to block wait (or ideally, use a callback
from the nl80211 event handler in case the country code change needs to
wait for the kernel to complete processing).

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list