<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/wireless/silabs, branch v6.6.39</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.39'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-03-26T22:19:27+00:00</updated>
<entry>
<title>wifi: wfx: fix memory leak when starting AP</title>
<updated>2024-03-26T22:19:27+00:00</updated>
<author>
<name>Jérôme Pouiller</name>
<email>jerome.pouiller@silabs.com</email>
</author>
<published>2024-02-02T16:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a71ec74e5e3478d202a1874f085ca3ef40be49b'/>
<id>urn:sha1:3a71ec74e5e3478d202a1874f085ca3ef40be49b</id>
<content type='text'>
[ Upstream commit b8cfb7c819dd39965136a66fe3a7fde688d976fc ]

Kmemleak reported this error:

    unreferenced object 0xd73d1180 (size 184):
      comm "wpa_supplicant", pid 1559, jiffies 13006305 (age 964.245s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 1e 00 01 00 00 00 00 00  ................
      backtrace:
        [&lt;5ca11420&gt;] kmem_cache_alloc+0x20c/0x5ac
        [&lt;127bdd74&gt;] __alloc_skb+0x144/0x170
        [&lt;fb8a5e38&gt;] __netdev_alloc_skb+0x50/0x180
        [&lt;0f9fa1d5&gt;] __ieee80211_beacon_get+0x290/0x4d4 [mac80211]
        [&lt;7accd02d&gt;] ieee80211_beacon_get_tim+0x54/0x18c [mac80211]
        [&lt;41e25cc3&gt;] wfx_start_ap+0xc8/0x234 [wfx]
        [&lt;93a70356&gt;] ieee80211_start_ap+0x404/0x6b4 [mac80211]
        [&lt;a4a661cd&gt;] nl80211_start_ap+0x76c/0x9e0 [cfg80211]
        [&lt;47bd8b68&gt;] genl_rcv_msg+0x198/0x378
        [&lt;453ef796&gt;] netlink_rcv_skb+0xd0/0x130
        [&lt;6b7c977a&gt;] genl_rcv+0x34/0x44
        [&lt;66b2d04d&gt;] netlink_unicast+0x1b4/0x258
        [&lt;f965b9b6&gt;] netlink_sendmsg+0x1e8/0x428
        [&lt;aadb8231&gt;] ____sys_sendmsg+0x1e0/0x274
        [&lt;d2b5212d&gt;] ___sys_sendmsg+0x80/0xb4
        [&lt;69954f45&gt;] __sys_sendmsg+0x64/0xa8
    unreferenced object 0xce087000 (size 1024):
      comm "wpa_supplicant", pid 1559, jiffies 13006305 (age 964.246s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        10 00 07 40 00 00 00 00 00 00 00 00 00 00 00 00  ...@............
      backtrace:
        [&lt;9a993714&gt;] __kmalloc_track_caller+0x230/0x600
        [&lt;f83ea192&gt;] kmalloc_reserve.constprop.0+0x30/0x74
        [&lt;a2c61343&gt;] __alloc_skb+0xa0/0x170
        [&lt;fb8a5e38&gt;] __netdev_alloc_skb+0x50/0x180
        [&lt;0f9fa1d5&gt;] __ieee80211_beacon_get+0x290/0x4d4 [mac80211]
        [&lt;7accd02d&gt;] ieee80211_beacon_get_tim+0x54/0x18c [mac80211]
        [&lt;41e25cc3&gt;] wfx_start_ap+0xc8/0x234 [wfx]
        [&lt;93a70356&gt;] ieee80211_start_ap+0x404/0x6b4 [mac80211]
        [&lt;a4a661cd&gt;] nl80211_start_ap+0x76c/0x9e0 [cfg80211]
        [&lt;47bd8b68&gt;] genl_rcv_msg+0x198/0x378
        [&lt;453ef796&gt;] netlink_rcv_skb+0xd0/0x130
        [&lt;6b7c977a&gt;] genl_rcv+0x34/0x44
        [&lt;66b2d04d&gt;] netlink_unicast+0x1b4/0x258
        [&lt;f965b9b6&gt;] netlink_sendmsg+0x1e8/0x428
        [&lt;aadb8231&gt;] ____sys_sendmsg+0x1e0/0x274
        [&lt;d2b5212d&gt;] ___sys_sendmsg+0x80/0xb4

However, since the kernel is build optimized, it seems the stack is not
accurate. It appears the issue is related to wfx_set_mfp_ap(). The issue
is obvious in this function: memory allocated by ieee80211_beacon_get()
is never released. Fixing this leak makes kmemleak happy.

Reported-by: Ulrich Mohr &lt;u.mohr@semex-engcon.com&gt;
Co-developed-by: Ulrich Mohr &lt;u.mohr@semex-engcon.com&gt;
Signed-off-by: Ulrich Mohr &lt;u.mohr@semex-engcon.com&gt;
Fixes: 268bceec1684 ("staging: wfx: fix BA when device is AP and MFP is enabled")
Signed-off-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://msgid.link/20240202164213.1606145-1-jerome.pouiller@silabs.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap()</title>
<updated>2024-02-05T20:14:22+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dmantipov@yandex.ru</email>
</author>
<published>2023-12-04T17:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ab224744a47363f74ea29c6894c405e3bcf5132'/>
<id>urn:sha1:9ab224744a47363f74ea29c6894c405e3bcf5132</id>
<content type='text'>
[ Upstream commit fe0a7776d4d19e613bb8dd80fe2d78ae49e8b49d ]

Since 'ieee80211_beacon_get()' can return NULL, 'wfx_set_mfp_ap()'
should check the return value before examining skb data. So convert
the latter to return an appropriate error code and propagate it to
return from 'wfx_start_ap()' as well. Compile tested only.

Signed-off-by: Dmitry Antipov &lt;dmantipov@yandex.ru&gt;
Tested-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Acked-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20231204171130.141394-1-dmantipov@yandex.ru
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: wfx: fix case where rates are out of order</title>
<updated>2023-11-20T10:59:00+00:00</updated>
<author>
<name>Felipe Negrelli Wolter</name>
<email>felipe.negrelliwolter@silabs.com</email>
</author>
<published>2023-10-04T12:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a498ca6e4b3d562c8fdf6645a745fcb6685100e0'/>
<id>urn:sha1:a498ca6e4b3d562c8fdf6645a745fcb6685100e0</id>
<content type='text'>
[ Upstream commit ea2274ab0b18549dbf0e755e41d8c5e8b5232dc3 ]

When frames are sent over the air, the device always applies the data
rates in descending order. The driver assumed Minstrel also provided
rate in descending order.

However, in some cases, Minstrel can a choose a fallback rate greater
than the primary rate. In this case, the two rates was inverted, the
device try highest rate first and we get many retries.

Since the device always applies rates in descending order, the
workaround is to drop the rate when it higher than its predecessor in
the rate list. Thus [ 4, 5, 3 ] becomes [ 4, 3 ].

This patch has been tested in isolated room with a series of
attenuators. Here are the Minstrel statistics with 80dBm of attenuation:

  Without the fix:

                  best    ____________rate__________    ____statistics___    _____last____    ______sum-of________
    mode guard #  rate   [name   idx airtime  max_tp]  [avg(tp) avg(prob)]  [retry|suc|att]  [#success | #attempts]
    HT20  LGI  1       S  MCS0     0    1477     5.6       5.2      82.7       3     0 0             3   4
    HT20  LGI  1          MCS1     1     738    10.6       0.0       0.0       0     0 0             0   1
    HT20  LGI  1     D    MCS2     2     492    14.9      13.5      81.5       5     0 0             5   9
    HT20  LGI  1    C     MCS3     3     369    18.8      17.6      84.3       5     0 0            76   96
    HT20  LGI  1  A   P   MCS4     4     246    25.4      22.4      79.5       5     0 0         11268   14026
    HT20  LGI  1   B   S  MCS5     5     185    30.7      19.7      57.7       5     8 9          3918   9793
    HT20  LGI  1          MCS6     6     164    33.0       0.0       0.0       5     0 0             6   102
    HT20  LGI  1          MCS7     7     148    35.1       0.0       0.0       0     0 0             0   44

  With the fix:

                  best    ____________rate__________    ____statistics___    _____last____    ______sum-of________
    mode guard #  rate   [name   idx airtime  max_tp]  [avg(tp) avg(prob)]  [retry|suc|att]  [#success | #attempts]
    HT20  LGI  1       S  MCS0     0    1477     5.6       1.8      28.6       1     0 0             1   5
    HT20  LGI  1     DP   MCS1     1     738    10.6       9.7      82.6       4     0 0            14   34
    HT20  LGI  1          MCS2     2     492    14.9       9.2      55.4       5     0 0            52   77
    HT20  LGI  1   B   S  MCS3     3     369    18.8      15.6      74.9       5     1 1           417   554
    HT20  LGI  1  A       MCS4     4     246    25.4      16.7      59.2       5     1 1         13812   17951
    HT20  LGI  1    C  S  MCS5     5     185    30.7      14.0      41.0       5     1 5            57   640
    HT20  LGI  1          MCS6     6     164    33.0       0.0       0.0       0     0 1             0   48
    HT20  LGI  1       S  MCS7     7     148    35.1       0.0       0.0       0     0 0             0   36

We can notice the device try now to send with lower rates (and high
success rates). At the end, we measured 20-25% better throughput with
this patch.

Fixes: 9bca45f3d692 ("staging: wfx: allow to send 802.11 frames")
Tested-by: Olivier Souloumiac &lt;olivier.souloumiac@silabs.com&gt;
Tested-by: Alexandr Suslenko &lt;suslenko.o@ajax.systems&gt;
Reported-by: Alexandr Suslenko &lt;suslenko.o@ajax.systems&gt;
Co-developed-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Signed-off-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Signed-off-by: Felipe Negrelli Wolter &lt;felipe.negrelliwolter@silabs.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20231004123039.157112-1-jerome.pouiller@silabs.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: wfx: Use devm_kmemdup to replace devm_kmalloc + memcpy</title>
<updated>2023-08-23T11:09:23+00:00</updated>
<author>
<name>Li Zetao</name>
<email>lizetao1@huawei.com</email>
</author>
<published>2023-08-10T11:49:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eaa8023e9bb30926b154af72be0cadbebfc8e878'/>
<id>urn:sha1:eaa8023e9bb30926b154af72be0cadbebfc8e878</id>
<content type='text'>
Use the helper function devm_kmemdup() rather than duplicating its
implementation, which helps to enhance code readability.

Signed-off-by: Li Zetao &lt;lizetao1@huawei.com&gt;
Reviewed-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230810114939.2104013-1-lizetao1@huawei.com
</content>
</entry>
<entry>
<title>wifi: drivers: Explicitly include correct DT includes</title>
<updated>2023-08-01T14:48:38+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-24T21:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e7899a90cebec045ce88505d496d8453174044c2'/>
<id>urn:sha1:e7899a90cebec045ce88505d496d8453174044c2</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20230724211914.805876-1-robh@kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'spi-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi</title>
<updated>2023-04-27T18:02:26+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-04-27T18:02:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc2e58b8b7c94b8fe23977775550de00472f6a74'/>
<id>urn:sha1:fc2e58b8b7c94b8fe23977775550de00472f6a74</id>
<content type='text'>
Pull spi updates from Mark Brown:
 "A fairly standard release for SPI with the exception of a change to
  the API for specifying chip selects done in preparation for supporting
  devices with more than one chip select, this required some mechanical
  changes throughout the tree which have been cooking in -next happily
  for a while.

  There's also a new API to allow us to support TPM chips on half duplex
  controllers.

  Summary:

   - Refactoring in preparation for supporting multiple chip selects for
     a single device, needed by some flash devices, which required a
     change in the SPI device API visible throughout the tree

   - Support for hardware assisted interaction with SPI TPMs on half
     duplex controllers, implemented on nVidia Tedra210 QuadSPI

   - Optimisation for large transfers on fsl-cpm devices

   - Cleanups around device property use which fix some sisues with
     fwnode

   - Use of both void remove() and devm_platform_.*ioremap_resource()

   - Support for AMD Pensando Elba, Amlogic A1, Cadence device mode,
     Intel MetorLake-S and StarFive J7110 QuadSPI"

* tag 'spi-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (185 commits)
  spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS
  spi: tegra210-quad: Enable TPM wait polling
  spi: Add TPM HW flow flag
  spi: bcm63xx: remove PM_SLEEP based conditional compilation
  spi: cadence-quadspi: use macro DEFINE_SIMPLE_DEV_PM_OPS
  spi: spi-cadence: Add support for Slave mode
  spi: spi-cadence: Switch to spi_controller structure
  spi: cadence-quadspi: fix suspend-resume implementations
  spi: dw: Add support for AMD Pensando Elba SoC
  spi: dw: Add AMD Pensando Elba SoC SPI Controller
  spi: cadence-quadspi: Disable the SPI before reconfiguring
  spi: cadence-quadspi: Update the read timeout based on the length
  spi: spi-loopback-test: Add module param for iteration length
  spi: add support for Amlogic A1 SPI Flash Controller
  dt-bindings: spi: add Amlogic A1 SPI controller
  spi: fsl-spi: No need to check transfer length versus word size
  spi: fsl-spi: Change mspi_apply_cpu_mode_quirks() to void
  spi: fsl-cpm: Use 16 bit mode for large transfers with even size
  spi: fsl-spi: Re-organise transfer bits_per_word adaptation
  spi: fsl-spi: Fix CPM/QE mode Litte Endian
  ...
</content>
</entry>
<entry>
<title>net: Replace all spi-&gt;chip_select and spi-&gt;cs_gpiod references with function call</title>
<updated>2023-03-11T12:34:02+00:00</updated>
<author>
<name>Amit Kumar Mahapatra</name>
<email>amit.kumar-mahapatra@amd.com</email>
</author>
<published>2023-03-10T17:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25fd0550d9b9c92288a17fb7d605cdcdb4a65a64'/>
<id>urn:sha1:25fd0550d9b9c92288a17fb7d605cdcdb4a65a64</id>
<content type='text'>
Supporting multi-cs in spi drivers would require the chip_select &amp; cs_gpiod
members of struct spi_device to be an array. But changing the type of these
members to array would break the spi driver functionality. To make the
transition smoother introduced four new APIs to get/set the
spi-&gt;chip_select &amp; spi-&gt;cs_gpiod and replaced all spi-&gt;chip_select and
spi-&gt;cs_gpiod references with get or set API calls.
While adding multi-cs support in further patches the chip_select &amp; cs_gpiod
members of the spi_device structure would be converted to arrays &amp; the
"idx" parameter of the APIs would be used as array index i.e.,
spi-&gt;chip_select[idx] &amp; spi-&gt;cs_gpiod[idx] respectively.

Signed-off-by: Amit Kumar Mahapatra &lt;amit.kumar-mahapatra@amd.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/20230310173217.3429788-3-amit.kumar-mahapatra@amd.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: wfx: Remove some dead code</title>
<updated>2023-02-22T12:28:27+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-02-15T12:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=015bf4df8ea67080668ac8314e692076dea1ce6d'/>
<id>urn:sha1:015bf4df8ea67080668ac8314e692076dea1ce6d</id>
<content type='text'>
wait_for_completion_timeout() can not return a &lt;0 value.
So simplify the logic and remove dead code.

-ERESTARTSYS can not be returned by do_wait_for_common() for tasks with
TASK_UNINTERRUPTIBLE, which is the case for wait_for_completion_timeout()

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Reviewed-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/809c4a645c8d1306c0d256345515865c40ec731c.1676464422.git.christophe.jaillet@wanadoo.fr
</content>
</entry>
<entry>
<title>wifi: mac80211: add wake_tx_queue callback to drivers</title>
<updated>2022-10-10T09:00:03+00:00</updated>
<author>
<name>Alexander Wetzel</name>
<email>alexander@wetzel-home.de</email>
</author>
<published>2022-10-09T16:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a790cc3a4fad75048295571a350b95b87e022a5a'/>
<id>urn:sha1:a790cc3a4fad75048295571a350b95b87e022a5a</id>
<content type='text'>
mac80211 is fully switching over to the internal TX queue (iTXQ)
implementation. Update all drivers not yet providing the now mandatory
wake_tx_queue() callback.

As an side effect the netdev interfaces of all updated drivers will
switch to the noqueue qdisc.

Signed-off-by: Alexander Wetzel &lt;alexander@wetzel-home.de&gt;
[add staging drivers]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wifi: wfx: prevent underflow in wfx_send_pds()</title>
<updated>2022-09-02T08:44:35+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-08-19T05:23:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f97c81f5b7f8047810b0d79a8f759a83951210a0'/>
<id>urn:sha1:f97c81f5b7f8047810b0d79a8f759a83951210a0</id>
<content type='text'>
This does a "chunk_len - 4" subtraction later when it calls:

	ret = wfx_hif_configuration(wdev, buf + 4, chunk_len - 4);

so check for "chunk_len" is less than 4.

Fixes: dcbecb497908 ("staging: wfx: allow new PDS format")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Jérôme Pouiller &lt;jerome.pouiller@silabs.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/Yv8eX7Xv2ubUOvW7@kili
</content>
</entry>
</feed>
