fedora-sysv / initscripts

📜 Scripts to bring up network interfaces and legacy utilities in Fedora.
GNU General Public License v2.0
46 stars 52 forks source link

network device renaming doesn't work with mt76x0u driver #299

Closed joy4eg closed 4 years ago

joy4eg commented 4 years ago

Fedora 31, initscripts-10.02-2.fc31.x86_64

[    4.023015] usb 3-6.4: new high-speed USB device number 6 using xhci_hcd
[    4.108638] usb 3-6.4: New USB device found, idVendor=0e8d, idProduct=7610, bcdDevice= 1.00
[    4.110294] usb 3-6.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.111924] usb 3-6.4: Product: WiFi
[    4.113519] usb 3-6.4: Manufacturer: MediaTek
[    4.115084] usb 3-6.4: SerialNumber: 1.0
[   13.736091] usb 3-6.4: reset high-speed USB device number 6 using xhci_hcd
[   13.818419] usb 3-6.4: ASIC revision: 76100002 MAC revision: 76502000
[   14.529163] usb 3-6.4: EEPROM ver:02 fae:04
...
[   15.782371] usbcore: registered new interface driver mt76x0u

Assigned device name is wlan0

$ iw dev
phy#1
        Interface wlan0
                ifindex 4
                wdev 0x100000001
                addr e2:ee:04:f2:XX:YY
                type managed
                txpower 0.00 dBm
                multicast TXQ:

I guess it can be related how those drivers works: Intel dongle has the correct name (wlp6s0).

$ ls -lh /sys/class/net/wlp6s0/device/driver
lrwxrwxrwx 1 root root 0 Jan 14 12:28 /sys/class/net/wlp6s0/device/driver -> ../../../../../../bus/pci/drivers/iwlwifi/

mt76XXX:

$ ls -lh /sys/class/net/wlan0/device/driver
lrwxrwxrwx 1 root root 0 Jan 14 12:28 /sys/class/net/wlan0/device/driver -> ../../../../../../../../../bus/usb/drivers/usb/
jamacku commented 4 years ago

Hi, I'm not sure whether this bug is related to initscripts. It seems more like some driver issue as you mentioned.

@joy4eg , please why do you think that this is bug in initscripts?

joy4eg commented 4 years ago

@jamacku I'm not sure where is the right place to post this issue :) I found that device renamer lives here, and that's why opened the issue.

jamacku commented 4 years ago

@joy4eg may I ask you what is actual issue?

To me It looks like you have dedicated wifi card and in same time external usb wifi connected to your pc. There for its normal in my opinion.

joy4eg commented 4 years ago

may I ask you what is actual issue?

The issue was when I plug-in my external (USB) WiFi dongle it gets name wlan0. Expected name: wlan<usb bus><usb dev>.

For instance, I have two different dongles: ALFA Network AWUS1900 (RTL8814AU) and wavlink AC600 (MT7610U). I have a PC (X570 aorus master) with rear usb port. When I plug-in the RTL8814AU device, it gets name wlp15s0f3u2 Then, when I plug-in the MT7610U device in the same port it gets name wlan0

Anyway, I did a few tests again and looks like the issue is gone. Thanks for the feedback!