summaryrefslogtreecommitdiff
path: root/package/ramips/drivers/mt7610e/files/mt7610e.sh
diff options
context:
space:
mode:
Diffstat (limited to 'package/ramips/drivers/mt7610e/files/mt7610e.sh')
-rwxr-xr-xpackage/ramips/drivers/mt7610e/files/mt7610e.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/ramips/drivers/mt7610e/files/mt7610e.sh b/package/ramips/drivers/mt7610e/files/mt7610e.sh
new file mode 100755
index 0000000..a3661bf
--- /dev/null
+++ b/package/ramips/drivers/mt7610e/files/mt7610e.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+append DRIVERS "mt7610e"
+
+. /lib/wifi/ralink_common.sh
+
+prepare_mt7610e() {
+ prepare_ralink_wifi mt7610e
+}
+
+scan_mt7610e() {
+ scan_ralink_wifi mt7610e mt7610e
+}
+
+disable_mt7610e() {
+ disable_ralink_wifi mt7610e
+}
+
+enable_mt7610e() {
+ enable_ralink_wifi mt7610e mt7610e
+}
+
+detect_mt7610e() {
+# detect_ralink_wifi mt7610e mt7610e
+ ssid=mt7610e-`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 mt7610e
+ option type mt7610e
+ option vendor ralink
+ option band 5G
+ option channel 0
+ option autoch 2
+
+config wifi-iface
+ option device mt7610e
+ option ifname rai0
+ option network lan
+ option mode ap
+ option ssid $ssid
+ option encryption psk2
+ option key 12345678
+
+EOF
+
+
+}
+
+