<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.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-03-10T08:28:03Z</updated>
<entry>
<title>wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid()</title>
<updated>2023-03-10T08:28:03Z</updated>
<author>
<name>Zhengchao Shao</name>
<email>shaozhengchao@huawei.com</email>
</author>
<published>2022-12-07T01:31:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55b81a6c138629de4318d680ed80abcb81eec606'/>
<id>urn:sha1:55b81a6c138629de4318d680ed80abcb81eec606</id>
<content type='text'>
[ Upstream commit b9f420032f2ba1e634b22ca7b433e5c40ea663af ]

After the DMA buffer is mapped to a physical address, address is stored
in pktids in brcmf_msgbuf_alloc_pktid(). Then, pktids is parsed in
brcmf_msgbuf_get_pktid()/brcmf_msgbuf_release_array() to obtain physaddr
and later unmap the DMA buffer. But when count is always equal to
pktids-&gt;array_size, physaddr isn't stored in pktids and the DMA buffer
will not be unmapped anyway.

Fixes: 9a1bb60250d2 ("brcmfmac: Adding msgbuf protocol.")
Signed-off-by: Zhengchao Shao &lt;shaozhengchao@huawei.com&gt;
Reviewed-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20221207013114.1748936-1-shaozhengchao@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: brcmfmac: fix scheduling while atomic issue when deleting flowring</title>
<updated>2022-08-10T05:47:22Z</updated>
<author>
<name>Wright Feng</name>
<email>wright.feng@cypress.com</email>
</author>
<published>2022-07-22T11:56:27Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=09be7546a602ea2d0959fc13515765221da248f2'/>
<id>urn:sha1:09be7546a602ea2d0959fc13515765221da248f2</id>
<content type='text'>
We should not sleep while holding the spin lock. It makes
'scheduling while atomic' in brcmf_msgbuf_delete_flowring.
And to avoid race condition between deleting flowring and txflow,
we only hold spin lock when seting flowring status to RING_CLOSING.

Signed-off-by: Wright Feng &lt;wright.feng@cypress.com&gt;
Signed-off-by: Chi-Hsien Lin &lt;chi-hsien.lin@cypress.com&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220722115632.620681-3-alvin@pqrs.dk
</content>
</entry>
<entry>
<title>wifi: brcmfmac: fix continuous 802.1x tx pending timeout error</title>
<updated>2022-08-10T05:47:22Z</updated>
<author>
<name>Wright Feng</name>
<email>wright.feng@cypress.com</email>
</author>
<published>2022-07-22T11:56:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0fa24196e4257bcad0c5c82d93508536426db4a2'/>
<id>urn:sha1:0fa24196e4257bcad0c5c82d93508536426db4a2</id>
<content type='text'>
The race condition in brcmf_msgbuf_txflow and brcmf_msgbuf_delete_flowring
makes tx_msghdr writing after brcmf_msgbuf_remove_flowring. Host
driver should delete flowring after txflow complete and all txstatus back,
or pend_8021x_cnt will never be zero and cause every connection 950
milliseconds(MAX_WAIT_FOR_8021X_TX) delay.

Signed-off-by: Wright Feng &lt;wright.feng@cypress.com&gt;
Signed-off-by: Chi-hsien Lin &lt;chi-hsien.lin@cypress.com&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Alvin Šipraga &lt;alsi@bang-olufsen.dk&gt;
Signed-off-by: Kalle Valo &lt;kvalo@kernel.org&gt;
Link: https://lore.kernel.org/r/20220722115632.620681-2-alvin@pqrs.dk
</content>
</entry>
<entry>
<title>wireless: brcmfmac: Use netif_rx().</title>
<updated>2022-03-06T11:05:31Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2022-03-05T22:12:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b381728e7e282e2f5c2581d6919aa4fc08f5a88a'/>
<id>urn:sha1:b381728e7e282e2f5c2581d6919aa4fc08f5a88a</id>
<content type='text'>
Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Arend van Spriel &lt;aspriel@gmail.com&gt;
Cc: Chi-hsien Lin &lt;chi-hsien.lin@infineon.com&gt;
Cc: Chung-hsien Hsu &lt;chung-hsien.hsu@infineon.com&gt;
Cc: Franky Lin &lt;franky.lin@broadcom.com&gt;
Cc: Hante Meuleman &lt;hante.meuleman@broadcom.com&gt;
Cc: Kalle Valo &lt;kvalo@kernel.org&gt;
Cc: SHA-cyfmac-dev-list@infineon.com
Cc: Wright Feng &lt;wright.feng@infineon.com&gt;
Cc: brcm80211-dev-list.pdl@broadcom.com
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: brcmfmac: Convey allocation mode as argument</title>
<updated>2020-09-29T21:02:55Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2020-09-29T20:25:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c597ede4030d7e898756ea3b3725ac4b2092e7b3'/>
<id>urn:sha1:c597ede4030d7e898756ea3b3725ac4b2092e7b3</id>
<content type='text'>
The usage of in_interrupt() in drivers is phased out and Linus clearly
requested that code which changes behaviour depending on context should
either be seperated or the context be conveyed in an argument passed by the
caller, which usually knows the context.

brcmf_fweh_process_event() uses in_interrupt() to select the allocation
mode GFP_KERNEL/GFP_ATOMIC. Aside of the above reasons this check is
incomplete as it cannot detect contexts which just have preemption or
interrupts disabled.

All callchains leading to brcmf_fweh_process_event() can clearly identify
the calling context. Convey a 'gfp' argument through the callchains and let
the callers hand in the appropriate GFP mode.

This has also the advantage that any change of execution context or
preemption/interrupt state in these callchains will be detected by the
memory allocator for all GFP_KERNEL allocations.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: brcmfmac: Convey execution context via argument to brcmf_netif_rx()</title>
<updated>2020-09-29T21:02:55Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2020-09-29T20:25:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=687006e20c445c2461f5a03fe1361ede946f1996'/>
<id>urn:sha1:687006e20c445c2461f5a03fe1361ede946f1996</id>
<content type='text'>
bcrmgf_netif_rx() uses in_interrupt to chose between netif_rx() and
netif_rx_ni(). in_interrupt() usage in drivers is phased out.

Convey the execution mode via an 'inirq' argument through the various
callchains leading to brcmf_netif_rx():

brcmf_pcie_isr_thread()		    &lt;- Task context
  brcmf_proto_msgbuf_rx_trigger()
    brcmf_msgbuf_process_rx()
      brcmf_msgbuf_process_msgtype()
        brcmf_msgbuf_process_rx_complete()
	  brcmf_netif_mon_rx()
	     brcmf_netif_rx(isirq = false)
	  brcmf_netif_rx(isirq = false)

brcmf_sdio_readframes()  &lt;- Task context sdio_claim_host() might sleep
  brcmf_rx_frame(isirq = false)

brcmf_sdio_rxglom()      &lt;- Task context sdio_claim_host() might sleep
  brcmf_rx_frame(isirq = false)

brcmf_usb_rx_complete()  &lt;- Interrupt context
  brcmf_rx_frame(isirq = true)

brcmf_rx_frame()
  brcmf_proto_rxreorder()
    brcmf_proto_bcdc_rxreorder()
      brcmf_fws_rxreorder()
        brcmf_netif_rx()
      brcmf_netif_rx()

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Arend van Spriel &lt;arend.vanspriel@broadcom.com&gt;
Cc: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>brcm80211: fix possible memleak in brcmf_proto_msgbuf_attach</title>
<updated>2020-08-18T12:46:15Z</updated>
<author>
<name>Wang Yufen</name>
<email>wangyufen@huawei.com</email>
</author>
<published>2020-07-20T09:36:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6c151410d5b57e6bb0d91a735ac511459539a7bf'/>
<id>urn:sha1:6c151410d5b57e6bb0d91a735ac511459539a7bf</id>
<content type='text'>
When brcmf_proto_msgbuf_attach fail and msgbuf-&gt;txflow_wq != NULL,
we should destroy the workqueue.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Wang Yufen &lt;wangyufen@huawei.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/1595237765-66238-1-git-send-email-wangyufen@huawei.com
</content>
</entry>
<entry>
<title>brcmfmac: increase message buffer size for control packets</title>
<updated>2020-07-14T09:46:42Z</updated>
<author>
<name>Jia-Shyr Chuang</name>
<email>joseph.chuang@cypress.com</email>
</author>
<published>2020-06-10T15:21:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fc4aa125974d4401084eb0f4affdb92e9b75f1df'/>
<id>urn:sha1:fc4aa125974d4401084eb0f4affdb92e9b75f1df</id>
<content type='text'>
In wifi firmware, max length of IOCTL/IOVAR buffer size is 8192.
Increase the message buffer max size same as wifi firmware for control
packets so return buffers can come back.

Signed-off-by: Soontak Lee &lt;soontak.lee@cypress.com&gt;
Signed-off-by: Jia-Shyr Chuang &lt;joseph.chuang@cypress.com&gt;
Signed-off-by: Chi-Hsien Lin &lt;chi-hsien.lin@cypress.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20200610152106.175257-3-chi-hsien.lin@cypress.com
</content>
</entry>
<entry>
<title>brcmfmac: Remove always false 'idx &lt; 0' statement</title>
<updated>2020-01-26T15:43:28Z</updated>
<author>
<name>yuehaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2020-01-08T13:57:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=627b0d094240c38393b2f2d40626c33a8fff6103'/>
<id>urn:sha1:627b0d094240c38393b2f2d40626c33a8fff6103</id>
<content type='text'>
idx is declared as u32, it will never less than 0.

Signed-off-by: yuehaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>brcmfmac: remove redundant assignment to pointer hash</title>
<updated>2019-09-03T13:38:23Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-08-09T17:22:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=73c742bb9c9ba30871fdd5c730d5ca8b6712833a'/>
<id>urn:sha1:73c742bb9c9ba30871fdd5c730d5ca8b6712833a</id>
<content type='text'>
The pointer hash is being initialized with a value that is never read
and is being re-assigned a little later on. The assignment is
redundant and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
</feed>
