summaryrefslogtreecommitdiff
path: root/package/ramips/drivers/mt7610e
diff options
context:
space:
mode:
Diffstat (limited to 'package/ramips/drivers/mt7610e')
-rwxr-xr-xpackage/ramips/drivers/mt7610e/Makefile74
-rwxr-xr-xpackage/ramips/drivers/mt7610e/config.in221
-rwxr-xr-xpackage/ramips/drivers/mt7610e/files/mt7610e.dat132
-rwxr-xr-xpackage/ramips/drivers/mt7610e/files/mt7610e.sh50
4 files changed, 477 insertions, 0 deletions
diff --git a/package/ramips/drivers/mt7610e/Makefile b/package/ramips/drivers/mt7610e/Makefile
new file mode 100755
index 0000000..2fcfcf7
--- /dev/null
+++ b/package/ramips/drivers/mt7610e/Makefile
@@ -0,0 +1,74 @@
+# All rights reserved.
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=mt7610e
+P4REV:=118062
+PKG_VERSION:=p4rev-$(P4REV)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://localhost/
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_KCONFIG:= \
+ RALINK_MT7620 RT_SECOND_CARD MT7610_AP MT7610_AP_V24_DATA_STRUCTURE MT7610_AP_LED MT7610_AP_WSC MT7610_AP_WSC_V2 \
+ MT7610_AP_LLTD MT7610_AP_WDS MT7610_AP_MBSS NEW_MBSSID_MODE MT7610_AP_APCLI MT7610_AP_MAC_REPEATER \
+ MT7610_AP_IGMP_SNOOP MT7610_AP_DFS MT7610_AP_CARRIER M7610_CON_WPS_SUPPORT MT7610_AP_80211N_DRAFT3 \
+ MT7610_AP_ATE MT7610_AP_QA MT7610_AP_FLASH MT7610_AP_BIG_ENDIAN MT7610_AP_TSSI_COMPENSATION \
+ RTMP_TEMPERATURE_COMPENSATION MT7610_AP_SINGLE_SKU
+
+PKG_CONFIG_DEPENDS:=$(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_$c),CONFIG_$(c)))
+
+include $(INCLUDE_DIR)/package.mk
+
+TAR_CMD=$(HOST_TAR) -C $(1)/ $(TAR_OPTIONS)
+
+define KernelPackage/mt7610e
+ CATEGORY:=MTK Properties
+ TITLE:=MTK MT7610e wifi AP driver
+ FILES:=$(PKG_BUILD_DIR)/build/mt7610e.ko
+ SUBMENU:=Drivers
+ MENU:=1
+endef
+
+define KernelPackage/mt7610e/config
+ source "$(SOURCE)/config.in"
+endef
+
+define P4/Info
+ P4URL:=//Embedded_WIFI/MP/MT7610/rlt_wifi/
+endef
+
+define P4/Release
+ make release
+ mkdir -p build
+ cp Makefile.ap.soc.dpa build/Makefile
+ cp Kconfig.ap.soc build/Kconfig
+ mv DPA src
+ tar cjf mt7610e.tar.bz2 build src
+endef
+
+
+
+define Build/Compile
+ $(MAKE) -C "$(LINUX_DIR)" V=1 \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ ARCH="$(LINUX_KARCH)" \
+ SUBDIRS="$(PKG_BUILD_DIR)/build/" \
+ $(foreach c, $(PKG_KCONFIG),$(if $(CONFIG_$c),CONFIG_$(c)=$(CONFIG_$(c))))\
+ modules
+endef
+
+define KernelPackage/mt7610e/install
+ $(INSTALL_DIR) $(1)/lib/wifi/
+ $(INSTALL_BIN) ./files/mt7610e.sh $(1)/lib/wifi/
+ $(INSTALL_DIR) $(1)/etc/wireless/mt7610e/
+ $(INSTALL_BIN) ./files/mt7610e.dat $(1)/etc/wireless/mt7610e/
+ -$(INSTALL_BIN) ./files/mt7610e.eeprom.bin $(1)/etc/wireless/mt7610e/
+ echo p$(P4REV) > $(1)/etc/wireless/mt7610e/version
+endef
+
+$(eval $(call KernelPackage,mt7610e))
diff --git a/package/ramips/drivers/mt7610e/config.in b/package/ramips/drivers/mt7610e/config.in
new file mode 100755
index 0000000..b76b6f2
--- /dev/null
+++ b/package/ramips/drivers/mt7610e/config.in
@@ -0,0 +1,221 @@
+if PACKAGE_kmod-mt7610e
+
+config RT_SECOND_CARD
+ string
+ default 7610
+ depends on PACKAGE_kmod-mt7610e
+
+config SECOND_IF_MT7610E
+ bool
+ default y
+ depends on PACKAGE_kmod-mt7610e
+
+config MT7610_AP
+ bool # "Ralink MT7610 802.11n AP support"
+ default y
+ depends on PACKAGE_kmod-mt7610e
+# depends on NET_RADIO
+ select WIRELESS_EXT
+ select WEXT_SPY
+ select WEXT_PRIV
+
+config MT7610_AP_V24_DATA_STRUCTURE
+ bool
+ depends on MT7610_AP
+ default y
+
+config MT7610_AP_LED
+ bool "LED Support"
+ depends on MT7610_AP
+
+config MT7610_AP_WSC
+ bool "WSC (WiFi Simple Config)"
+ depends on MT7610_AP
+ default y
+
+config MT7610_AP_WSC_V2
+ bool "WSC 2.0(WiFi Simple Config 2.0)"
+ depends on MT7610_AP_WSC
+ default y
+
+config MT7610_AP_LLTD
+ bool "LLTD (Link Layer Topology Discovery Protocol)"
+ depends on MT7610_AP
+
+config MT7610_AP_WDS
+ bool "WDS"
+ depends on MT7610_AP
+
+#config MT7610_AP_WMM_ACM
+# bool "WMM ACM"
+# depends on MT7610_AP
+
+config MT7610_AP_MBSS
+ bool "MBSSID"
+ depends on MT7610_AP
+ default y
+
+config NEW_MBSSID_MODE
+ bool "New MBSSID MODE"
+ depends on MT7610_AP
+ depends on MT7610_AP_MBSS
+ depends on RALINK_RT3883 || RALINK_RT3352 || RALINK_MT7620
+ default y
+
+config MT7610_AP_APCLI
+ bool "AP-CLient Support"
+ depends on MT7610_AP
+ default y
+
+config MT7610_AP_MAC_REPEATER
+ bool "Mac Repeater Mode Support"
+ depends on MT7610_AP
+ depends on MT7610_AP_APCLI
+ default y
+
+config MT7610_AP_IGMP_SNOOP
+ bool "IGMP snooping"
+ depends on MT7610_AP
+
+#config MT7610_AP_NETIF_BLOCK
+# bool "NETIF Block"
+# depends on MT7610_AP
+# help
+# Support Net interface block while Tx-Sw queue full
+
+config MT7610_AP_DFS
+ bool "DFS"
+ depends on MT7610_AP
+# select RALINK_TIMER
+# select RALINK_TIMER_DFS
+
+config MT7610_AP_CARRIER
+ bool "Carrier Detect"
+ depends on MT7610_AP
+# select RALINK_TIMER
+# select RALINK_TIMER_DFS
+
+#config MT7610_AP_DLS
+# bool "DLS ((Direct-Link Setup) Support"
+# depends on MT7610_AP
+
+#config MT7610_AP_IDS
+# bool "IDS (Intrusion Detection System) Support"
+# depends on MT7610_AP
+
+#Not ready 20120726
+#config MT7610_RT3XXX_AP_ANTENNA_DIVERSITY
+# bool "Antenna Diversity Support"
+# depends on MT7610_AP
+
+#config MT7610_AP_WAPI
+# bool "WAPI Support"
+# depends on MT7610_AP
+
+#config MT7610_AP_COC
+# bool "CoC Support"
+# depends on MT7610_AP
+
+#config MT7610_AP_MEMORY_OPTIMIZATION
+# bool "Memory Optimization"
+# depends on MT7610_AP
+
+#config MT7610_AP_VIDEO_TURBINE
+# bool "Video Turbine support"
+# depends on MT7610_AP
+
+#config RA_CLASSIFIER
+# tristate "Ralink Flow Classifier"
+# depends on MT7610_AP_VIDEO_TURBINE
+# default n
+
+#config MT7610_AP_INTELLIGENT_RATE_ADAPTION
+# bool "Intelligent Rate Adaption"
+# depends on MT7610_AP
+# depends on RALINK_RT2883 || RALINK_RT3883
+
+#config MT7610_AP_TXBF
+# bool "Tx Bean Forming Support (Only 3883)"
+# depends on MT7610_AP
+# depends on RALINK_RT2883 || RALINK_RT3883
+
+config M7610_CON_WPS_SUPPORT
+ bool "Concurrent WPS Support"
+ depends on MT7610_AP
+ depends on MT7610_AP_APCLI
+ depends on MT7610_AP_WSC
+ depends on MT7610_AP_WSC_V2
+ default n
+
+#config MT7610_EXT_CHANNEL_LIST
+# bool "Extension Channel List"
+# depends on MT7610_AP
+
+#config MT7610_KTHREAD
+# bool "Kernel Thread"
+# depends on MT7610_AP
+
+#config MT7610_AUTO_CH_SELECT_ENHANCE
+# bool "Auto Channel Selection Enhancement"
+# depends on MT7610_AP
+
+config MT7610_AP_80211N_DRAFT3
+ bool "802.11n Draft3"
+ depends on MT7610_AP
+ default y
+
+config MT7610_AP_ATE
+ bool "ATE support"
+ depends on MT7610_AP
+
+config MT7610_AP_QA
+ bool "QA support"
+ depends on MT7610_AP
+
+#config MT7610_AP_CSO
+# bool "CSO Support"
+# depends on MT7610_AP
+
+config MT7610_AP_FLASH
+ bool "Flash Mode Support"
+ default y
+ depends on MT7610_AP
+
+#config MT7610_AP_HDR_TRANS
+# bool "Header Translation Rx Support"
+# depends on MT7610_AP
+
+config MT7610_AP_BIG_ENDIAN
+ bool "Big-endian platform Support"
+ depends on MT7610_AP
+
+config MT7610_AP_TSSI_COMPENSATION
+ bool "TSSI DC Calibration & TSSI compensation Support"
+ depends on MT7610_AP
+
+config RTMP_TEMPERATURE_COMPENSATION
+ bool "Tx Power Temperature Compensation"
+ depends on MT7610_AP
+ default y
+
+config MT7610_AP_SINGLE_SKU
+ bool "SingleSKU Support"
+ depends on MT7610_AP
+
+#config MT7610_80211R_FT
+# bool "802.11r Fast BSS Transition"
+# depends on MT7610_AP
+
+#config MT7610_80211R_RR
+# bool "802.11k Radio Resource Management"
+# depends on MT7610_AP
+
+#config MT7610_MCAST_RATE_SPECIFIC
+# bool "User specific tx rate of mcast pkt"
+# depends on MT7610_AP
+
+#config MT7610_SNMP
+# bool "Net-SNMP Support"
+# depends on MT7610_AP
+
+endif
diff --git a/package/ramips/drivers/mt7610e/files/mt7610e.dat b/package/ramips/drivers/mt7610e/files/mt7610e.dat
new file mode 100755
index 0000000..23ec24e
--- /dev/null
+++ b/package/ramips/drivers/mt7610e/files/mt7610e.dat
@@ -0,0 +1,132 @@
+#The word of "Default" must not be removed
+Default
+CountryRegion=
+CountryRegionABand=7
+CountryCode=
+BssidNum=1
+SSID1=OpenWrt-MT7610e
+SSID2=
+SSID3=
+SSID4=
+WirelessMode=9
+TxRate=0
+Channel=auto
+BasicRate=15
+BeaconPeriod=100
+DtimPeriod=1
+TxPower=100
+DisableOLBC=0
+BGProtection=0
+MaxStaNum=0
+TxPreamble=0
+RTSThreshold=2347
+FragThreshold=2346
+TxBurst=1
+PktAggregate=0
+TurboRate=0
+WmmCapable=1
+APSDCapable=1
+DLSCapable=0
+APAifsn=3;7;1;1
+APCwmin=4;4;3;2
+APCwmax=6;10;4;3
+APTxop=0;0;94;47
+APACM=0;0;0;0
+BSSAifsn=3;7;2;2
+BSSCwmin=4;4;3;2
+BSSCwmax=10;10;4;3
+BSSTxop=0;0;94;47
+BSSACM=0;0;0;0
+AckPolicy=0;0;0;0
+NoForwarding=0
+NoForwardingBTNBSSID=0
+HideSSID=0
+StationKeepAlive=0
+ShortSlot=1
+AutoChannelSelect=0
+IEEE8021X=0
+IEEE80211H=0
+CSPeriod=10
+WirelessEvent=0
+IdsEnable=0
+AuthFloodThreshold=32
+AssocReqFloodThreshold=32
+ReassocReqFloodThreshold=32
+ProbeReqFloodThreshold=32
+DisassocFloodThreshold=32
+DeauthFloodThreshold=32
+EapReqFooldThreshold=32
+PreAuth=0
+AuthMode=OPEN
+EncrypType=NONE
+RekeyInterval=0
+RekeyMethod=DISABLE
+PMKCachePeriod=10
+WPAPSK1=
+WPAPSK2=
+WPAPSK3=
+WPAPSK4=
+DefaultKeyID=1
+Key1Type=1;1;1;1
+Key1Str1=
+Key1Str2=
+Key1Str3=
+Key1Str4=
+Key2Type=1;1;1;1
+Key2Str1=
+Key2Str2=
+Key2Str3=
+Key2Str4=
+Key3Type=1;1;1;1
+Key3Str1=
+Key3Str2=
+Key3Str3=
+Key3Str4=
+Key4Type=1;1;1;1
+Key4Str1=
+Key4Str2=
+Key4Str3=
+Key4Str4=
+HSCounter=0
+AccessPolicy0=0
+AccessControlList0=
+AccessPolicy1=0
+AccessControlList1=
+AccessPolicy2=0
+AccessControlList2=
+AccessPolicy3=0
+AccessControlList3=
+WdsEnable=0
+WdsEncrypType=NONE
+WdsList=EOF
+WdsKey=
+RADIUS_Server=192.168.2.3
+RADIUS_Port=1812
+RADIUS_Key=ralink
+own_ip_addr=192.168.5.234
+EAPifname=br-lan
+PreAuthifname=br-lan
+HT_HTC=0
+HT_RDG=0
+HT_EXTCHA=0
+HT_LinkAdapt=0
+HT_OpMode=0
+HT_MpduDensity=5
+HT_BW=0
+HT_AutoBA=1
+HT_AMSDU=0
+HT_BAWinSize=64
+HT_GI=1
+HT_MCS=33
+
+# WPS stuff
+# 1 = enrollee, 2 = proxy, 4 = registrar (bitmask)
+# This value is enabled later on, for WPA only
+WscConfMode=0
+# 1 = disabled, 2 = enabled
+WscConfStatus=2
+# 2 = PBC, 1 = PIN
+WscMode = 2
+
+HT_TxStream=2
+HT_RxStream=2
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
+
+
+}
+
+