Bug 29965 - driver for MEDIATEK 7961 not compiled in kernel
Summary: driver for MEDIATEK 7961 not compiled in kernel
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 30030
Blocks:
  Show dependency treegraph
 
Reported: 2022-01-30 13:04 CET by Zamir Ostroukhov
Modified: 2022-02-15 21:53 CET (History)
1 user (show)

See Also:
Source RPM: kernel-desktop-5.15.16-1.mga8-1-1.mga8
CVE:
Status comment:


Attachments

Description Zamir Ostroukhov 2022-01-30 13:04:16 CET
Description of problem:

No driver for wifi adapter mediatek 7961/7921

Version-Release number of selected component (if applicable):

kernel-desktop-5.15.16-1.mga8-1-1.mga8

How reproducible:

# lspcidrake  | i MEDIATEK
unknown         : MEDIATEK Corp.|Device 7961 [NETWORK_OTHER]


Steps to Reproduce:
1. urpmi kernel-source-5.15.16-1.mga8-1-1.mga8 kernel-desktop-5.15.6-2.mga8-1-1.mga8

2. # cat /usr/src/kernel-5.15.16-1.mga8/drivers/net/wireless/mediatek/mt76/mt7921/Kconfig | grep config
config MT7921E

3. # cat /boot/config-5.15.16-desktop-1.mga8 | grep MT7921E
# CONFIG_MT7921E is not set 


# lspci -vvv
01:00.0 Network controller: MEDIATEK Corp. Device 7961
        Subsystem: Lenovo Device e0bc
        Physical Slot: 0
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 255
        IOMMU group: 8
        Region 0: Memory at c0200000 (64-bit, prefetchable) [disabled] [size=1M]
        Region 2: Memory at c0300000 (64-bit, prefetchable) [disabled] [size=16K]
        Region 4: Memory at c0304000 (64-bit, prefetchable) [disabled] [size=4K]
        Capabilities: [80] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 75.000W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+ FLReset-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <8us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                        ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 5GT/s (ok), Width x1 (ok)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
                LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [e0] MSI: Enable- Count=1/32 Maskable+ 64bit+
                Address: 0000000000000000  Data: 0000
                Masking: 00000000  Pending: 00000000
        Capabilities: [f8] Power Management version 3
                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [100 v1] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?>
        Capabilities: [108 v1] Latency Tolerance Reporting
                Max snoop latency: 0ns
                Max no snoop latency: 0ns
        Capabilities: [110 v1] L1 PM Substates
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                          PortCommonModeRestoreTime=3us PortTPowerOnTime=28us
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1+ ASPM_L1.2- ASPM_L1.1+
                           T_CommonMode=0us LTR1.2_Threshold=0ns
                L1SubCtl2: T_PwrOn=10us
        Capabilities: [200 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
Comment 1 Lewis Smith 2022-01-30 21:51:49 CET
Thank you for the report.

Can you please say whether this problem "No driver for wifi adapter mediatek 7961/7921" has just appeared; or whether it has never been present.

Assigning to kernel/drivers anyway.

Assignee: bugsquad => kernel
Source RPM: (none) => kernel-desktop-5.15.16-1.mga8-1-1.mga8

Comment 2 Thomas Backlund 2022-01-31 11:37:38 CET
Thanks for noticing, I have enabled the missing Mediatek devices in kernel configs, so they will be in next kernel build (after 5.15.18-2 has been pushed to updates)
Comment 3 Zamir Ostroukhov 2022-01-31 19:11:40 CET
Lewis, Thomas, thank you.
I try run Mageia on my new laptop.
I have tried rebuild kernel mga8 on Mageia-8, but rebuild from srpm fail.
I successfully rebuild kernel-linus-5.16.4-1.mga9.src.rpm on Mageia-8, but network card running incorrect.
I found topic here: https://bbs.archlinux.org/viewtopic.php?pid=2019006
and patch here: https://patchwork.kernel.org/project/linux-wireless/patch/20220130075837.5270-1-felipe.contreras@gmail.com/
Currently I try rebuild kernel-linus-5.16.4-1.mga9.src.rpm with this patch.
Comment 4 Zamir Ostroukhov 2022-01-31 20:13:54 CET
FYI: driver mt7921e on rebuilded kernel-linus-5.16.4-1.mga9.src.rpm with path https://patchwork.kernel.org/project/linux-wireless/patch/20220130075837.5270-1-felipe.contreras@gmail.com/ working fine.
Comment 5 Lewis Smith 2022-01-31 21:07:54 CET
You seem very capable! Join our packagers!
 https://wiki.mageia.org/en/Becoming_a_Mageia_Packager

So you have shown that the indicated patch is effective; but when the next kernel 5.15.18-2 gets pushed (comment 2), please try that and report back here.

CC: (none) => lewyssmith

Comment 6 Thomas Backlund 2022-01-31 22:28:02 CET
(In reply to Zamir Ostroukhov from comment #3)
> Lewis, Thomas, thank you.
> I try run Mageia on my new laptop.
> I have tried rebuild kernel mga8 on Mageia-8, but rebuild from srpm fail.
> I successfully rebuild kernel-linus-5.16.4-1.mga9.src.rpm on Mageia-8, but
> network card running incorrect.
> I found topic here: https://bbs.archlinux.org/viewtopic.php?pid=2019006
> and patch here:
> https://patchwork.kernel.org/project/linux-wireless/patch/20220130075837.
> 5270-1-felipe.contreras@gmail.com/


Yep, I'm aware of that one, and it's already patched 5.16.4-2 in Cauldron.
It's not needed in 5.15 series in Mga 8
Comment 7 Thomas Backlund 2022-02-02 18:01:55 CET
There is now a kernel-5.15.19-1.mga8 in Core Updates Testing that has Mediatek wifi support enabled, please test
Comment 8 Lewis Smith 2022-02-02 21:26:55 CET
Yes, Zamir, please do test it. You are the only one who can - has the necessary hardware.
Comment 9 Zamir Ostroukhov 2022-02-03 08:48:51 CET
Everything is fine. Thanks a lot!


$ ethtool -i wlp1s0
driver: mt7921e
version: 5.15.19-desktop-1.mga8
firmware-version: ____010000-20211222190917
...
                                                                                                                                                                                                                                                                                                                                                                           
$ ping -4 -c1 -I wlp1s0 8.8.8.8                                                                                                                                                                                 
PING 8.8.8.8 (8.8.8.8) from 10.76.200.155 wlp1s0: 56(84) bytes of data.                                                                                                                                                       
64 bytes from 8.8.8.8: icmp_seq=1 ttl=109 time=41.7 ms                                                                                                                                                                        
                                                                                                                                                                                                                              
--- 8.8.8.8 ping statistics ---                                                                                                                                                                                               
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                                                                                                                                                   
rtt min/avg/max/mdev = 41.691/41.691/41.691/0.000 ms
Comment 10 Lewis Smith 2022-02-03 21:20:39 CET
Thank you for your positive feedback.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Thomas Backlund 2022-02-11 17:09:40 CET

Depends on: (none) => 30030

Comment 11 Thomas Backlund 2022-02-15 21:53:06 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2022-0062.html

Note You need to log in before you can comment on or make changes to this bug.