Skip to content

Commit

Permalink
Merge pull request #153 from francois-berder-imgtec/fix-mac
Browse files Browse the repository at this point in the history
Set MAC address while inserting wifi driver
  • Loading branch information
Abhijit A. Mahajani committed Sep 23, 2016
2 parents ace26f2 + 2475b70 commit 777e4b6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
5 changes: 0 additions & 5 deletions target/linux/pistachio/base-files/etc/init.d/set_mac
Expand Up @@ -7,11 +7,6 @@ STOP=15

start()
{
generate_mac $WIFI_OTP_REG0
ifconfig wlan0 down
ifconfig wlan0 hw ether $MAC
ifconfig wlan0 up

generate_mac $SOFTAP_OTP_REG0
uci set wireless.ap.macaddr=$MAC
uci commit wireless
Expand Down
16 changes: 16 additions & 0 deletions target/linux/pistachio/base-files/etc/init.d/uccp420wlan
@@ -0,0 +1,16 @@
#!/bin/sh /etc/rc.common

. /lib/functions/mac.sh

START=10
STOP=10

start() {
generate_mac $WIFI_OTP_REG0
local mac_param="mac_addr=\"$(echo $MAC | sed 's/://g')\""
insmod uccp420wlan $mac_param
}

stop() {
rmmod uccp420wlan
}
1 change: 0 additions & 1 deletion target/linux/pistachio/modules.mk
Expand Up @@ -222,7 +222,6 @@ define KernelPackage/uccp420wlan
CONFIG_MWIFIEX=n \
CONFIG_RSI_91X=n
FILES:=$(LINUX_DIR)/drivers/net/wireless/uccp420wlan/uccp420wlan.ko
AUTOLOAD:=$(call AutoLoad,32,uccp420wlan)
endef

define KernelPackage/uccp420wlan/description
Expand Down

0 comments on commit 777e4b6

Please sign in to comment.