RE: [cfg80211 / iwlwifi] setting wireless regulatory domain doesn'twork.

From: Grumbach, Emmanuel
Date: Wed Dec 18 2013 - 04:18:49 EST


>
> On 12/17/2013 11:06 PM, Linus Torvalds wrote:
> > We have literally had this *exact* same issue with firmware loading.
> > Network drivers shouldn't try to load firmware at module load time.
> > Same deal.
>
> It is kind of a chicken and egg problem for (wireless) networking drivers. To
> get IFF_UP from the network layer you have to register a netdevice. For
> wireless drivers this means you have to register a wiphy device with cfg80211
> which flags capabilities and optionally are custom regulatory domain. That
> information depends on the device and firmware used. And there we have a
> full circle.
>

To solve this - iwlwifi uses request_firmware_nowait. Its doc reads:

"Asynchronous variant of request_firmware for user contexts: - sleep for as small periods as possible since it may increase kernel boot time of built-in device drivers requesting firmware in their ->probe methods, if gfp is GFP_KERNEL."
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—