LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to control which device driver should be loaded to use? (https://www.linuxquestions.org/questions/slackware-14/how-to-control-which-device-driver-should-be-loaded-to-use-4175497855/)

kcynice 03-11-2014 07:30 PM

How to control which device driver should be loaded to use?
 
My HP notebook has a "Broadcom Corporation BCM4322 802.11a/b/g/n Wireless" adapter, and my system is Slackware 14.1.
And, the default driver was not suite for that device, i have to install a new module named wl from slackbuilds.org: broadcom-sta-6.30.223.141.
Then, I have to run two command every time of booting the system:
/sbin/modprobe -r b44 b43 b43legacy ssb brcmsmac
/sbin/modprobe wl

And, I don't like that, I hope the system can do all works by itself, recognize the device and load the right driver. Or is there a way that, I can control which drivers should be loaded or not?

evo2 03-11-2014 09:05 PM

Hi,
yes you can blacklist the b44 (and friends) and tell the system to load wl at boot time. Exactly how to do that is distro specific, and not being a slacker I don't know the answer off the top of my head. However, I do know of the existence of the much touted slackbook, so I had a look:

http://www.slackbook.org/html/system...KERNEL-MODULES

An explicit answer is not given there, but the very last sentence provides a tantilising hint :-)

HTH,

Evo2.

Richard Cranium 03-11-2014 09:11 PM

Quote:

Originally Posted by evo2 (Post 5132935)
Exactly how to do that is distro specific, and not being a slacker I don't know the answer off the top of my head.

Then why did you answer on a Slackware forum?

I'm certainly willing to believe that you mean well, but perhaps you should provide advice about things for which you do have knowledge.

Richard Cranium 03-11-2014 09:18 PM

Quote:

Originally Posted by kcynice (Post 5132913)
My HP notebook has a "Broadcom Corporation BCM4322 802.11a/b/g/n Wireless" adapter, and my system is Slackware 14.1.
And, the default driver was not suite for that device, i have to install a new module named wl from slackbuilds.org: broadcom-sta-6.30.223.141.
Then, I have to run two command every time of booting the system:
/sbin/modprobe -r b44 b43 b43legacy ssb brcmsmac
/sbin/modprobe wl

And, I don't like that, I hope the system can do all works by itself, recognize the device and load the right driver. Or is there a way that, I can control which drivers should be loaded or not?

In this case, you would want to blacklist the b44, b43, b43legacy, ssb, and brcmsmac kernel modules by adding them to /etc/modprobe.d/blacklist.conf (or by adding an additional file in the same directory which does so) and by adding a new file in the same directory that contains a line such as "alias <devicename> wl" where <devicename> is probably wlan0.

Please read the modprobe.d man page by running the command
Code:

man modprobe.d
. (That's what the README file in /etc/modprobe.d tells you to do.)

If you have further questions about this, please ask. Someone around here will answer you.

evo2 03-11-2014 09:28 PM

Hi,
Quote:

Originally Posted by Richard Cranium (Post 5132937)
Then why did you answer on a Slackware forum?

- Because the question had gone unanswered for more than 1.5 hours (on a subforum that is usually extremely active)
- The question was of a general nature (although the answer is distro specific)
- The answer could be found in the documentation with a matter of minutes - it is usually best to show people how to find a solution instead of just handing it to them.

Quote:

I'm certainly willing to believe that you mean well, but perhaps you should provide advice about things for which you do have knowledge.
See the above.

Cheers,

Evo2.

ReaperX7 03-11-2014 09:46 PM

Edit:

/etc/modprobe.d/blacklist.conf

and add these lines:

Code:

blacklist b44
blacklist b43
blacklist b43legacy
blacklist ssb
blacklist brcmsmac

udev will then autoload the wl driver from now on.

kcynice 03-11-2014 10:08 PM

Quote:

Originally Posted by Richard Cranium (Post 5132939)
In this case, you would want to blacklist the b44, b43, b43legacy, ssb, and brcmsmac kernel modules by adding them to /etc/modprobe.d/blacklist.conf (or by adding an additional file in the same directory which does so) and by adding a new file in the same directory that contains a line such as "alias <devicename> wl" where <devicename> is probably wlan0.

Please read the modprobe.d man page by running the command
Code:

man modprobe.d
. (That's what the README file in /etc/modprobe.d tells you to do.)

If you have further questions about this, please ask. Someone around here will answer you.

Thanks for your reply, I have a look from "man modprobe.d" and add a file at /etc/modprobe.d, named wireless.conf:

Code:

blacklist b44 b43 b43legacy ssb brcmsmac
install wl

and got a warning at booting time:
Code:

libkmod: kmod_config_parse: /etc/modprobe.d/wireless.conf line 2: ignoring bad line starting with 'install'
libkmod: kmod_config_parse: /etc/modprobe.d/wireless.conf line 2: ignoring bad line starting with 'install'.


Paulo2 03-12-2014 12:10 AM

Maybe isn't the case for this broadcom driver, but I have a fax-modem card driver that
isn't loaded automatically, so I added the driver in /etc/rc.d/rc.modules-...
Am I right doing this? So far it's working.


All times are GMT -5. The time now is 08:18 PM.