Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions system/driver/bcm4313/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Check wrong kernel module blacklist for bcm4313

Check wrong kernel module blacklist for bcm4313

# How to check?

1, check pci of bcm4313

2, check whether brcmsmac is in use

```
check ()
{
local pci_info="$(lspci -d "14e4:4727" 2>/dev/null)";
if [ "${pci_info}" ]; then
if ! lsmod | grep brcmsmac; then
return 1;
fi;
fi
}
```

# How to fix?

1, blacklist kernel module b43 and wl

2, remove package bcmwl-kernel-source

```
fix ()
{
echo "fix bcm4313 --------------------------------";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 先卸载当前的brcmsmac模块
  2. 写入blacklist前先判断此内容是否以及存在

echo "blacklist b43" | sudo tee -a /etc/modprobe.d/bcm.conf;
echo "blacklist wl" | sudo tee -a /etc/modprobe.d/bcm.conf;
echo "brcmsmac" | sudo tee -a /etc/modules;
sudo apt-get remove -y bcmwl-kernel-source;
exit 0
}
```
39 changes: 39 additions & 0 deletions system/driver/bcm4313/README.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# bcm4313网卡中内核模块被错误屏蔽

bcm4313网卡中内核模块被错误屏蔽

# 如何检查?

1, 通过pci检查是否有bcm4313网卡

2, 检查brcmsmac模块是否在使用

```
check ()
{
local pci_info="$(lspci -d "14e4:4727" 2>/dev/null)";
if [ "${pci_info}" ]; then
if ! lsmod | grep brcmsmac; then
return 1;
fi;
fi
}
```

# 如何修复?

1, 屏蔽掉b43和wl模块

2, 删除软件包bcmwl-kernel-source

```
fix ()
{
echo "fix bcm4313 --------------------------------";
echo "blacklist b43" | sudo tee -a /etc/modprobe.d/bcm.conf;
echo "blacklist wl" | sudo tee -a /etc/modprobe.d/bcm.conf;
echo "brcmsmac" | sudo tee -a /etc/modules;
sudo apt-get remove -y bcmwl-kernel-source;
exit 0
}
```
55 changes: 55 additions & 0 deletions system/driver/bcm4313/fix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash
source ../../../functions

META[AUTHOR]="Jianfeng Liu<liujianfeng@deepin.com>"
META[AUTO_CHECK]=false
META[AUTO_FIX]=false
META[VALIDATE_UNTIL]="2016-11-2"

COMMENT description <<EOF
Check wrong kernel module blacklist for bcm4313
EOF
COMMENT zh description <<EOF
bcm4313网卡中内核模块被错误屏蔽
EOF
COMMENT check <<EOF
1, check pci of bcm4313

2, check whether brcmsmac is in use
EOF
COMMENT zh check <<EOF
1, 通过pci检查是否有bcm4313网卡

2, 检查brcmsmac模块是否在使用
EOF
function check()
{
local pci_info="$(lspci -d "14e4:4727" 2>/dev/null)"
if [ "${pci_info}" ]; then
if ! lsmod|grep brcmsmac ; then
return 1
fi
fi
}

COMMENT fix <<EOF
1, blacklist kernel module b43 and wl

2, remove package bcmwl-kernel-source
EOF
COMMENT zh fix <<EOF
1, 屏蔽掉b43和wl模块

2, 删除软件包bcmwl-kernel-source
EOF
function fix()
{
echo "fix bcm4313 --------------------------------"
echo "blacklist b43" | sudo tee -a /etc/modprobe.d/bcm.conf
echo "blacklist wl" | sudo tee -a /etc/modprobe.d/bcm.conf
echo "brcmsmac" | sudo tee -a /etc/modules
sudo apt-get remove -y bcmwl-kernel-source
exit 0
}

base_main $*