summaryrefslogtreecommitdiff
path: root/package/ramips/drivers/mt76x2e/files/mt7612e.sh
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 19:55:45 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2018-09-16 19:55:45 +0200
commitc0ce88c586a467665b35d93c2f6962cac8e8dc27 (patch)
treedf24b1ae76338fa83f45c14f8518720f0266705d /package/ramips/drivers/mt76x2e/files/mt7612e.sh
parentffb3f790a5075e5c294420e8348dfe6c429ac921 (diff)
downloadmtk-20170518-c0ce88c586a467665b35d93c2f6962cac8e8dc27.zip
mtk-20170518-c0ce88c586a467665b35d93c2f6962cac8e8dc27.tar.gz
mtk-20170518-c0ce88c586a467665b35d93c2f6962cac8e8dc27.tar.bz2
mt7xxx proprietary Wifi drivers integration + mac80211 weird changes
Diffstat (limited to 'package/ramips/drivers/mt76x2e/files/mt7612e.sh')
-rwxr-xr-xpackage/ramips/drivers/mt76x2e/files/mt7612e.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/package/ramips/drivers/mt76x2e/files/mt7612e.sh b/package/ramips/drivers/mt76x2e/files/mt7612e.sh
new file mode 100755
index 0000000..908d980
--- /dev/null
+++ b/package/ramips/drivers/mt76x2e/files/mt7612e.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+append DRIVERS "mt7612e"
+
+. /lib/wifi/ralink_common.sh
+
+prepare_mt7612e() {
+ prepare_ralink_wifi mt7612e
+}
+
+scan_mt7612e() {
+ scan_ralink_wifi mt7612e mt76x2e
+}
+
+disable_mt7612e() {
+ disable_ralink_wifi mt7612e
+}
+
+enable_mt7612e() {
+ enable_ralink_wifi mt7612e mt76x2e
+}
+
+detect_mt7612e() {
+# detect_ralink_wifi mt7612e mt76x2e
+ ssid=mt7612e #-`ifconfig eth0 | grep HWaddr | cut -c 51- | sed 's/://g'`
+ cd /sys/module/
+ [ -d $module ] || return
+ [ -e /etc/config/wireless ] && return
+ cat <<EOF
+config wifi-device mt7612e
+ option type mt7612e
+ option vendor ralink
+ option band 5G
+ option channel 0
+ option autoch 2
+
+config wifi-iface
+ option device mt7612e
+ option ifname rai0
+ option network lan
+ option mode ap
+ option ssid $ssid
+ option encryption psk2
+ option key 12345678
+
+EOF
+
+}
+
+