LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2018, 05:23 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Why does a wifi card need udev when an ethernet card doesn't?


I've recently had a lot of trouble on my laptop because of the failure of udev to start up properly. There's a thread on it in the AntiX/MX forum for anyone who's interested. My wifi didn't come up either. But strangely enough ethernet did. That is to say, there was an eth0 device. It just wasn't functioning because I have no ethernet connection upstairs.

But wlan0 didn't appear at all. There was no such interface. It didn't show up in /sys/class/net and wasn't found by ip link show. I would like to know why not. Why can the kernel not recognise a wifi interface without help from udev?
 
Old 12-12-2018, 07:29 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
implying that at some point udev worked and wifi did too.

My guess is that ethernet is more hardware based and just works in the presence of a driver. Where wifi needs more things like firmware, which might not be installed by default. If there's no firmware then it doesn't matter if there is a driver as it will not work. So no device found and no interface assigned. Or udev loads the kernel module for the hardware, where without it the module does not get loaded.

# lspci -nnk
# lsusb

If the device doesn't show up there, then you have bigger issues.
 
Old 12-12-2018, 09:29 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571

Original Poster
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
No firmware load is needed for this wifi chip. It's not one of those Broadcom ones. I think it's Atheros.

That udev is needed to load the kernel driver sounds like a reasonable explanation, but it just raises the same question over again. The Linux kernel is normally very good at identifying the hardware it is running on and loading the drivers required. It can do so for almost any ethernet card without needing any help from user space. What is so different about wifi?

btw I have everything working on that machine now. Once udevd is running, the interface is brought up without any problems.

Last edited by hazel; 12-12-2018 at 12:01 PM.
 
Old 12-22-2018, 10:40 AM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Even atheros cards have firmware.

$ sudo apt-get install firmware-atheros

$ sudo dmesg | grep -i firmware

Although more likely that udev loads usb to load the wifi driver which loads the firmware. Where ethernet tends to be on the PCI(e) bus. But I haven't exactly run without udev to find out if that breaks things. Although I remember a time before udev. Where using mknod / MAKEDEV was not uncommon if you had uncommon hardware or special needs.

While linux is good at auto-loading modules as needed, you might find that much of that is scripted and part of a distro. And if you look at some of those scripts you might find that it basically bounces off enough walls until it kind of works in most cases. Locations for which vary on some distros, but basically /etc/modprobe.d/ /lib/udev/ /etc/X11/*.d/ and various other efforts.
 
Old 12-22-2018, 10:55 AM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571

Original Poster
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Quote:
Originally Posted by Shadow_7 View Post
Although more likely that udev loads usb to load the wifi driver which loads the firmware. Where ethernet tends to be on the PCI(e) bus.
istr that wifi dongles work like that. The dongle is first recognised as a usb storage device and firmware is loaded from it, then it switches mode and becomes a network device.

But this is an internal wifi card. I'll have to check what bus it's on next time I have the laptop switched on.
 
Old 12-22-2018, 02:56 PM   #6
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,110
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
Do you have udevil installed along with udev hazel? I do.
Code:
udev/oldstable,now 215-17+deb8u8 i386 [installed]
  /dev/ and hotplug management daemon

udevil/jessie,now 0.4.4-1.0nosystemd1 i386 [installed]
  Alternative storage media interface
No problemos with my wireless router 200 feet away.

I know udevil is for mountable media. Just mentioning how mine is set up on AntiX 15 32 bit.

The why part? I don't know. All I know is when you experiment with AntiX.
You are left to pick up the pieces.

https://www.linuxquestions.org/quest...rs-4175643946/

I think but am not sure Anti covered this glitch already.

Code:
Permissions /etc/udev folder

Submitted by anticapitalista on Sat, 11/25/2017 - 08:53

Permissions of /etc/udev folder is wrong (777) which means user cannot even read contents

    Read more about Permissions /etc/udev folder
over here

If I am off base. Sorry.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Chose udev for services... udev starts twice... hotplug fails flipjarg Linux - Newbie 2 09-19-2010 12:49 PM
UDEV - SBLive(emu10k) - Mandriva hangs at UDEV during boot.....still! Grrr. peterlowrie Linux - Hardware 2 05-23-2010 06:37 PM
Need tips on using Ethernet to power WiFi network, and tips on setting up WiFi crabpot8 Linux - Networking 2 08-24-2009 06:42 PM
current users - udev-128 - don't forget rc.udev.new! tobyl Slackware 3 10-08-2008 03:28 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration