brcmfmac NVRAM files
Hi Arend,
I'm trying to use a 43241 SDIO chip here, and it fails asking for the .txt file (brcmfmac43241b4-sdio.txt). This seems to be an NVRAM map file, but I could not find either a template on linux-firmware or any kind of documentation about it.
How do distro handle that ? Are they expected to build their own, or is it completely OEM pecific ?
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Quoted 9 lines · Samuel Ortiz
Hi Arend,
I'm trying to use a 43241 SDIO chip here, and it fails asking for the .txt file (brcmfmac43241b4-sdio.txt). This seems to be an NVRAM map file, but I could not find either a template on linux-firmware or any kind of documentation about it.
How do distro handle that ? Are they expected to build their own, or is it completely OEM pecific ?
Adding Franky to the Cc list.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Am 17.02.2014 17:33, schrieb Samuel Ortiz:
Quoted 8 lines · Samuel Ortiz
Quoted 7 lines
Hi Arend,
I'm trying to use a 43241 SDIO chip here, and it fails asking for the .txt file (brcmfmac43241b4-sdio.txt). This seems to be an NVRAM map file, but I could not find either a template on linux-firmware or any kind of documentation about it.
Quoted 7 lines
Quoted 2 lines
How do distro handle that ? Are they expected to build their own, or is it completely OEM pecific ?
Adding Franky to the Cc list.
Cheers,
Samuel.
Hi Samuel,
I had the same proble with a wandboard here and I guess it's a bug. In /lib/firmware/brcm are all reqired *.bin files, but no *.txt file. On www.wandboard.or I found a SDK-Kit with brcmfmac4329-sdio.txt, copied the file and then the wlan was running. The *.txt are simply forgotten to copy to the firmware directory.
No idea how to fix this.
Bernd
Quoted 16 lines · Bernd Wagener
Am 17.02.2014 17:33, schrieb Samuel Ortiz:
Quoted 8 lines · Samuel Ortiz
Quoted 7 lines
Hi Arend,
I'm trying to use a 43241 SDIO chip here, and it fails asking for the .txt file (brcmfmac43241b4-sdio.txt). This seems to be an NVRAM map file, but I could not find either a template on linux-firmware or any kind of documentation about it.
Quoted 7 lines
Quoted 2 lines
How do distro handle that ? Are they expected to build their own, or is it completely OEM pecific ?
Adding Franky to the Cc list.
Cheers,
Samuel.
Quoted 7 lines
Hi Samuel,
I had the same proble with a wandboard here and I guess it's a bug. In/lib/firmware/brcmare all reqired *.bin files, but no *.txt file. On www.wandboard.or I found a SDK-Kit with brcmfmac4329-sdio.txt, copied the file and then the wlan was running.
The *.txt are simply forgotten to copy to the firmware directory. No idea how to fix this.
Hi Bernd,
The hint to solve this is found on wireless.kernel.org [1] and the answer is as Samuel suspects. This file is very board specific so OEMs manufacturing/selling the board should provide it either upon request or through some distribution like a SDK. Because of the nature of the file we do not put it on linux-firmware although people like yourself can get lucky trying ;-)
Regards,
Arend
Quoted 25 lines · Arend van Spriel
Quoted 16 lines · Bernd Wagener
Am 17.02.2014 17:33, schrieb Samuel Ortiz:
Quoted 8 lines · Samuel Ortiz
Quoted 7 lines
Hi Arend,
I'm trying to use a 43241 SDIO chip here, and it fails asking for the .txt file (brcmfmac43241b4-sdio.txt). This seems to be an NVRAM map file, but I could not find either a template on linux-firmware or any kind of documentation about it.
Quoted 7 lines
Quoted 2 lines
How do distro handle that ? Are they expected to build their own, or is it completely OEM pecific ?
Adding Franky to the Cc list.
Cheers,
Samuel.Quoted 7 lines
Hi Samuel,
I had the same proble with a wandboard here and I guess it's a bug. In/lib/firmware/brcmare all reqired *.bin files, but no *.txt file. On www.wandboard.or I found a SDK-Kit with brcmfmac4329-sdio.txt, copied the file and then the wlan was running.
The *.txt are simply forgotten to copy to the firmware directory. No idea how to fix this.
Quoted 8 lines
Hi Bernd,
The hint to solve this is found on wireless.kernel.org [1] and the answer is as Samuel suspects. This file is very board specific so OEMs manufacturing/selling the board should provide it either upon request or through some distribution like a SDK. Because of the nature of the file we do not put it on linux-firmware although people like yourself can get lucky trying ;-)
forgot:
[1] http://wireless.kernel.org/en/users/Drivers/brcm80211
Quoted 7 lines
Regards,
Arend
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Arend,
Quoted 6 lines · Arend van Spriel
Hi Bernd,
The hint to solve this is found on wireless.kernel.org [1] and the answer is as Samuel suspects. This file is very board specific so OEMs manufacturing/selling the board should provide it either upon request or through some distribution like a SDK.
There are several Win8 2-in-1 devices that do run the SDIO Full MAC chipsets and obviously there is no SDK for those. Which means no distro will ever be able to run out of the box on those.
I may be completely off the mark here, but isn't there a sensible template for those guys ? Nothing optimised, but just something that would at least make things work...
Also, the hint for pre 3.13 kernel is to copy the .bin into a .txt. Is that still the case for post 3.13 ?
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Am 17.02.2014 19:00, schrieb Samuel Ortiz:
Quoted 16 lines
Hi Arend,
Quoted 6 lines · Arend van Spriel
Hi Bernd,
The hint to solve this is found on wireless.kernel.org [1] and the answer is as Samuel suspects. This file is very board specific so OEMs manufacturing/selling the board should provide it either upon request or through some distribution like a SDK.
There are several Win8 2-in-1 devices that do run the SDIO Full MAC chipsets and obviously there is no SDK for those. Which means no distro will ever be able to run out of the box on those.
I may be completely off the mark here, but isn't there a sensible template for those guys ? Nothing optimised, but just something that would at least make things work...
Quoted 6 lines
Also, the hint for pre 3.13 kernel is to copy the .bin into a .txt. Is that still the case for post 3.13 ?
Cheers,
Samuel.
No, thats wrong. You need a special board-specific *.txt file and rename it for kernels > 3.12 to brcmfmacxxxx-sdio.txt.
Bernd
Quoted 9 lines · Samuel Ortiz
Hi Arend,
Quoted 6 lines · Arend van Spriel
Hi Bernd,
The hint to solve this is found on wireless.kernel.org [1] and the answer is as Samuel suspects. This file is very board specific so OEMs manufacturing/selling the board should provide it either upon request or through some distribution like a SDK.
Quoted 6 lines
There are several Win8 2-in-1 devices that do run the SDIO Full MAC chipsets and obviously there is no SDK for those. Which means no distro will ever be able to run out of the box on those.
I may be completely off the mark here, but isn't there a sensible template for those guys ? Nothing optimised, but just something that would at least make things work...
Last time I got the question I extracted the nvram from the windows driver installer archive. However, it may end up in (U)EFI variable space. Guess that could be accessed from Linux as well. Anyway, it may be an area where we can and maybe should improve. I will discuss this with Franky and the rest of the team over here.
Quoted 2 lines
Also, the hint for pre 3.13 kernel is to copy the .bin into a .txt. Is that still the case for post 3.13 ?
I certainly hope you misread that. Before 3.13 the driver always look for brcmfmac-sdio.bin and brcmfmac-sdio.txt regardless the device being used. That has changed so the firmware file now includes the chip id and for some even the revision, eg. brcmfmac43241b4-sdio.bin and brcmfmac43241b4-sdio.txt. The nvram file has a totally different format as the bin file so copying will fail for sure.
Regards,
Arend
Hi Arend,
Quoted 6 lines · Arend van Spriel
I certainly hope you misread that. Before 3.13 the driver always look for brcmfmac-sdio.bin and brcmfmac-sdio.txt regardless the device being used. That has changed so the firmware file now includes the chip id and for some even the revision, eg. brcmfmac43241b4-sdio.bin and brcmfmac43241b4-sdio.txt. The nvram file has a totally different format as the bin file so copying will fail for sure.
So I finally found this NVRAM file, hidden somewhere in an EFI variable (Thanks for the hint).
I have 2 questions for you:
- How can I tell if the target properly loaded this NVRAM file ? Is checking for wlan0's MAC to match the NVRAM MAC a good way to verify that ?
- I'm running this on an Asus T100 (x86 tablet). This is a BCM94324A1 over SDIO and I run wireless-next there (With your very latest brcmfmac changes). I see the driver is quite unreliable, for example scan times out most of the time as the driver puts the target to sleep while it's in the middle of receiving partial scan results. I had to increase BRCMF_WD_POLL_MS to 100ms to actually get scan results. Then the driver seems to be having a hard time joining the couple of WPA APs that I tested it against.
Am I missing something or are those instabilities to be expected with the latest brcmfmac code ? Please let me know if you need debug logs, I'll happily provide them.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Quoted 11 lines · Samuel Ortiz
Hi Arend,
Quoted 6 lines · Arend van Spriel
I certainly hope you misread that. Before 3.13 the driver always look for brcmfmac-sdio.bin and brcmfmac-sdio.txt regardless the device being used. That has changed so the firmware file now includes the chip id and for some even the revision, eg. brcmfmac43241b4-sdio.bin and brcmfmac43241b4-sdio.txt. The nvram file has a totally different format as the bin file so copying will fail for sure.
So I finally found this NVRAM file, hidden somewhere in an EFI variable (Thanks for the hint).
That is actually the first occurrence of EFI I have come across in the wild, but I mentioned it as I caught up that this was considered for Win8(.1).
Quoted 5 lines
I have 2 questions for you:
- How can I tell if the target properly loaded this NVRAM file ? Is checking for wlan0's MAC to match the NVRAM MAC a good way to verify that ?
Actually, the MAC address in NVRAM should be a backup value. The device should have a MAC address programmed in OTP on the device itself. The driver itself reads back the NVRAM to assure it is properly loaded.
Quoted 11 lines
- I'm running this on an Asus T100 (x86 tablet). This is a BCM94324A1 over SDIO and I run wireless-next there (With your very latest brcmfmac changes). I see the driver is quite unreliable, for example scan times out most of the time as the driver puts the target to sleep while it's in the middle of receiving partial scan results. I had to increase
BRCMF_WD_POLL_MSto 100ms to actually get scan results. Then the driver seems to be having a hard time joining the couple of WPA APs that I tested it against.
Am I missing something or are those instabilities to be expected with the latest brcmfmac code ? Please let me know if you need debug logs, I'll happily provide them.
Great. Please send me a log with module parameter 'debug=0x31416' of the driver probe sequence.
I also have 2 question for you ;-)
- what mmc host controller is used?
- do you have CONFIG_RUNTIME_PM enabled?
Gr. AvS
Hi Arend,
Thanks for your answers.
Quoted 6 lines · Arend van Spriel
Quoted 2 lines
So I finally found this NVRAM file, hidden somewhere in an EFI variable (Thanks for the hint).
That is actually the first occurrence of EFI I have come across in the wild, but I mentioned it as I caught up that this was considered for Win8(.1).
Yes, this device came with Win8 installed.
Quoted 9 lines
Quoted 5 lines
I have 2 questions for you:
- How can I tell if the target properly loaded this NVRAM file ? Is checking for wlan0's MAC to match the NVRAM MAC a good way to verify that ?
Actually, the MAC address in NVRAM should be a backup value. The device should have a MAC address programmed in OTP on the device itself. The driver itself reads back the NVRAM to assure it is properly loaded.
I'm asking this because when fetching the NVRAM file from UEFI, I eventually noticed the 4 first bytes were garbage. I'm not sure how the target will react to that, so I was looking for a way to verify that the NVRAM was parsed and processed properly on the target side.
Quoted 12 lines
Quoted 11 lines
- I'm running this on an Asus T100 (x86 tablet). This is a BCM94324A1 over SDIO and I run wireless-next there (With your very latest brcmfmac changes). I see the driver is quite unreliable, for example scan times out most of the time as the driver puts the target to sleep while it's in the middle of receiving partial scan results. I had to increase
BRCMF_WD_POLL_MSto 100ms to actually get scan results. Then the driver seems to be having a hard time joining the couple of WPA APs that I tested it against.
Am I missing something or are those instabilities to be expected with the latest brcmfmac code ? Please let me know if you need debug logs, I'll happily provide them.
Quoted 2 lines
Great. Please send me a log with module parameter 'debug=0x31416' of the driver probe sequence.
I'm attaching the log corresponding to a modprobe brcmfmac debug=0x31416 && ifconfig wlan0 up sequence.
I have modified this in the driver, to make it less aggressive about SDIO sleeps:
sdio_host.h:
#define BRCMF_WD_POLL_MS 200
dhd_sdio.c:
#define BRCMF_IDLE_INTERVAL 20
Quoted 1 line
I also have 2 question for you ;-)
Sorry if I sounded a bit rude, I didn't mean it :-/
Quoted 1 line
- what mmc host controller is used?
So this is sdhci-acpi.
Quoted 1 line
- do you have
CONFIG_RUNTIME_PMenabled?
CONFIG_PM_RUNTIME is enabled, yes. Do you want me to test with it disabled ?
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Quoted 10 lines · Samuel Ortiz
I'm attaching the log corresponding to a modprobe brcmfmac debug=0x31416 && ifconfig wlan0 up sequence.
I have modified this in the driver, to make it less aggressive about SDIO sleeps:
sdio_host.h:
#defineBRCMF_WD_POLL_MS200
dhd_sdio.c:
#defineBRCMF_IDLE_INTERVAL20
So this log looks fine, because due to the changes above it never goes to sleep. The log actually show it is a backport, right?
Quoted 2 lines
Quoted 1 line
Quoted 1 line
I also have 2 question for you;-)
Sorry if I sounded a bit rude, I didn't mean it :-/
I did not take it as rude so no worries.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
- what mmc host controller is used?
So this is sdhci-acpi.
Quoted 1 line
Quoted 1 line
- do you have
CONFIG_RUNTIME_PMenabled?
CONFIG_PM_RUNTIMEis enabled, yes. Do you want me to test with it disabled ?
I am asking because Russell King recently discovered that SDHCI based host controller drivers disable the SDIO interrupt. This would explain the timeout on the scan as the scan results are events from the device that require this interrupt. Even with your patches this may still happen. You can probably disable it for the host controller through sysfs.
Regards,
Arend
Quoted 6 lines · Arend van Spriel
Quoted 5 lines · Samuel Ortiz
I'm attaching the log corresponding to a modprobe brcmfmac debug=0x31416 && ifconfig wlan0 up sequence.
I have modified this in the driver, to make it less aggressive about SDIO sleeps:
Quoted 8 lines
Quoted 5 lines
sdio_host.h:
#defineBRCMF_WD_POLL_MS200
dhd_sdio.c:
#defineBRCMF_IDLE_INTERVAL20So this log looks fine, because due to the changes above it never goes to sleep. The log actually show it is a backport, right?
That's correct, yes.
Quoted 8 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
I also have 2 question for you;-)
Sorry if I sounded a bit rude, I didn't mean it :-/
I did not take it as rude so no worries.
Quoted 3 lines
Quoted 1 line
Quoted 1 line
- what mmc host controller is used?
So this is sdhci-acpi.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
- do you have
CONFIG_RUNTIME_PMenabled?
CONFIG_PM_RUNTIMEis enabled, yes. Do you want me to test with it disabled ?I am asking because Russell King recently discovered that SDHCI based host controller drivers disable the SDIO interrupt.
You mean they do so from their runtime_suspend hook ? I see the thread now:
http://www.spinics.net/lists/arm-kernel/msg308757.html
It seems those patches have not been reviewed nor merged... I'll watch that thread closely ;)
Quoted 5 lines
This would
explain the timeout on the scan as the scan results are events from the device that require this interrupt. Even with your patches this may still happen. You can probably disable it for the host controller through sysfs.
I did so, and things seem to be more stable. The throughput is a lot better. Better is expected but 20x better is something else. I still get fairly weak signal, typically -75 dBm for APs that are a few meters away. Does that sound like reasonable values to you ?
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Quoted 46 lines · Samuel Ortiz
Quoted 6 lines · Arend van Spriel
Quoted 5 lines · Samuel Ortiz
I'm attaching the log corresponding to a modprobe brcmfmac debug=0x31416 && ifconfig wlan0 up sequence.
I have modified this in the driver, to make it less aggressive about SDIO sleeps:Quoted 8 lines
Quoted 5 lines
sdio_host.h:
#defineBRCMF_WD_POLL_MS200
dhd_sdio.c:
#defineBRCMF_IDLE_INTERVAL20So this log looks fine, because due to the changes above it never goes to sleep. The log actually show it is a backport, right?
That's correct, yes.
Quoted 8 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
I also have 2 question for you;-)
Sorry if I sounded a bit rude, I didn't mean it :-/
I did not take it as rude so no worries.
Quoted 3 lines
Quoted 1 line
Quoted 1 line
- what mmc host controller is used?
So this is sdhci-acpi.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
- do you have
CONFIG_RUNTIME_PMenabled?
CONFIG_PM_RUNTIMEis enabled, yes. Do you want me to test with it disabled ?I am asking because Russell King recently discovered that SDHCI based host controller drivers disable the SDIO interrupt.
You mean they do so from their
runtime_suspendhook ? I see the thread now:http://www.spinics.net/lists/arm-kernel/msg308757.html
It seems those patches have not been reviewed nor merged... I'll watch that thread closely ;)
Quoted 5 lines
This would
explain the timeout on the scan as the scan results are events from the device that require this interrupt. Even with your patches this may still happen. You can probably disable it for the host controller through sysfs.
Quoted 4 lines
I did so, and things seem to be more stable. The throughput is a lot better. Better is expected but 20x better is something else. I still get fairly weak signal, typically -75 dBm for APs that are a few meters away. Does that sound like reasonable values to you ?
Depending on the definition of a few meters and whether there is a concrete wall in between, I tend to say -75 dBm is crap. Up to 10 meters (without aforementioned wall) I would expect something around -40 dBm.
Regards,
Arend