<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/net/wireless/mediatek/mt76/mt76x0, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/net/wireless/mediatek/mt76/mt76x0?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/net/wireless/mediatek/mt76/mt76x0?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-03-16T16:40:22Z</updated>
<entry>
<title>mt76: usb: introduce __mt76u_init utility routine</title>
<updated>2022-03-16T16:40:22Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2022-03-14T15:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6cb596ba84e307930836e9533a48792095f0dd42'/>
<id>urn:sha1:6cb596ba84e307930836e9533a48792095f0dd42</id>
<content type='text'>
Introduce __mt76u_init unitility routine and move mt7615 usb bus ops
into mt7615 module in order to allow specifying driver specific
parameter.
This is a preliminary patch to add usb support to mt7921 driver.

Tested-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: mt76x02: introduce SAR support</title>
<updated>2021-12-19T14:24:00Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2021-11-21T12:12:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=633f77b517ac704086c267b70a6dfe1924cfed0b'/>
<id>urn:sha1:633f77b517ac704086c267b70a6dfe1924cfed0b</id>
<content type='text'>
Add SAR spec support to mt76x02 driver to allow configuring SAR power
limitations on the frequency ranges from the userland.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: mt76x0: correct VHT MCS 8/9 tx power eeprom offset</title>
<updated>2021-10-20T08:37:01Z</updated>
<author>
<name>Richard Huynh</name>
<email>voxlympha@gmail.com</email>
</author>
<published>2021-09-07T08:58:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d387cde7af84a5100bd717bb7359e9b30d95587d'/>
<id>urn:sha1:d387cde7af84a5100bd717bb7359e9b30d95587d</id>
<content type='text'>
Appears to have incorrectly offset 0x120 + 0x12 instead of 12 decimal,
leading to bogus power values being used.

Signed-off-by: Richard Huynh &lt;voxlympha@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: disable BH around napi_schedule() calls</title>
<updated>2021-10-20T08:36:39Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2021-09-24T15:54:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=970be1dff26dc387591688a08e4c21ebd13c3fc2'/>
<id>urn:sha1:970be1dff26dc387591688a08e4c21ebd13c3fc2</id>
<content type='text'>
napi_schedule() can call __raise_softirq_irqoff(), which can perform softirq
handling, so it must not be called in a pure process context with BH enabled.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: switch from 'pci_' to 'dma_' API</title>
<updated>2021-10-20T08:36:39Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-08-22T07:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a2e759612e5ff3858856fe97be5245eecb84e29b'/>
<id>urn:sha1:a2e759612e5ff3858856fe97be5245eecb84e29b</id>
<content type='text'>
The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below.

It has been compile tested.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&amp;e1-&gt;dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&amp;e1-&gt;dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&amp;e1-&gt;dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&amp;e1-&gt;dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&amp;e1-&gt;dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&amp;e1-&gt;dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&amp;e1-&gt;dev, e2)

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: mt76x0: use dev_debug instead of dev_err for hw_rf_ctrl</title>
<updated>2021-06-19T07:22:44Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2021-05-07T10:26:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=47cbf73cf924ce2202332f61e705f4ed9bd6a74e'/>
<id>urn:sha1:47cbf73cf924ce2202332f61e705f4ed9bd6a74e</id>
<content type='text'>
BIT(0) in MT_EE_NIC_CONF_1 is use to notify the driver if the radio RF
switch is controlled through a gpio. Use dev_debug instead of dev_err
to log this info.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: mt76x0e: fix device hang during suspend/resume</title>
<updated>2021-05-15T11:46:59Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2021-05-07T16:50:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=509559c35bcd23d5a046624b225cb3e99a9f1481'/>
<id>urn:sha1:509559c35bcd23d5a046624b225cb3e99a9f1481</id>
<content type='text'>
Similar to usb device, re-initialize mt76x0e device after resume in order
to fix mt7630e hang during suspend/resume

Reported-by: Luca Trombin &lt;luca.trombin@gmail.com&gt;
Fixes: c2a4d9fbabfb9 ("mt76x0: inital split between pci and usb")
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/4812f9611624b34053c1592fd9c175b67d4ffcb4.1620406022.git.lorenzo@kernel.org
</content>
</entry>
<entry>
<title>mt76: mt76x0u: Add support for TP-Link T2UHP(UN) v1</title>
<updated>2021-04-11T22:01:23Z</updated>
<author>
<name>Eric Y.Y. Wong</name>
<email>eric.wongyeungyan@gmail.com</email>
</author>
<published>2021-03-03T03:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=51bf9d60fb927b850ec2abdc1f9f72de523098a3'/>
<id>urn:sha1:51bf9d60fb927b850ec2abdc1f9f72de523098a3</id>
<content type='text'>
There are two variants of TP-Link Archer T2UHP V1, which are US and UN:

https://www.tp-link.com/us/support/download/archer-t2uhp/
https://www.tp-link.com/hk/support/download/archer-t2uhp/v1/

From the driver source code provided by the vendor:

https://www.tp-link.com/hk/support/download/archer-t2uhp/v1/#Driver

eric@eric-VirtualBox:~/src$ grep -n USB_DEVICE.*0x2357 DPA_mt7610u_wifi_sta_v3004_rev1_20140529/NETIF/common/rtusb_dev_id.c
45:	{USB_DEVICE(0x2357,0x0105)}, /* T1Uv1 */
46:	{USB_DEVICE(0x2357,0x010B)}, /* T2UHP_UN_v1 */
47:	{USB_DEVICE(0x2357,0x0123)}, /* T2UHP_US_v1 */

eric@eric-VirtualBox:~/src$ lsusb -d 2357:
Bus 001 Device 003: ID 2357:010b TP-Link WiFi
eric@eric-VirtualBox:~/src$ sudo modprobe mt76x0u
eric@eric-VirtualBox:~/src$ sudo sh -c "echo 2357 010b &gt; /sys/bus/usb/drivers/mt76x0u/new_id"

[snip]

eric@eric-VirtualBox:~/src$ ifconfig -a
enp0s3: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
        ether 08:00:27:74:d9:ee  txqueuelen 1000  (Ethernet)
        RX packets 78  bytes 16146 (16.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 75  bytes 8413 (8.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10&lt;host&gt;
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 56  bytes 5496 (5.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 56  bytes 5496 (5.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlx18d6c71b6e3e: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
        inet 192.168.1.106  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::21c7:2d90:e47d:ee48  prefixlen 64  scopeid 0x20&lt;link&gt;
        ether 18:d6:c7:1b:6e:3e  txqueuelen 1000  (Ethernet)
        RX packets 37  bytes 5345 (5.3 KB)
        RX errors 0  dropped 7  overruns 0  frame 0
        TX packets 77  bytes 10513 (10.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eric@eric-VirtualBox:~/src$ dmesg | tail -n 30
               12:51:25.551584 main     Log opened 2021-03-01T12:51:25.551572000Z
[   46.855763] 12:51:25.551995 main     OS Product: Linux
[   46.855838] 12:51:25.552075 main     OS Release: 5.4.0-66-generic
[   46.855897] 12:51:25.552150 main     OS Version: #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021
[   46.855971] 12:51:25.552207 main     Executable: /opt/VBoxGuestAdditions-6.1.16/sbin/VBoxService
               12:51:25.552208 main     Process ID: 898
               12:51:25.552209 main     Package type: LINUX_64BITS_GENERIC
[   46.858699] 12:51:25.554921 main     6.1.16 r140961 started. Verbose level = 0
[   46.863116] 12:51:25.559319 main     vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
[  140.687550] usb 1-2: new high-speed USB device number 3 using xhci_hcd
[  140.838279] usb 1-2: New USB device found, idVendor=2357, idProduct=010b, bcdDevice= 1.00
[  140.838281] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  140.838283] usb 1-2: Product: WiFi
[  140.838284] usb 1-2: Manufacturer: MediaTek
[  140.838285] usb 1-2: SerialNumber: 1.0
[  178.374187] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[  178.378370] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[  178.417507] usbcore: registered new interface driver mt76x0u
[  178.557165] usb 1-2: reset high-speed USB device number 3 using xhci_hcd
[  178.720436] mt76x0u 1-2:1.0: ASIC revision: 76100002 MAC revision: 76502000
[  180.156077] mt76x0u 1-2:1.0: EEPROM ver:02 fae:04
[  181.190558] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[  181.225560] mt76x0u 1-2:1.0 wlx18d6c71b6e3e: renamed from wlan0
[  188.660826] wlx18d6c71b6e3e: authenticate with d0:17:c2:e0:d7:9c
[  189.447781] wlx18d6c71b6e3e: send auth to d0:17:c2:e0:d7:9c (try 1/3)
[  189.618282] wlx18d6c71b6e3e: authenticated
[  189.619008] wlx18d6c71b6e3e: associate with d0:17:c2:e0:d7:9c (try 1/3)
[  189.715268] wlx18d6c71b6e3e: RX AssocResp from d0:17:c2:e0:d7:9c (capab=0x1011 status=0 aid=8)
[  189.734720] wlx18d6c71b6e3e: associated
[  190.233239] IPv6: ADDRCONF(NETDEV_CHANGE): wlx18d6c71b6e3e: link becomes ready

Signed-off-by: Eric Y.Y. Wong &lt;eric.wongyeungyan@gmail.com&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>mt76: use PCI_VENDOR_ID_MEDIATEK to avoid open coded</title>
<updated>2021-04-11T16:50:39Z</updated>
<author>
<name>Ryder Lee</name>
<email>ryder.lee@mediatek.com</email>
</author>
<published>2021-02-02T13:57:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7715a1d54bdf47f89194b0a088e07dcd76820f51'/>
<id>urn:sha1:7715a1d54bdf47f89194b0a088e07dcd76820f51</id>
<content type='text'>
Use PCI standard defines.

Signed-off-by: Ryder Lee &lt;ryder.lee@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: move mac_work in mt76_core module</title>
<updated>2021-01-26T19:07:48Z</updated>
<author>
<name>Lorenzo Bianconi</name>
<email>lorenzo@kernel.org</email>
</author>
<published>2021-01-04T18:00:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a782f8bfdd46a6028dee41b99a990534737ad997'/>
<id>urn:sha1:a782f8bfdd46a6028dee41b99a990534737ad997</id>
<content type='text'>
Move mac_work delayed_work and mac_work_count in mt76_phy since it is
used by all drivers. This is a preliminary patch to create a common mcu
library used by mt7615 and mt7921 drivers

Co-developed-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
</feed>
