<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/mediatek, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-10-12T07:51:26Z</updated>
<entry>
<title>net: ethernet: mtk_eth_soc: fix state in __mtk_foe_entry_clear</title>
<updated>2022-10-12T07:51:26Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-09-30T00:56:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=292b46c49675fcff39547b643d48d0fec27cdbb9'/>
<id>urn:sha1:292b46c49675fcff39547b643d48d0fec27cdbb9</id>
<content type='text'>
commit ae3ed15da5889263de372ff9df2e83e16acca4cb upstream.

Setting ib1 state to MTK_FOE_STATE_UNBIND in __mtk_foe_entry_clear
routine as done by commit 0e80707d94e4c8 ("net: ethernet: mtk_eth_soc:
fix typo in __mtk_foe_entry_clear") breaks flow offloading, at least
on older MTK_NETSYS_V1 SoCs, OpenWrt users have confirmed the bug on
MT7622 and MT7621 systems.
Felix Fietkau suggested to use MTK_FOE_STATE_INVALID instead which
works well on both, MTK_NETSYS_V1 and MTK_NETSYS_V2.

Tested on MT7622 (Linksys E8450) and MT7986 (BananaPi BPI-R3).

Suggested-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Fixes: 0e80707d94e4c8 ("net: ethernet: mtk_eth_soc: fix typo in __mtk_foe_entry_clear")
Fixes: 33fc42de33278b ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Link: https://lore.kernel.org/r/YzY+1Yg0FBXcnrtc@makrotopia.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix mask of RX_DMA_GET_SPORT{,_V2}</title>
<updated>2022-10-05T08:40:54Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2022-09-27T15:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b781430cd7709dd04361565b76a26e36353fbfba'/>
<id>urn:sha1:b781430cd7709dd04361565b76a26e36353fbfba</id>
<content type='text'>
[ Upstream commit c9da02bfb1112461e048d3b736afb1873f6f4ccf ]

The bitmasks applied in RX_DMA_GET_SPORT and RX_DMA_GET_SPORT_V2 macros
were swapped. Fix that.

Reported-by: Chen Minqiang &lt;ptpt52@gmail.com&gt;
Fixes: 160d3a9b192985 ("net: ethernet: mtk_eth_soc: introduce MTK_NETSYS_V2 support")
Acked-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Link: https://lore.kernel.org/r/YzMW+mg9UsaCdKRQ@makrotopia.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: check max allowed hash in mtk_ppe_check_skb</title>
<updated>2022-09-15T08:47:17Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2022-09-05T12:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e484616810f83f70f58e5ad0d5e708332cb1708f'/>
<id>urn:sha1:e484616810f83f70f58e5ad0d5e708332cb1708f</id>
<content type='text'>
[ Upstream commit f27b405ef43319a3ceefc2123245201a63ed4e00 ]

Even if max hash configured in hw in mtk_ppe_hash_entry is
MTK_PPE_ENTRIES - 1, check theoretical OOB accesses in
mtk_ppe_check_skb routine

Fixes: c4f033d9e03e9 ("net: ethernet: mtk_eth_soc: rework hardware flow table management")
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix typo in __mtk_foe_entry_clear</title>
<updated>2022-09-15T08:47:17Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2022-09-06T14:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0378b06e612e51d94312def1fc5fbd357d7d83f7'/>
<id>urn:sha1:0378b06e612e51d94312def1fc5fbd357d7d83f7</id>
<content type='text'>
[ Upstream commit 0e80707d94e4c88f9879bdafcbaceb13432ec1f4 ]

Set ib1 state to MTK_FOE_STATE_UNBIND in __mtk_foe_entry_clear routine.

Fixes: 33fc42de33278 ("net: ethernet: mtk_eth_soc: support creating mac address based offload entries")
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix hw hash reporting for MTK_NETSYS_V2</title>
<updated>2022-08-31T15:18:10Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2022-08-23T12:24:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b886aebd0c3df87e75a6d1587990532a830000da'/>
<id>urn:sha1:b886aebd0c3df87e75a6d1587990532a830000da</id>
<content type='text'>
[ Upstream commit 0cf731f9ebb5bf6f252055bebf4463a5c0bd490b ]

Properly report hw rx hash for mt7986 chipset accroding to the new dma
descriptor layout.

Fixes: 197c9e9b17b11 ("net: ethernet: mtk_eth_soc: introduce support for mt7986 chipset")
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://lore.kernel.org/r/091394ea4e705fbb35f828011d98d0ba33808f69.1661257293.git.lorenzo@kernel.org
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: enable rx cksum offload for MTK_NETSYS_V2</title>
<updated>2022-08-31T15:18:10Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2022-06-06T19:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f23757084678a074ef7188d34a86597fa5e5018'/>
<id>urn:sha1:2f23757084678a074ef7188d34a86597fa5e5018</id>
<content type='text'>
[ Upstream commit da6e113ff010815fdd21ee1e9af2e8d179a2680f ]

Enable rx checksum offload for mt7986 chipset.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://lore.kernel.org/r/c8699805c18f7fd38315fcb8da2787676d83a32c.1654544585.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_ppe: fix possible NULL pointer dereference in mtk_flow_get_wdma_info</title>
<updated>2022-07-20T00:27:18Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2022-07-18T09:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=53eb9b04560cc368b7874a7ef1ca7666741739e4'/>
<id>urn:sha1:53eb9b04560cc368b7874a7ef1ca7666741739e4</id>
<content type='text'>
odev pointer can be NULL in mtk_flow_offload_replace routine according
to the flower action rules. Fix possible NULL pointer dereference in
mtk_flow_get_wdma_info.

Fixes: a333215e10cb5 ("net: ethernet: mtk_eth_soc: implement flow offloading to WED devices")
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Link: https://lore.kernel.org/r/4e1685bc4976e21e364055f6bee86261f8f9ee93.1658137753.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix off by one check of ARRAY_SIZE</title>
<updated>2022-07-19T03:12:04Z</updated>
<author>
<name>Tom Rix</name>
</author>
<published>2022-07-16T21:46:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3696c952da0733b843c8da3441345055b1cbacd9'/>
<id>urn:sha1:3696c952da0733b843c8da3441345055b1cbacd9</id>
<content type='text'>
In mtk_wed_tx_ring_setup(.., int idx, ..), idx is used as an index here
  struct mtk_wed_ring *ring = &amp;dev-&gt;tx_ring[idx];

The bounds of idx are checked here
  BUG_ON(idx &gt; ARRAY_SIZE(dev-&gt;tx_ring));

If idx is the size of the array, it will pass this check and overflow.
So change the check to &gt;= .

Fixes: 804775dfc288 ("net: ethernet: mtk_eth_soc: add support for Wireless Ethernet Dispatch (WED)")
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Link: https://lore.kernel.org/r/20220716214654.1540240-1-trix@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: fix misuse of mem alloc interface netdev[napi]_alloc_frag</title>
<updated>2022-06-09T03:37:27Z</updated>
<author>
<name>Chen Lin</name>
</author>
<published>2022-06-08T12:46:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f2c0d2919a14002760f89f4e02960c735a316d2'/>
<id>urn:sha1:2f2c0d2919a14002760f89f4e02960c735a316d2</id>
<content type='text'>
When rx_flag == MTK_RX_FLAGS_HWLRO,
rx_data_len = MTK_MAX_LRO_RX_LENGTH(4096 * 3) &gt; PAGE_SIZE.
netdev_alloc_frag is for alloction of page fragment only.
Reference to other drivers and Documentation/vm/page_frags.rst

Branch to use __get_free_pages when ring-&gt;frag_size &gt; PAGE_SIZE.

Signed-off-by: Chen Lin &lt;chen45464546@163.com&gt;
Link: https://lore.kernel.org/r/1654692413-2598-1-git-send-email-chen45464546@163.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: ethernet: mtk_eth_soc: out of bounds read in mtk_hwlro_get_fdir_entry()</title>
<updated>2022-05-27T06:59:41Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2022-05-26T08:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7e7104e2d5ddf3806a28695670f21bef471f1e1'/>
<id>urn:sha1:e7e7104e2d5ddf3806a28695670f21bef471f1e1</id>
<content type='text'>
The "fsp-&gt;location" variable comes from user via ethtool_get_rxnfc().
Check that it is valid to prevent an out of bounds read.

Fixes: 7aab747e5563 ("net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
