<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/wireless/ti, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-07-19T08:00:59Z</updated>
<entry>
<title>wl1251: Fix possible buffer overflow in wl1251_cmd_scan</title>
<updated>2021-07-19T08:00:59Z</updated>
<author>
<name>Lee Gibson</name>
</author>
<published>2021-04-28T11:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=302e2ee34c5f7c5d805b7f835d9a6f2b43474e2a'/>
<id>urn:sha1:302e2ee34c5f7c5d805b7f835d9a6f2b43474e2a</id>
<content type='text'>
[ Upstream commit d10a87a3535cce2b890897914f5d0d83df669c63 ]

Function wl1251_cmd_scan calls memcpy without checking the length.
Harden by checking the length is within the maximum allowed size.

Signed-off-by: Lee Gibson &lt;leegib@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210428115508.25624-1-leegib@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wlcore/wl12xx: Fix wl12xx get_mac error if device is in ELP</title>
<updated>2021-07-19T08:00:59Z</updated>
<author>
<name>Tony Lindgren</name>
</author>
<published>2021-06-03T06:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0139a3e7de3bea1d823d80f193a94d6a80663862'/>
<id>urn:sha1:0139a3e7de3bea1d823d80f193a94d6a80663862</id>
<content type='text'>
[ Upstream commit 11ef6bc846dcdce838f0b00c5f6a562c57e5d43b ]

At least on wl12xx, reading the MAC after boot can fail with a warning
at drivers/net/wireless/ti/wlcore/sdio.c:78 wl12xx_sdio_raw_read.
The failed call comes from wl12xx_get_mac() that wlcore_nvs_cb() calls
after request_firmware_work_func().

After the error, no wireless interface is created. Reloading the wl12xx
module makes the interface work.

Turns out the wlan controller can be in a low-power ELP state after the
boot from the bootloader or kexec, and needs to be woken up first.

Let's wake the hardware and add a sleep after that similar to
wl12xx_pre_boot() is already doing.

Note that a similar issue could exist for wl18xx, but I have not seen it
so far. And a search for wl18xx_get_mac and wl12xx_sdio_raw_read did not
produce similar errors.

Cc: Carl Philipp Klemm &lt;philipp@uvos.xyz&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210603062814.19464-1-tony@atomide.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wlcore: Fix buffer overrun by snprintf due to incorrect buffer size</title>
<updated>2021-05-14T08:53:02Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2021-04-19T14:14:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7748383030f2dbffde9b4c24d0a899a7c0c621e8'/>
<id>urn:sha1:7748383030f2dbffde9b4c24d0a899a7c0c621e8</id>
<content type='text'>
[ Upstream commit a9a4c080deb33f44e08afe35f4ca4bb9ece89f4e ]

The size of the buffer than can be written to is currently incorrect, it is
always the size of the entire buffer even though the snprintf is writing
as position pos into the buffer. Fix this by setting the buffer size to be
the number of bytes left in the buffer, namely sizeof(buf) - pos.

Addresses-Coverity: ("Out-of-bounds access")
Fixes: 7b0e2c4f6be3 ("wlcore: fix overlapping snprintf arguments in debugfs")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210419141405.180582-1-colin.king@canonical.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wlcore: fix overlapping snprintf arguments in debugfs</title>
<updated>2021-05-14T08:52:58Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2021-03-23T12:57:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f5f2fd30be85a5dd71856e09db9623385e61590f'/>
<id>urn:sha1:f5f2fd30be85a5dd71856e09db9623385e61590f</id>
<content type='text'>
[ Upstream commit 7b0e2c4f6be3ec68bf807c84e985e81c21404cd1 ]

gcc complains about undefined behavior in calling snprintf()
with the same buffer as input and output:

drivers/net/wireless/ti/wl18xx/debugfs.c: In function 'diversity_num_of_packets_per_ant_read':
drivers/net/wireless/ti/wl18xx/../wlcore/debugfs.h:86:3: error: 'snprintf' argument 4 overlaps destination object 'buf' [-Werror=restrict]
   86 |   snprintf(buf, sizeof(buf), "%s[%d] = %d\n",  \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   87 |     buf, i, stats-&gt;sub.name[i]);   \
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ti/wl18xx/debugfs.c:24:2: note: in expansion of macro 'DEBUGFS_FWSTATS_FILE_ARRAY'
   24 |  DEBUGFS_FWSTATS_FILE_ARRAY(a, b, c, wl18xx_acx_statistics)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ti/wl18xx/debugfs.c:159:1: note: in expansion of macro 'WL18XX_DEBUGFS_FWSTATS_FILE_ARRAY'
  159 | WL18XX_DEBUGFS_FWSTATS_FILE_ARRAY(diversity, num_of_packets_per_ant,

There are probably other ways of handling the debugfs file, without
using on-stack buffers, but a simple workaround here is to remember the
current position in the buffer and just keep printing in there.

Fixes: bcca1bbdd412 ("wlcore: add debugfs macro to help print fw statistics arrays")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210323125723.1961432-1-arnd@kernel.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wl1251: cmd: remove redundant assignment</title>
<updated>2021-02-08T11:17:59Z</updated>
<author>
<name>wengjianfeng</name>
</author>
<published>2021-02-03T06:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05d7f330748881385dad49db56f319a3ea099afd'/>
<id>urn:sha1:05d7f330748881385dad49db56f319a3ea099afd</id>
<content type='text'>
-ENOMEM has been used as a return value,it is not necessary to
assign it, and if kzalloc fail,not need free it,so just return
-ENOMEM when kzalloc fail.

Signed-off-by: wengjianfeng &lt;wengjianfeng@yulong.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210203060306.2832-1-samirweng1979@163.com
</content>
</entry>
<entry>
<title>wlcore: Fix command execute failure 19 for wl12xx</title>
<updated>2021-01-25T14:42:12Z</updated>
<author>
<name>Tony Lindgren</name>
</author>
<published>2021-01-15T06:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb88d01b67383a095e3f7caeb4cdade5a6cf0417'/>
<id>urn:sha1:cb88d01b67383a095e3f7caeb4cdade5a6cf0417</id>
<content type='text'>
We can currently get a "command execute failure 19" error on beacon loss
if the signal is weak:

wlcore: Beacon loss detected. roles:0xff
wlcore: Connection loss work (role_id: 0).
...
wlcore: ERROR command execute failure 19
...
WARNING: CPU: 0 PID: 1552 at drivers/net/wireless/ti/wlcore/main.c:803
...
(wl12xx_queue_recovery_work.part.0 [wlcore])
(wl12xx_cmd_role_start_sta [wlcore])
(wl1271_op_bss_info_changed [wlcore])
(ieee80211_prep_connection [mac80211])

Error 19 is defined as CMD_STATUS_WRONG_NESTING from the wlcore firmware,
and seems to mean that the firmware no longer wants to see the quirk
handling for WLCORE_QUIRK_START_STA_FAILS done.

This quirk got added with commit 18eab430700d ("wlcore: workaround
start_sta problem in wl12xx fw"), and it seems that this already got fixed
in the firmware long time ago back in 2012 as wl18xx never had this quirk
in place to start with.

As we no longer even support firmware that early, to me it seems that it's
safe to just drop WLCORE_QUIRK_START_STA_FAILS to fix the error. Looks
like earlier firmware got disabled back in 2013 with commit 0e284c074ef9
("wl12xx: increase minimum singlerole firmware version required").

If it turns out we still need WLCORE_QUIRK_START_STA_FAILS with any
firmware that the driver works with, we can simply revert this patch and
add extra checks for firmware version used.

With this fix wlcore reconnects properly after a beacon loss.

Cc: Raz Bouganim &lt;r-bouganim@ti.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210115065613.7731-1-tony@atomide.com
</content>
</entry>
<entry>
<title>wlcore: Downgrade exceeded max RX BA sessions to debug</title>
<updated>2021-01-14T17:33:53Z</updated>
<author>
<name>Tony Lindgren</name>
</author>
<published>2021-01-01T06:59:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07ceefa3012f43512e93931980bd3bdf5af96344'/>
<id>urn:sha1:07ceefa3012f43512e93931980bd3bdf5af96344</id>
<content type='text'>
We can get the following in the logs every few minutes or so:

wlcore: ERROR exceeded max RX BA sessions

Let's downgrade the message to a debug message as suggested by the TI
support folks at:

https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/p/352435/1244754

"The WL127x firmware supports max of 3 BA sessions. It cannot be increased.
 I think the problem here is the peer trying to initiate a 4th BA session
 (ADDBA request)."

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210101065955.63386-1-tony@atomide.com
</content>
</entry>
<entry>
<title>wl1251: remove trailing semicolon in macro definition</title>
<updated>2020-12-02T19:39:20Z</updated>
<author>
<name>Tom Rix</name>
</author>
<published>2020-11-27T18:08:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fc6877b87982defcacef96934b8aafa4a31c7d83'/>
<id>urn:sha1:fc6877b87982defcacef96934b8aafa4a31c7d83</id>
<content type='text'>
The macro use will already have a semicolon.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20201127180835.2769297-1-trix@redhat.com
</content>
</entry>
<entry>
<title>wlcore: Switch to using the new API kobj_to_dev()</title>
<updated>2020-12-02T19:25:39Z</updated>
<author>
<name>Tian Tao</name>
</author>
<published>2020-11-23T01:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b52cf6242b49c86bba2b5753a43a4e5999c4171'/>
<id>urn:sha1:3b52cf6242b49c86bba2b5753a43a4e5999c4171</id>
<content type='text'>
Switch to using the new API kobj_to_dev().

Signed-off-by: Tian Tao &lt;tiantao6@hisilicon.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1606096062-32251-1-git-send-email-tiantao6@hisilicon.com
</content>
</entry>
<entry>
<title>wlcore: spi: Demote a non-compliant function header, fix another</title>
<updated>2020-11-07T16:05:38Z</updated>
<author>
<name>Lee Jones</name>
</author>
<published>2020-11-02T11:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=409d1c82bf89415495e8ec1fc2268fa8e9fbe0f1'/>
<id>urn:sha1:409d1c82bf89415495e8ec1fc2268fa8e9fbe0f1</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/net/wireless/ti/wlcore/spi.c:403: warning: Function parameter or member 'child' not described in 'wl12xx_spi_set_block_size'
 drivers/net/wireless/ti/wlcore/spi.c:403: warning: Function parameter or member 'blksz' not described in 'wl12xx_spi_set_block_size'
 drivers/net/wireless/ti/wlcore/spi.c:440: warning: Excess function parameter 'res' description in 'wlcore_probe_of'

Cc: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Jakub Kicinski &lt;kuba@kernel.org&gt;
Cc: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Cc: Luciano Coelho &lt;luciano.coelho@nokia.com&gt;
Cc: Juuso Oikarinen &lt;juuso.oikarinen@nokia.com&gt;
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20201102112410.1049272-36-lee.jones@linaro.org
Link: https://lore.kernel.org/r/20201102112410.1049272-37-lee.jones@linaro.org
</content>
</entry>
</feed>
