Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1543030

Re: wl1251 & mac address & calibration data

From Arend Van Spriel <arend.vanspriel@broadcom.com>
Newsgroups linux.kernel
Subject Re: wl1251 & mac address & calibration data
Date 2016-12-15 21:20 +0100
Message-ID <sOKFr-1Qq-1@gated-at.bofh.it> (permalink)
References (1 earlier) <sH5nH-5hZ-9@gated-at.bofh.it> <sH6MO-6kz-17@gated-at.bofh.it> <sH769-6sM-9@gated-at.bofh.it> <sOzqF-3rd-5@gated-at.bofh.it> <sOGiu-7uh-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 15-12-2016 16:33, Pali Rohár wrote:
> On Thu Dec 15 09:18:44 2016 Kalle Valo <kvalo@codeaurora.org> wrote:
>> (Adding Luis because he has been working on request_firmware() lately)
>>
>> Pali Rohár <pali.rohar@gmail.com> writes:
>>
>>>>> So no, there is no argument against... request_firmware() in
>>>>> fallback mode with userspace helper is by design blocking and
>>>>> waiting for userspace. But waiting for some change in DTS in
>>>>> kernel is just nonsense.
>>>>
>>>> I would just mark the wlan device with status = "disabled" and
>>>> enable it in the overlay together with adding the NVS & MAC info.
>>>
>>> So if you think that this solution make sense, we can wait what net 
>>> wireless maintainers say about it...
>>>
>>> For me it looks like that solution can be:
>>>
>>> extending request_firmware() to use only userspace helper
>>
>> I haven't followed the discussion very closely but this is my preference
>> what drivers should do:
>>
>> 1) First the driver should do try to get the calibration data and mac
>>        address from the device tree.
>>
> 
> Ok, but there is no (dynamic, device specific) data in DTS for N900. So 1) is noop.

Uhm. What do you mean? You can propose a patch to the DT bindings [1] to
get it in there and create your N900 DTB or am I missing something here.
Are there hardware restrictions that do not allow you to boot with your
own DTB.

>> 2) If they are not in DT the driver should retrieve the calibration data
>>        with request_firmware(). BUT with an option for user space to
>>        implement that with a helper script so that the data can be created
>>        dynamically, which I believe openwrt does with ath10k calibration
>>        data right now.
> 
> Currently there is flag for request_firmware() that it should fallback to user helper if direct VFS access not find needed firmware.
> 
> But this flag is not suitable as /lib/firmware already provides default (not device specific) calibration data.
> 
> So I would suggest to add another flag/function which will primary use user helper.

I recall Luis saying that user-mode helper (fallback) should be
discouraged, because there is no assurance that there is a user-mode
helper so you might just be pissing in the wind. The idea was to have a
dedicated API call that explicitly does the request towards user-space.

By the way, are we talking here about wl1251 device or driver as you
also mentioned wl12xx? I did not read the entire thread.

Regards,
Arend

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: wl1251 & mac address & calibration data Kalle Valo <kvalo@codeaurora.org> - 2016-12-15 09:20 +0100
  Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-12-15 16:40 +0100
    Re: wl1251 & mac address & calibration data Arend Van Spriel <arend.vanspriel@broadcom.com> - 2016-12-15 21:20 +0100
      Re: wl1251 & mac address & calibration data "Luis R. Rodriguez" <mcgrof@kernel.org> - 2016-12-16 03:10 +0100
        Re: wl1251 & mac address & calibration data Daniel Wagner <wagi@monom.org> - 2016-12-16 08:30 +0100
          Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-12-16 11:50 +0100
            Re: wl1251 & mac address & calibration data Arend Van Spriel <arend.vanspriel@broadcom.com> - 2016-12-18 12:00 +0100
              Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-12-18 12:10 +0100
                Re: wl1251 & mac address & calibration data Arend Van Spriel <arend.vanspriel@broadcom.com> - 2016-12-18 13:00 +0100
                Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-12-18 13:10 +0100
                Re: wl1251 & mac address & calibration data Arend Van Spriel <arend.vanspriel@broadcom.com> - 2016-12-18 21:10 +0100
                Re: wl1251 & mac address & calibration data Kalle Valo <kvalo@codeaurora.org> - 2016-12-20 12:50 +0100
                Re: wl1251 & mac address & calibration data Tony Lindgren <tony@atomide.com> - 2016-12-20 18:00 +0100
                Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-12-20 18:10 +0100
                Re: wl1251 & mac address & calibration data Kalle Valo <kvalo@codeaurora.org> - 2016-12-20 18:20 +0100
                Re: wl1251 & mac address & calibration data Tony Lindgren <tony@atomide.com> - 2016-12-20 18:30 +0100
        Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-12-16 11:40 +0100
      Re: wl1251 & mac address & calibration data Pali Rohár <pali.rohar@gmail.com> - 2016-12-16 11:30 +0100

csiph-web