Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

low tx power m7610e #216

Closed
leksmax opened this issue Dec 4, 2018 · 161 comments
Closed

low tx power m7610e #216

leksmax opened this issue Dec 4, 2018 · 161 comments

Comments

@leksmax
Copy link

leksmax commented Dec 4, 2018

root@OpenWrt:~# iw phy
Wiphy phy1
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
max # sched scan SSIDs: 0
max # match sets: 0
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Retry short long limit: 2
Coverage class: 0 (up to 0m)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
Band 1:
Capabilities: 0x2fe
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
TX STBC
RX STBC 2-streams
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 2 usec (0x04)
HT TX/RX MCS rate indexes supported: 0-15, 32
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm) (no IR)
* 2472 MHz [13] (20.0 dBm) (no IR)
* 2484 MHz [14] (20.0 dBm) (no IR)
valid interface combinations:
* #{ managed, AP, mesh point } <= 8,
total <= 8, #channels <= 1
HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
Wiphy phy0
max # scan SSIDs: 4
max scan IEs length: 2243 bytes
max # sched scan SSIDs: 0
max # match sets: 0
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Available Antennas: TX 0x1 RX 0x1
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
Band 1:
Capabilities: 0x17e
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 4 usec (0x05)
HT TX/RX MCS rate indexes supported: 0-7
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm) (no IR)
* 2472 MHz [13] (20.0 dBm) (no IR)
* 2484 MHz [14] (20.0 dBm) (no IR)
Band 2:
Capabilities: 0x17e
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 4 usec (0x05)
HT TX/RX MCS rate indexes supported: 0-7
VHT Capabilities (0x01800120):
Max MPDU length: 3895
Supported Channel Width: neither 160 nor 80+80
short GI (80 MHz)
VHT RX MCS set:
1 streams: MCS 0-7
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT RX highest supported: 0 Mbps
VHT TX MCS set:
1 streams: MCS 0-7
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT TX highest supported: 0 Mbps
Frequencies:
* 5180 MHz [36] (20.0 dBm)
* 5200 MHz [40] (20.0 dBm)
* 5220 MHz [44] (20.0 dBm)
* 5240 MHz [48] (20.0 dBm)
* 5260 MHz [52] (20.0 dBm) (no IR, radar detection)
* 5280 MHz [56] (20.0 dBm) (no IR, radar detection)
* 5300 MHz [60] (20.0 dBm) (no IR, radar detection)
* 5320 MHz [64] (20.0 dBm) (no IR, radar detection)
* 5500 MHz [100] (20.0 dBm) (no IR, radar detection)
* 5520 MHz [104] (20.0 dBm) (no IR, radar detection)
* 5540 MHz [108] (20.0 dBm) (no IR, radar detection)
* 5560 MHz [112] (20.0 dBm) (no IR, radar detection)
* 5580 MHz [116] (20.0 dBm) (no IR, radar detection)
* 5600 MHz [120] (20.0 dBm) (no IR, radar detection)
* 5620 MHz [124] (20.0 dBm) (no IR, radar detection)
* 5640 MHz [128] (20.0 dBm) (no IR, radar detection)
* 5660 MHz [132] (20.0 dBm) (no IR, radar detection)
* 5680 MHz [136] (20.0 dBm) (no IR, radar detection)
* 5700 MHz [140] (20.0 dBm) (no IR, radar detection)
* 5745 MHz [149] (20.0 dBm) (no IR)
* 5765 MHz [153] (20.0 dBm) (no IR)
* 5785 MHz [157] (20.0 dBm) (no IR)
* 5805 MHz [161] (20.0 dBm) (no IR)
* 5825 MHz [165] (20.0 dBm) (no IR)
valid interface combinations:
* #{ IBSS } <= 1, #{ managed, AP, mesh point } <= 8,
total <= 8, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }

    HT Capability overrides:
             * MCS: ff ff ff ff ff ff ff ff ff ff
             * maximum A-MSDU length
             * supported channel width
             * short GI for 40 MHz
             * max A-MPDU length exponent
             * min MPDU start spacing
    Device supports VHT-IBSS.

root@OpenWrt:# iw
iw iwinfo
root@OpenWrt:
# iwinfo
wlan0 ESSID: "OpenWrt_5g"
Access Point: 00:0C:43:26:60:60
Mode: Master Channel: 36 (5.180 GHz)
Tx-Power: 11 dBm Link Quality: 21/70
Signal: -89 dBm Noise: unknown
Bit Rate: 58.5 MBit/s
Encryption: WPA2 PSK (CCMP)
Type: nl80211 HW Mode(s): 802.11bgnac
Hardware: 14C3:7650 14C3:7650 [Generic MAC80211]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: yes PHY name: phy0

wlan1 ESSID: "OpenWrt"
Access Point: 00:0C:43:76:20:20
Mode: Master Channel: 11 (2.462 GHz)
Tx-Power: 20 dBm Link Quality: 48/70
Signal: -62 dBm Noise: unknown
Bit Rate: 57.8 MBit/s
Encryption: WPA2 PSK (CCMP)
Type: nl80211 HW Mode(s): 802.11bgn
Hardware: unknown [Generic MAC80211]
TX power offset: unknown
Frequency offset: unknown
Supports VAPs: yes PHY name: phy1

root@OpenWrt:~# iwinfo
in stock i have 20dBm

@leksmax
Copy link
Author

leksmax commented Dec 4, 2018

root@OpenWrt:~# cat /sys/kernel/debug/ieee80211/phy0/mt76/txpower
Target power: 0
Delta: 0 0
and router have FEM (SKY11)

@LorenzoBianconi
Copy link
Contributor

@leksmax : what device are you running? Could you please provide device eeprom partition?

@leksmax
Copy link
Author

leksmax commented Dec 4, 2018

@LorenzoBianconi
Copy link
Contributor

@leksmax are you referring to 2GHz or 5GHz band?

@leksmax
Copy link
Author

leksmax commented Dec 6, 2018

@LorenzoBianconi i am referring stock 5g and mt76 driver 5g

@leksmax
Copy link
Author

leksmax commented Dec 7, 2018

maybe sombady know how use fem sky11 in this driver ?

@leksmax
Copy link
Author

leksmax commented Dec 9, 2018

@LorenzoBianconi
Copy link
Contributor

@leksmax ok, I will take a look, thx

@leksmax
Copy link
Author

leksmax commented Dec 11, 2018

maybe i need turn on gpio to FEM working ?

@leksmax
Copy link
Author

leksmax commented Dec 11, 2018

@LorenzoBianconi What is the probability that in the near future Fem support will appear for this chip?

@LorenzoBianconi
Copy link
Contributor

with this driver wifi on mt7610 work well
https://github.com/sunsky13122156/LEDE-Archer-C2/tree/master/package/mediatek/drivers/mt7610e

Could you please try to make a diff between MT7610E-V10-FEM.bin and device eeprom partition? (just wifi part)

@leksmax
Copy link
Author

leksmax commented Dec 24, 2018

@LorenzoBianconi
cmp -b -l lavaeeprom.bin MT7610E-V10-FEM.bin
4 1 ^A 2 ^B
10 140 ` 100 @
36 37 ^_ 67 7
54 375 M-} 5 ^E
56 0 ^@ 20 ^P
57 6 ^F 377 M-^?
59 154 l 144 d
67 377 M-^? 21 ^Q
68 0 ^@ 6 ^F
70 12 ^J 11 ^I
74 11 ^I 14 ^L
78 5 ^E 14 ^L
121 20 ^P 17 ^O
122 20 ^P 16 ^N
123 17 ^O 15 ^M
124 17 ^O 14 ^L
125 17 ^O 13 ^K
126 17 ^O 12 ^J
127 16 ^N 11 ^I
128 16 ^N 11 ^I
129 16 ^N 11 ^I
130 16 ^N 11 ^I
131 15 ^M 11 ^I
132 15 ^M 11 ^I
133 11 ^I 14 ^L
134 11 ^I 14 ^L
135 11 ^I 14 ^L
136 11 ^I 14 ^L
137 12 ^J 14 ^L
138 12 ^J 14 ^L
139 12 ^J 14 ^L
140 12 ^J 14 ^L
141 12 ^J 14 ^L
142 12 ^J 14 ^L
143 12 ^J 14 ^L
144 13 ^K 14 ^L
145 13 ^K 14 ^L
146 13 ^K 14 ^L
148 16 ^N 13 ^K
149 16 ^N 13 ^K
150 16 ^N 13 ^K
151 16 ^N 12 ^J
152 17 ^O 12 ^J
153 17 ^O 12 ^J
154 17 ^O 12 ^J
155 17 ^O 13 ^K
210 377 M-^? 374 M-|
211 32 ^Z 34 ^
241 377 M-^? 200 M-^@
242 377 M-^? 200 M-^@
243 377 M-^? 200 M-^@
244 377 M-^? 200 M-^@
245 377 M-^? 362 M-r
246 377 M-^? 370 M-x
247 377 M-^? 374 M-|
248 377 M-^? 3 ^C
249 377 M-^? 16 ^N
250 377 M-^? 20 ^P
251 377 M-^? 177 ^?
252 377 M-^? 177 ^?
253 377 M-^? 177 ^?
254 377 M-^? 177 ^?
255 377 M-^? 200 M-^@
256 377 M-^? 200 M-^@
257 377 M-^? 200 M-^@
258 377 M-^? 200 M-^@
259 377 M-^? 356 M-n
260 377 M-^? 365 M-u
261 377 M-^? 372 M-z
262 377 M-^? 4 ^D
263 377 M-^? 17 ^O
264 377 M-^? 24 ^T
265 377 M-^? 177 ^?
266 377 M-^? 177 ^?
267 377 M-^? 177 ^?
268 377 M-^? 177 ^?
269 377 M-^? 200 M-^@
270 377 M-^? 374 M-|
lavaeeprom.bin
https://drive.google.com/open?id=17qhD2S3J5kbeZqXzJw25eb7S_g-GEPX3

@orangepizza
Copy link

orangepizza commented Jan 11, 2019

I have same problem with Tplink Archer C2, txpower for mt7610e limited to 11dbm. but as #227 and #224 says 13dbm and 15dbm, I think it detects txpower limit form wrong place in flash.

@ZerBea
Copy link

ZerBea commented Jan 24, 2019

Similar issue with TP-LINK Archer T2UH (mt7610u). TX power limited to 16.0 dBm.
Reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=202243
and here:
ZerBea/hcxdumptool#42

@LorenzoBianconi
Copy link
Contributor

could you please try this repo? https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x0_init_target_power
I added some fixes in eeprom tx power parsing (please not I have not been able to test it, just compiled)

@ZerBea
Copy link

ZerBea commented Jan 26, 2019

Doesn't work (kernel 4.20.3 / 5.0-rc3 - INTEL core system, AMD Ryzen not tested because of iommu issue as described here https://bugzilla.kernel.org/show_bug.cgi?id=202241):
phy#1
Interface wlp0s20f0u3
ifindex 4
wdev 0x100000001
addr da:20:99:ff:c0:34
type managed
txpower 14.00 dBm
shown: 14.00 dBm, but real tx power is much less.

Eprom not read correctly:
* 2484 MHz [14] (disabled)

Also, driver crashed under heavy load.
Described from here:
https://bugzilla.kernel.org/show_bug.cgi?id=202243#c89
up to here:
https://bugzilla.kernel.org/show_bug.cgi?id=202243#c102

Wiphy phy2
max # scan SSIDs: 4
max scan IEs length: 2243 bytes
max # sched scan SSIDs: 0
max # match sets: 0
max # scan plans: 1
max scan plan interval: -1
max scan plan iterations: 0
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports RSN-IBSS.
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP-128 (00-0f-ac:4)
* CCMP-256 (00-0f-ac:10)
* GCMP-128 (00-0f-ac:8)
* GCMP-256 (00-0f-ac:9)
* CMAC (00-0f-ac:6)
* CMAC-256 (00-0f-ac:13)
* GMAC-128 (00-0f-ac:11)
* GMAC-256 (00-0f-ac:12)
Available Antennas: TX 0x1 RX 0x1
Supported interface modes:
* managed
* monitor
Band 1:
Capabilities: 0x17e
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 4 usec (0x05)
HT TX/RX MCS rate indexes supported: 0-7
Bitrates (non-HT):
* 1.0 Mbps (short preamble supported)
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 2412 MHz [1] (14.0 dBm)
* 2417 MHz [2] (14.0 dBm)
* 2422 MHz [3] (14.0 dBm)
* 2427 MHz [4] (14.0 dBm)
* 2432 MHz [5] (14.0 dBm)
* 2437 MHz [6] (14.0 dBm)
* 2442 MHz [7] (14.0 dBm)
* 2447 MHz [8] (14.0 dBm)
* 2452 MHz [9] (14.0 dBm)
* 2457 MHz [10] (14.0 dBm)
* 2462 MHz [11] (14.0 dBm)
* 2467 MHz [12] (14.0 dBm)
* 2472 MHz [13] (14.0 dBm)
* 2484 MHz [14] (disabled)
Band 2:
Capabilities: 0x17e
HT20/HT40
SM Power Save disabled
RX Greenfield
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 4 usec (0x05)
HT TX/RX MCS rate indexes supported: 0-7
VHT Capabilities (0x01800120):
Max MPDU length: 3895
Supported Channel Width: neither 160 nor 80+80
short GI (80 MHz)
VHT RX MCS set:
1 streams: MCS 0-7
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT RX highest supported: 0 Mbps
VHT TX MCS set:
1 streams: MCS 0-7
2 streams: not supported
3 streams: not supported
4 streams: not supported
5 streams: not supported
6 streams: not supported
7 streams: not supported
8 streams: not supported
VHT TX highest supported: 0 Mbps
Bitrates (non-HT):
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
Frequencies:
* 5180 MHz [36] (17.0 dBm)
* 5200 MHz [40] (17.0 dBm)
* 5220 MHz [44] (17.0 dBm)
* 5240 MHz [48] (17.0 dBm)
* 5260 MHz [52] (17.0 dBm) (radar detection)
* 5280 MHz [56] (17.0 dBm) (radar detection)
* 5300 MHz [60] (17.0 dBm) (radar detection)
* 5320 MHz [64] (17.0 dBm) (radar detection)
* 5500 MHz [100] (17.0 dBm) (radar detection)
* 5520 MHz [104] (17.0 dBm) (radar detection)
* 5540 MHz [108] (17.0 dBm) (radar detection)
* 5560 MHz [112] (17.0 dBm) (radar detection)
* 5580 MHz [116] (17.0 dBm) (radar detection)
* 5600 MHz [120] (17.0 dBm) (radar detection)
* 5620 MHz [124] (17.0 dBm) (radar detection)
* 5640 MHz [128] (17.0 dBm) (radar detection)
* 5660 MHz [132] (17.0 dBm) (radar detection)
* 5680 MHz [136] (17.0 dBm) (radar detection)
* 5700 MHz [140] (17.0 dBm) (radar detection)
* 5745 MHz [149] (17.0 dBm)
* 5765 MHz [153] (17.0 dBm)
* 5785 MHz [157] (17.0 dBm)
* 5805 MHz [161] (17.0 dBm)
* 5825 MHz [165] (17.0 dBm)
Supported commands:
* new_interface
* set_interface
* new_key
* start_ap
* new_station
* new_mpath
* set_mesh_config
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* set_tx_bitrate_mask
* frame
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* probe_client
* set_noack_map
* register_beacons
* start_p2p_device
* set_mcast_rate
* connect
* disconnect
* set_qos_map
* set_multicast_to_unicast
Supported TX frame types:
* IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
* IBSS: 0x40 0xb0 0xc0 0xd0
* managed: 0x40 0xd0
* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* mesh point: 0xb0 0xc0 0xd0
* P2P-client: 0x40 0xd0
* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* P2P-device: 0x40 0xd0
software interface modes (can always be added):
* monitor
interface combinations are not supported
HT Capability overrides:
* MCS: ff ff ff ff ff ff ff ff ff ff
* maximum A-MSDU length
* supported channel width
* short GI for 40 MHz
* max A-MPDU length exponent
* min MPDU start spacing
Device supports TX status socket option.
Device supports HT-IBSS.
Device supports SAE with AUTHENTICATE command
Device supports low priority scan.
Device supports scan flush.
Device supports AP scan.
Device supports per-vif TX power setting
Driver supports full state transitions for AP/GO clients
Driver supports a userspace MPM
Device supports active monitor (which will ACK incoming frames)
Device supports configuring vdev MAC-addr on create.

@LorenzoBianconi
Copy link
Contributor

LorenzoBianconi commented Jan 26, 2019 via email

@ZerBea
Copy link

ZerBea commented Jan 26, 2019

USB device:
148f:761a Ralink Technology, Corp. MT7610U ("Archer T2U" 2.4G+5G WLAN)

@ZerBea
Copy link

ZerBea commented Jan 26, 2019

and the other values:
/sys/kernel/debug/ieee80211/phy1/mt76/txpower
[Target power: 32
Delta: 0 0

/sys/kernel/debug/ieee80211/phy1/mt76/rate_txpower
CCK: -4 -4 -4 -4
OFDM: -4 -4 -4 -4 -4 -4 -4 -4
STBC: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4
HT: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4
VHT: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4

looking not good, so far.

running the first tests using iw and hcxdumptool

@orangepizza
Copy link

could you please try this repo? https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x0_init_target_power
I added some fixes in eeprom tx power parsing (please not I have not been able to test it, just compiled)

I have device with mt7610e (tplink c2), but have no idea how to use this for openwrt? makefiile of mt76 is just a link to git (openwrt/mt76), so should I fork that and apply last few commits form there to it myself?

@LorenzoBianconi
Copy link
Contributor

and the other values:
/sys/kernel/debug/ieee80211/phy1/mt76/txpower
[Target power: 32
Delta: 0 0

/sys/kernel/debug/ieee80211/phy1/mt76/rate_txpower
CCK: -4 -4 -4 -4
OFDM: -4 -4 -4 -4 -4 -4 -4 -4
STBC: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4
HT: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4
VHT: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4

looking not good, so far.

running the first tests using iw and hcxdumptool

Could you please provide me your eeprom data (/sys/kernel/debug/ieee80211/phy0/mt76/eeprom)?

@ZerBea
Copy link

ZerBea commented Jan 27, 2019

‎Of course:
T2UHeeprom.zip

and linux- firmware is from:
20190118.a8b75ca-1

@ZerBea
Copy link

ZerBea commented Jan 29, 2019

Hi Lorenzo.
Got the latest driver from linux-next and applied patch from here:
https://patchwork.kernel.org/patch/10782801/
Unfortunately, we run into some issues again:
$ iw dev
Interface wlp0s20f0u1
ifindex 4
wdev 0x100000001
addr 76:22:24:c8:2d:95
type monitor
wiphy 1
channel 11 (2462 MHz), width: 20 MHz (no HT), center1: 2462 MHz
txpower 16.00 dBm

$ iw phy1 info
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)

$ iw dev
Interface wlp0s20f0u1
ifindex 4
wdev 0x100000001
addr 76:22:24:c8:2d:95
type monitor
wiphy 1
channel 11 (2462 MHz), width: 20 MHz (no HT), center1: 2462 MHz
txpower 16.00 dBm

the real tx output is still much lower than 20.0 dBm

BTW:
Thanks for your great effort. I think, we are on the right way.

@ZerBea
Copy link

ZerBea commented Jan 29, 2019

Also channel 14 isn't disabled, as from the driver reported:

  • 2484 MHz [14] (disabled)

phy#1
Interface wlp0s20f0u1
ifindex 5
wdev 0x200000001
addr 50:3e:aa:92:e3:26
type monitor
channel 14 (2484 MHz), width: 20 MHz (no HT), center1: 2484 MHz
txpower 16.00 dBm

$ hcxdumptool -i wlp0s20f0u1 -C
initialization...
available channels:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165
terminated...

tx output power is the same as on ch 1...13

@LorenzoBianconi
Copy link
Contributor

@ZerBea using this repo, could you please provide me the output of:

  • /sys/kernel/debug/ieee80211/phy1/mt76/txpower
  • /sys/kernel/debug/ieee80211/phy1/mt76/rate_txpower
    (at 2412MHz and 5180MHz)

@ZerBea
Copy link

ZerBea commented Jan 30, 2019

@LorenzoBianconi here we go:
repo: https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x0_init_target_power
ifindex 4
wdev 0x100000001
addr 5e:8d:d9:1a:e0:88
type monitor
wiphy 1
channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
txpower 14.00 dBm

/sys/kernel/debug/ieee80211/phy1/mt76/txpower
Target power: 32
Delta: 0 0

/sys/kernel/debug/ieee80211/phy1/mt76/rate_txpower
CCK: -4 -4 -4 -4
OFDM: -4 -4 -4 -4 -4 -4 -4 -4
STBC: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4
HT: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4
VHT: -4 -4 -4 -4 -4 -4 -4 -4 -4 -4

Interface wlp0s20f0u3
ifindex 4
wdev 0x100000001
addr 5e:8d:d9:1a:e0:88
type monitor
wiphy 1
channel 36 (5180 MHz), width: 20 MHz (no HT), center1: 5180 MHz
txpower 17.00 dBm

/sys/kernel/debug/ieee80211/phy1/mt76/txpower
Target power: 28
Delta: 0 0

/sys/kernel/debug/ieee80211/phy1/mt76/rate_txpower
CCK: 0 0 0 0
OFDM: 6 6 6 6 4 4 0 0
STBC: -3 -3 -3 -3 0 0 -4 -4 0 0
HT: 6 6 6 6 4 4 0 0 0 0 0 0 0 0 0 0
VHT: 6 6 6 6 4 4 0 -1 -1 0

Please do not wonder about "type monitor". I'm using hcxdumptool to set channel.
BTW:
Compared to 4.19, driver is extremely slow and unstable. hcxdumptool takes twice more time to set a channel.
I ordered another device (ASUS USB-AC51) to test if issue could be VENDOR related.

@LorenzoBianconi
Copy link
Contributor

@ZerBea I think the results you posted are not directly from the eeprom you posted since I parsed it and I got different results for rate_power (especially @2Ghz) . Anyway the txpower is limited to 17dbm (@5180MHz) by the eeprom calibration value

@ZerBea
Copy link

ZerBea commented Jan 30, 2019

To make sure, we retrieve correct eeprom values from this driver
https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76x0_init_target_power
I stopped all services that could take access on the device, before I plugged it in.

mt76eeprom.zip

@ZerBea
Copy link

ZerBea commented Feb 1, 2019

Today I got the new devices.
The second TP-LINK Archer T2UH shows exactly the same behaviour as the first one. So we can assume it's not a hardware issue.

This are the values of the ASUS USB AC51:
0b05:17d1 ASUSTek Computer, Inc. AC51 802.11a/b/g/n/ac Wireless Adapter [Mediatek MT7610U]

Interface wlp0s20f0u3
ifindex 4
wdev 0x100000001
addr 12:f6:b1:38:e9:f9
type monitor
wiphy 1
channel 1 (2412 MHz), width: 20 MHz (no HT), center1: 2412 MHz
txpower 16.00 dBm

/sys/kernel/debug/ieee80211/phy1/mt76/rate_txpower
CCK: -2 -2 -2 -2
OFDM: -2 -2 -4 -4 -2 -2 -4 -4
STBC: -2 -2 -5 -5 -2 -2 -4 -4 -2 -2
HT: -2 -2 -4 -4 -2 -2 -4 -2 -2 -2 -2 -2 -2 -2 -2 -2
VHT: -2 -2 -4 -4 -2 -2 -4 -2 -2 -2

/sys/kernel/debug/ieee80211/phy1/mt76/txpower
Target power: 34
Delta: 0 0

Interface wlp0s20f0u3
ifindex 4
wdev 0x100000001
addr 12:f6:b1:38:e9:f9
type monitor
wiphy 1
channel 36 (5180 MHz), width: 20 MHz (no HT), center1: 5180 MHz
txpower 18.00 dBm

/sys/kernel/debug/ieee80211/phy1/mt76/rate_txpower
CCK: 3 3 3 3
OFDM: 12 12 9 9 5 5 3 3
STBC: -2 -2 -5 -5 -2 -2 -4 -4 0 0
HT: 12 12 9 9 5 5 3 0 0 0 0 0 0 0 0 0
VHT: 12 12 9 9 5 5 3 -1 -1 0

/sys/kernel/debug/ieee80211/phy1/mt76/txpower
Target power: 25
Delta: 0 0

mt76eepromasus.zip

Compared to the values of the T2UH, we can assume the that driver issue is only partly VENDOR specific.

@orangepizza
Copy link

it looks like ZerBea's bug is fixed but what about original bug for mt7610e?

@sgruszka
Copy link
Contributor

sgruszka commented Apr 6, 2019

I'm going to look at it ...

@podtor
Copy link

podtor commented Apr 16, 2019

I have the same problem with 5GHz in the D-link DWR-118 A1 which have MediaTek MT7610E chip. On OpenWrt the 5GHz the signal is very weak. On original firmware, a signal is very good. From a distance, 8 meters have 20ms ping and 80Mbps download.

Original firmware D-LINK DWR-118 A1

@suppenkasper0815
Copy link

Hi, the same issue is on every device with MT76xxx chipset. 5GHz support only works with very very low power. I tried this on Archer C20i, Archer C2, Lenovo Y1 alias Newifi Mini. They are all very very weak on 5 GHz independet on the values in the software. Actually I was able to selebt (398mW) which should be 26dbm in Luci, but no diffrence to lower values. - It is really annoying, because there is no proper device beside some very selected Atheros chipsets which work on Openwrt and most newer devices always have MT- or Realteak-Chipsets. - So it should pretty soon come a solution. - There are already some patches which should work, but it's a mess to compile it with them.

Look here:

https://www.kickstarter.com/projects/1327597961/better-support-for-mt7620a-n-in-openwrt-lede

https://code.dopame.me/veonik/openwrt-mirror/commit/cb6a8aa584a2be62aeac9b5b1573303d5615c672

https://github.com/zaccareal/openwrt-archer-c2/tree/master/package/mediatek/drivers/mt7610e

https://gitee.com/jim9606/mt7610e-openwrt

@ffrediani
Copy link

Guys, just a question to situate myself: are you testing using the mt76 driver or the mt6710e 'unnoficial' MediaTek feed or similar ? I have been trying over and over with mt76 from Snapshot version with zero improvements and I'm willing to perhaps try a different one and be able to report something different.

Let me know which one is the best to try currently.

@orangepizza
Copy link

orangepizza commented Jun 25, 2019

Guys, just a question to situate myself: are you testing using the mt76 driver or the mt6710e 'unnoficial' MediaTek feed or similar ? I have been trying over and over with mt76 from Snapshot version with zero improvements and I'm willing to perhaps try a different one and be able to report something different.

Let me know which one is the best to try currently.

Recently (like less then a month ago) @apr456 discovered a extra mt76 init settings, that used in mediatek mt7610e driver and not used in mt76, and a patch for it.
see #286

@nbd168
Copy link
Member

nbd168 commented Jun 25, 2019

No need for a fork, just use the latest version with my fix for that issue

@ffrediani
Copy link

@nbd168 I have updated about 2 days ago to SNAPSHOT, r10307-629e653 and 4.14.128+2019-03-27-a11b6734-1 but the result seems pretty much what it has always been. The signal for 5 Ghz seems very weak in the same room and only work 1 meter or so from the router (using it on Auto or trying to set it manually).
Was the fix pushed after this version or should this have been fixed already ?

@orangepizza
Copy link

@nbd168 I have updated about 2 days ago to SNAPSHOT, r10307-629e653 and 4.14.128+2019-03-27-a11b6734-1 but the result seems pretty much what it has always been. The signal for 5 Ghz seems very weak in the same room and only work 1 meter or so from the router (using it on Auto or trying to set it manually).
Was the fix pushed after this version or should this have been fixed already ?

it's really fresh. like 8 hours ago fresh.

@araujorm
Copy link

araujorm commented Jun 25, 2019 via email

@ffrediani
Copy link

Thanks folks.
Have updated to r10348-577174cf60 and now it seems to be able to control the Transmit Power correctly. Also the Scan button that has never worked correctly seems now to work.

@orangepizza
Copy link

As this issue is fixed, can someone close relevant issues?
this and
#275
#224
is all about txpower of mt7610, so it can be closed.

@nbd168 nbd168 closed this as completed Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests