<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-01-09T07:24:54Z</updated>
<entry>
<title>brcmfmac: Prefer DT board type over DMI board type</title>
<updated>2023-01-09T07:24:54Z</updated>
<author>
<name>Ivan T. Ivanov</name>
<email>iivanov@suse.de</email>
</author>
<published>2023-01-06T13:19:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a5a36720c3f650f859f5e9535dd62d06f13f4f3b'/>
<id>urn:sha1:a5a36720c3f650f859f5e9535dd62d06f13f4f3b</id>
<content type='text'>
The introduction of support for Apple board types inadvertently changed
the precedence order, causing hybrid SMBIOS+DT platforms to look up the
firmware using the DMI information instead of the device tree compatible
to generate the board type. Revert back to the old behavior,
as affected platforms use firmwares named after the DT compatible.

Fixes: 7682de8b3351 ("wifi: brcmfmac: of: Fetch Apple properties")

[1] https://bugzilla.opensuse.org/show_bug.cgi?id=1206697#c13

Cc: stable@vger.kernel.org
Signed-off-by: Ivan T. Ivanov &lt;iivanov@suse.de&gt;
Reviewed-by: Hector Martin &lt;marcan@marcan.st&gt;
Reviewed-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Tested-by: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>wifi: brcmfmac: of: Fetch Apple properties</title>
<updated>2022-09-19T09:59:34Z</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2022-09-16T16:02:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7682de8b3351b824a9632b137f17f10951212b53'/>
<id>urn:sha1:7682de8b3351b824a9632b137f17f10951212b53</id>
<content type='text'>
On Apple ARM64 platforms, firmware selection requires two properties
that come from system firmware: the module-instance (aka "island", a
codename representing a given hardware platform) and the antenna-sku.
We map Apple's module codenames to board_types in the form
"apple,&lt;module-instance&gt;".

The mapped board_type is added to the DTS file in that form, while the
antenna-sku is forwarded by our bootloader from the Apple Device Tree
into the FDT. Grab them from the DT so firmware selection can use
them.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Reviewed-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/E1oZDnn-0077aS-NA@rmk-PC.armlinux.org.uk
</content>
</entry>
<entry>
<title>wifi: brcmfmac: support brcm,ccode-map-trivial DT property</title>
<updated>2022-07-28T09:58:42Z</updated>
<author>
<name>Alvin Šipraga</name>
<email>alsi@bang-olufsen.dk</email>
</author>
<published>2022-07-11T12:30:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5c54ab24377b999c7f1c30b41218e6490cd4ac80'/>
<id>urn:sha1:5c54ab24377b999c7f1c30b41218e6490cd4ac80</id>
<content type='text'>
Commit a21bf90e927f ("brcmfmac: use ISO3166 country code and 0 rev as
fallback on some devices") introduced a fallback mechanism whereby a
trivial mapping from ISO3166 country codes to firmware country code and
revision is used on some devices. This fallback operates on the device
level, so it is enabled only for certain supported chipsets.

In general though, the firmware country codes are determined by the CLM
blob, which is board-specific and may vary despite the underlying
chipset being the same.

The aforementioned commit is actually a refinement of a previous commit
that was reverted in commit 151a7c12c4fc ("Revert "brcmfmac: use ISO3166
country code and 0 rev as fallback"") due to regressions with a BCM4359
device. The refinement restricted the fallback mechanism to specific
chipsets such as the BCM4345.

We use a chipset - CYW88359 - that the driver identifies as a BCM4359
too. But in our case, the CLM blob uses ISO3166 country codes
internally, and all with revision 0. So the trivial mapping is exactly
what is needed in order for the driver to sync the kernel regulatory
domain to the firmware. This is just a matter of how the CLM blob was
prepared by the hardware vendor. The same could hold for other boards
too.

Although the brcm,ccode-map device tree property is useful for cases
where the mapping is more complex, the trivial case invites a much
simpler specification. This patch adds support for parsing the
brcm,ccode-map-trivial device tree property. Subordinate to the more
specific brcm,ccode-map property, this new proprety simply informs the
driver that the fallback method should be used in every case.

In the absence of the new property in the device tree, expect no
functional change.

Signed-off-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Reviewed-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220711123005.3055300-3-alvin@pqrs.dk
</content>
</entry>
<entry>
<title>wifi: brcmfmac: use strreplace() in brcmf_of_probe()</title>
<updated>2022-07-28T09:55:51Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-06-16T07:54:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bef11f1edc40cee156c60f9dbbbd9725a56b3639'/>
<id>urn:sha1:bef11f1edc40cee156c60f9dbbbd9725a56b3639</id>
<content type='text'>
The for loop in brcmf_of_probe() would ideally end with something like
"i &lt;= strlen(board_type)" instead of "i &lt; board_type[i]".  But
fortunately, the two are equivalent.

Anyway, it's simpler to use strreplace() instead.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Suggested-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/YqrhsKcjEA7B2pC4@kili
</content>
</entry>
<entry>
<title>brcmfmac: allow setting wlan MAC address using device tree</title>
<updated>2022-05-11T05:27:14Z</updated>
<author>
<name>Pavel Löbl</name>
<email>pavel@loebl.cz</email>
</author>
<published>2022-05-06T04:42:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=716c220b4d990a4fe7800d0685ca69dee99e4e8f'/>
<id>urn:sha1:716c220b4d990a4fe7800d0685ca69dee99e4e8f</id>
<content type='text'>
This allows firmware to provide MAC address using device tree. Like in
case there is no MAC burned in wlan NVRAM.

Signed-off-by: Pavel Löbl &lt;pavel@loebl.cz&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220506044246.67146-1-pavel@loebl.cz
</content>
</entry>
<entry>
<title>brcmfmac: of: remove redundant variable len</title>
<updated>2022-02-10T08:46:48Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-02-07T13:33:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2fd6d2ef68607b9da952796c7aab352791daec66'/>
<id>urn:sha1:2fd6d2ef68607b9da952796c7aab352791daec66</id>
<content type='text'>
The variable len is being assigned bit is never used. The variable
and the strlen call are redundant and can be removed.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220207133329.336664-1-colin.i.king@gmail.com
</content>
</entry>
<entry>
<title>brcmfmac: of: Use devm_kstrdup for board_type &amp; check for errors</title>
<updated>2022-02-01T12:27:07Z</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2022-01-31T16:07:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9cf6d7f2c5549b47e0dbf09fd64557a4a69cbd28'/>
<id>urn:sha1:9cf6d7f2c5549b47e0dbf09fd64557a4a69cbd28</id>
<content type='text'>
This was missing a NULL check, and we can collapse the strlen/alloc/copy
into a devm_kstrdup().

Reviewed-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220131160713.245637-8-marcan@marcan.st
</content>
</entry>
<entry>
<title>brcmfmac: Replace zero-length array with flexible array member</title>
<updated>2021-09-24T11:20:44Z</updated>
<author>
<name>Len Baker</name>
<email>len.baker@gmx.com</email>
</author>
<published>2021-09-04T09:22:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3fd445a4d49fce594eecc90b9bbcf85cd223154d'/>
<id>urn:sha1:3fd445a4d49fce594eecc90b9bbcf85cd223154d</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use "flexible array members"[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].

Also, make use of the struct_size() helper in devm_kzalloc().

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.14/process/deprecated.html#zero-length-and-one-element-arrays

Signed-off-by: Len Baker &lt;len.baker@gmx.com&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210904092217.2848-1-len.baker@gmx.com
</content>
</entry>
<entry>
<title>brcmfmac: support parse country code map from DT</title>
<updated>2021-06-24T16:20:31Z</updated>
<author>
<name>Shawn Guo</name>
<email>shawn.guo@linaro.org</email>
</author>
<published>2021-04-17T07:54:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1a3ac5c651a0c859bdea64ed964fc93c2ba980d3'/>
<id>urn:sha1:1a3ac5c651a0c859bdea64ed964fc93c2ba980d3</id>
<content type='text'>
With any regulatory domain requests coming from either user space or
802.11 IE (Information Element), the country is coded in ISO3166
standard.  It needs to be translated to firmware country code and
revision with the mapping info in settings-&gt;country_codes table.
Support populate country_codes table by parsing the mapping from DT.

The BRCMF_BUSTYPE_SDIO bus_type check gets separated from general DT
validation, so that country code can be handled as general part rather
than SDIO bus specific one.

Signed-off-by: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Reviewed-by: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210417075428.2671-1-shawn.guo@linaro.org
</content>
</entry>
<entry>
<title>brcmfmac: Transform compatible string for FW loading</title>
<updated>2020-07-14T09:50:43Z</updated>
<author>
<name>Matthias Brugger</name>
<email>mbrugger@suse.com</email>
</author>
<published>2020-07-01T11:22:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=29e354ebeeecaee979e6fe22cd6272682d7552c9'/>
<id>urn:sha1:29e354ebeeecaee979e6fe22cd6272682d7552c9</id>
<content type='text'>
The driver relies on the compatible string from DT to determine which
FW configuration file it should load. The DTS spec allows for '/' as
part of the compatible string. We change this to '-' so that we will
still be able to load the config file, even when the compatible has a
'/'. This fixes explicitly the firmware loading for
"solidrun,cubox-i/q".

Signed-off-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Reviewed-by: Hans deGoede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200701112201.6449-1-matthias.bgg@kernel.org
</content>
</entry>
</feed>
