<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/wireless/mediatek/mt76/sdio.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:15Z</updated>
<entry>
<title>wifi: mt76: add memory barrier to SDIO queue kick</title>
<updated>2023-03-10T08:28:15Z</updated>
<author>
<name>Deren Wu</name>
<email>deren.wu@mediatek.com</email>
</author>
<published>2023-01-15T04:44:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6e6fffb4ed9e42f0f95a69598ff72b9c0c099b1a'/>
<id>urn:sha1:6e6fffb4ed9e42f0f95a69598ff72b9c0c099b1a</id>
<content type='text'>
[ Upstream commit 5f54237ad798f41cb6a503271aa9ca47188cfb9b ]

Ensure the entry has been fully updated before SDIO bus worker access
it. This patch would fix potential memory risk in both mt7663s and
mt7921s.

Fixes: 764dee47e2c1 ("mt76: sdio: move common code in mt76_sdio module")
Signed-off-by: Deren Wu &lt;deren.wu@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>wifi: mt76: add info parameter to rx_skb signature</title>
<updated>2022-12-01T16:29:14Z</updated>
<author>
<name>Sujuan Chen</name>
<email>sujuan.chen@mediatek.com</email>
</author>
<published>2022-11-12T15:40:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c3137942771eceef923158980b6cccae572e81d1'/>
<id>urn:sha1:c3137942771eceef923158980b6cccae572e81d1</id>
<content type='text'>
This is a preliminary patch to introduce WED RX support for mt7915.

Tested-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Co-developed-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Sujuan Chen &lt;sujuan.chen@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>wifi: mt76: sdio: fix transmitting packet hangs</title>
<updated>2022-09-15T10:53:59Z</updated>
<author>
<name>YN Chen</name>
<email>yn.chen@mediatek.com</email>
</author>
<published>2022-07-22T21:59:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=250b1827205846ff346a76044955cb79d4963f70'/>
<id>urn:sha1:250b1827205846ff346a76044955cb79d4963f70</id>
<content type='text'>
Fix transmitting packets hangs with continuing to pull the pending packet
from mac80211 queues when receiving Tx status notification from the device.

Fixes: aac5104bf631 ("mt76: sdio: do not run mt76_txq_schedule directly")
Acked-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: YN Chen &lt;yn.chen@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>wifi: mt76: sdio: poll sta stat when device transmits data</title>
<updated>2022-09-15T10:53:58Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2022-07-21T22:39:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a323e5f041dd11af5e3de19ed7ea95a97d588c11'/>
<id>urn:sha1:a323e5f041dd11af5e3de19ed7ea95a97d588c11</id>
<content type='text'>
It is not meaningful to poll sta stat when there is no data traffic.
So polling sta stat when the device has transmitted data instead to save
CPU power.

That implies that it is unallowed the stat_work to work while MCU is being
initialized in the really early stage to fix the possible time to time MCU
initialization failure.

Fixes: d39b52e31aa6 ("mt76: introduce mt76_sdio module")
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>wifi: mt76: sdio: fix the deadlock caused by sdio-&gt;stat_work</title>
<updated>2022-09-15T10:53:58Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2022-07-21T22:39:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e5d78fd998be94fb459a3d625df7367849b997b8'/>
<id>urn:sha1:e5d78fd998be94fb459a3d625df7367849b997b8</id>
<content type='text'>
Because wake_work and sdio-&gt;stat_work share the same workqueue mt76-&gt;wq,
if sdio-&gt;stat_work cannot acquire the mutex lock such as that was possibly
held up by [mt7615, mt7921]_mutex_acquire. Additionally, if
[mt7615, mt7921]_mutex_acquire was called by sdio-&gt;stat_work self, the wake
would be blocked by itself. Thus, we move the stat_work into
ieee80211_workqueue instead to break the deadlock.

Fixes: d39b52e31aa6 ("mt76: introduce mt76_sdio module")
Co-developed-by: YN Chen &lt;YN.Chen@mediatek.com&gt;
Signed-off-by: YN Chen &lt;YN.Chen@mediatek.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: remove q-&gt;qid</title>
<updated>2022-07-11T11:40:03Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2022-07-03T18:59:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bceb8b8ded9b2470c10a13e5446f2d5a8e178964'/>
<id>urn:sha1:bceb8b8ded9b2470c10a13e5446f2d5a8e178964</id>
<content type='text'>
It is no longer used

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: pass original queue id from __mt76_tx_queue_skb to the driver</title>
<updated>2022-07-11T11:40:03Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2022-07-03T15:52:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d08295f5be8e63e64f9e664572f1b582ede7958b'/>
<id>urn:sha1:d08295f5be8e63e64f9e664572f1b582ede7958b</id>
<content type='text'>
MT7615 and newer map multiple software tx queues to the hardware id

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: sdio: honor the largest Tx buffer the hardware can support</title>
<updated>2022-02-03T12:58:00Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2022-01-14T23:56:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bf08d58543415f5e31a0e7a6401abcdd76826847'/>
<id>urn:sha1:bf08d58543415f5e31a0e7a6401abcdd76826847</id>
<content type='text'>
We don't have to create a separate sdio.xmit_buf buffer for each queue.
Instead, we just need to create one, reuse it across all queues to reduce
memory consumption further.

And then we should take it into account the actual the host and the device
MMC capability to determine what the appropriate xmit_buf_size can be.

Both MT7921S and MT7663 can support up to Tx FIFO size of 0x3fe00 which
means the device can receive 511 blocks of block size 512 in a row from
the host. So if the driver aggregates the frames as many as possible the
the device can support, we can merge multiple MMC requests into a single
one to get rid of the overhead of the handling and synchronizing in those
unnecessary MMC requests and reduce the SDIO lock contention with the
Bluetooth concurrent traffic and finally to have the higher bus
utilization with less idle cycle.

With the patch, it is helpful for WiFi to have steady throughput
performance especially while running Bluetooth concurrently.

Co-developed-by: Deren Wu &lt;deren.wu@mediatek.com&gt;
Signed-off-by: Deren Wu &lt;deren.wu@mediatek.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Acked-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: mt7921s: fix cmd timeout in throughput test</title>
<updated>2021-12-19T14:24:05Z</updated>
<author>
<name>Deren Wu</name>
<email>deren.wu@mediatek.com</email>
</author>
<published>2021-12-16T17:02:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b1460bb4eadf4b0bf5afe79fb4d25b9d985f2879'/>
<id>urn:sha1:b1460bb4eadf4b0bf5afe79fb4d25b9d985f2879</id>
<content type='text'>
During heavy loading throughtput test, the RX buffer (128)
would be exhausted and some RX pkts dropped randomly. Increase
buffer size from 128 to 512 (a safer length) to avoid tput degrade
or cmd-timeout problem.

Signed-off-by: Deren Wu &lt;deren.wu@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: mt7921s: fix the device cannot sleep deeply in suspend</title>
<updated>2021-12-19T14:24:00Z</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2021-11-19T23:22:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ad4faca7690a88b4529238c757b6b8ead8056ec'/>
<id>urn:sha1:5ad4faca7690a88b4529238c757b6b8ead8056ec</id>
<content type='text'>
According to the MT7921S firmware, the cmd MCU_UNI_CMD_HIF_CTRL have to
be last MCU command to execute in suspend handler and all data traffic
have to be stopped before the cmd MCU_UNI_CMD_HIF_CTRL starts as well
in order that mt7921 can successfully fall into the deep sleep mode.

Where we reuse the flag MT76_STATE_SUSPEND and avoid creating
another global flag to stop all of the traffic onto the SDIO bus.

Fixes: 48fab5bbef40 ("mt76: mt7921: introduce mt7921s support")
Reported-by: Leon Yen &lt;leon.yen@mediatek.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
</feed>
