ubuntu14.04 install wireless network card driver

After struggling for a long time, I can finally connect to the wireless network normally. Thinking about it now, the fundamentals of an operating system are so important.

 

Simpler way: bcmwl-kernel-source of ubuntu apt source

The installation method is as follows:

sudo apt-get update
sudo apt-get install bcmwl-kernel-source

Add the driver to the blacklist and let the system remember

south you /etc/modprobe.d/blacklist.conf

Add the following statement at the end:

blacklist b43
blacklist ssb
blacklist brcmsmac

 

Complicated method:

The PC company's driver download website only supports Windows XX version drivers. The driver for installing the Linux operating system must be downloaded and installed on the website of the corresponding hardware manufacturer.

First of all, you must know the hardware configuration of your computer:

lspci

 Find the Network controller item. Find the corresponding wireless network card hardware company and product model.

(Network controller is the wireless network card item, and Ethernet controller is the Ethernet network card item)

 

The following content has not been tried for the time being and is used as an excerpt:

Go to the official website of broadcom: http://www.broadcom.com/support/802.11/linux_sta.php to download the corresponding driver package.

First, download the corresponding driver according to whether your OS is 32bit or 64bit. After downloading, start to decompress and prepare for compilation:

mkdir bcm43xx_x86_64-v5_100_82_112
tar xzvf hybrid-portsrc_x86_64-v5_100_82_112.tar.gz -C bcm43xx_x86_64-v5_100_82_112
cd bcm43xx_x86_64-v5_100_82_112
make

I get the following error:

Using Wireless Extension API
  LD      /home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112/built-in.o
  CC [M]  /home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112/src/shared/linux_osl.o
  CC [M]  /home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112/src/wl/sys/wl_linux.o
/home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112/src/wl/sys/wl_linux.c:388:2: error: unknown field ‘ndo_set_multicast_list’ specified in initializer
/home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112/src/wl/sys/wl_linux.c:388:2: warning: initialization from incompatible pointer type [enabled by default]
/home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112/src/wl/sys/wl_linux.c:388:2: warning: (near initialization for ‘wl_netdev_ops.ndo_validate_addr’) [enabled by default]
make[2]: *** [/home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_/home/ego/Drivers/bcm43xx_x86_64-v5_100_82_112] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-26-generic'
make: *** [all] Error 2

The key is line 388 of src/wl/sys/wl_linux.c

vi src/wl/sys/wl_linux.c +388

code show as below:

.ndo_set_multicast_list = wl_set_multicast_list,

Looking at the kernel source struct net_device_ops does not have this interface.

Take a look at the patch of bcmwl-kernel-source, it is replaced by .ndo_set_rx_mode, then we also replace it with this:

vi src/wl/sys/wl_linux.c +388

Change the source file to the following:

#if 0
        .ndo_set_multicast_list = wl_set_multicast_list,
#else
        .ndo_set_rx_mode = wl_set_multicast_list,
#endif

After modification, save and continue to compile:

make

The compilation passed successfully this time, and wl.ko was generated.

sudo make install
sudo rmmod brcmsmac
sudo rmmod brcmutil
sudo depmod
sudo modprobe wl
sudo ifconfig eth1 up

The wireless network card is running normally, and the signal is obviously better than that of bcmwl-kernel-source.

 

Disable the kernel driver:

south you /etc/modprobe.d/blacklist.conf

Add the following statement at the end:

blacklist b43
blacklist ssb
blacklist brcmsmac

After saving the file, reboot.

 

The problem came out, the wl was loaded, but the wireless network card could not be driven normally. Why was it available before the restart, and the environment before the restart was reproduced:

sudo rmmod wl
sudo modprobe brcmsmac
sudo rmmod brcmsmac
sudo rmmod brcmutil
sudo modprobe wl

It's amazing, it actually works again, it seems to depend on brcmsmac, it's not perfect, continue to toss!

 

method 1:

Modify the startup script:

sudo vi /etc/init.d/rc

After blasting to the exit 0 keyword at the end of the text, modify it as follows:

rmmod wl
modprobe brcmsmac
rmmod brcmsmac
rmmod brcmutil
modprobe wl
trap - EXIT # Disable emergency handler
exit 0

Save, restart, ok, the drive is normal, but during the startup process, the wireless indicator of the notebook will flash cyclically for 1 second, which is not the optimal solution, continue to toss!

 

Method 2:

Since bcmwl-kernel-source can directly drive the device without relying on brcmsmac, why can't it be compiled by itself.

Continue to analyze his deb, and found no difference, but his driver installation path is different, is this also bad, continue to be lazy:

sudo apt-get install bcmwl-kernel-source

Then replace our compiled wl.ko with bcmwl-kernel-source:

sudo mv /lib/modules/`uname -r`/updates/dkms/wl.ko /lib/modules/`uname -r`/updates/dkms/wl.ko.old
sudo cp ./wl.ko /lib/modules/`uname -r`/updates/dkms/wl.ko

Continue to disable the kernel driver:

south you /etc/modprobe.d/blacklist.conf

Add the following statement at the end:

blacklist b43
blacklist ssb
blacklist brcmsmac

After saving the file, reboot.

 

References:

http://blog.sina.com.cn/s/blog_73b6331101016haq.html

http://forums.fedoraforum.org/archive/index.php/t-280821.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327105710&siteId=291194637