Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Patch for mt7610u
--- mt7610u_wifi_sta_v3002_dpo_20130916.orig/os/linux/config.mk 2013-09-16 09:03:08.000000000 -0500
+++ mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/config.mk 2016-06-24 19:08:44.664055148 -0500
@@ -23,12 +23,12 @@
# Support Wpa_Supplicant
# i.e. wpa_supplicant -Dralink
-HAS_WPA_SUPPLICANT=n
+HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Maganger
# i.e. wpa_supplicant -Dwext
-HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n
+HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
#Support Net interface block while Tx-Sw queue full
HAS_BLOCK_NET_IF=n
@@ -660,7 +660,7 @@
WFLAGS += -DCONFIG_CSO_SUPPORT -DCONFIG_TSO_SUPPORT
endif
-CHIPSET_DAT = 2860
+CHIPSET_DAT = 2870
endif
ifneq ($(or $(findstring mt7662e,$(CHIPSET)),$(findstring mt7612e,$(CHIPSET))),)
@@ -1038,7 +1038,7 @@
export CFLAGS
else
# Linux 2.6
- EXTRA_CFLAGS := $(WFLAGS)
+ EXTRA_CFLAGS := $(WFLAGS) -Werror=date-time -Wno-date-time
endif
endif
#!/bin/bash
# Patches for mt7610u
# Author: moutend <moutend@gmail.com>
# Modified: Benjamin <benperove@gmail.com>
# LICENSE: CC BY-SA 4.0
# This bash-script targets Raspberry Pi 2 & 3
KERNEL_VERSION=`uname -r | cut -d '.' -f 1`
if [ "$KERNEL_VERSION" -eq "4" ]
then
patch $HOME/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/rt_linux.c < $HOME/gist/rt_linux.c.patch
fi
patch $HOME/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/config.mk < $HOME/gist/config.mk.patch
patch $HOME/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h < $HOME/gist/rt_linux.h.patch
patch $HOME/mt7610u_wifi_sta_v3002_dpo_20130916/conf/RT2870STA.dat < $HOME/gist/RT2870STA.dat.patch
echo "Successfully done."
--- RT2870STA.dat 2017-09-23 08:54:31.420814114 +0000
+++ RT2870STA.new.dat 2017-09-23 08:57:37.350198404 +0000
@@ -4,9 +4,9 @@
CountryRegionABand=7
CountryCode=
ChannelGeography=1
-SSID=11n-AP
+SSID=
NetworkType=Infra
-WirelessMode=5
+WirelessMode=12
EfuseBufferMode=0
Channel=0
BeaconPeriod=100
@@ -19,8 +19,8 @@
PktAggregate=0
WmmCapable=1
AckPolicy=0;0;0;0
-AuthMode=OPEN
-EncrypType=NONE
+AuthMode=WPA2PSK
+EncrypType=AES
WPAPSK=
DefaultKeyID=1
Key1Type=0
--- mt7610u_wifi_sta_v3002_dpo_20130916.orig/os/linux/rt_linux.c 2013-09-16 09:03:08.000000000 -0500
+++ mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/rt_linux.c 2016-06-24 19:08:03.364307640 -0500
@@ -1083,8 +1083,8 @@
int RtmpOSFileRead(RTMP_OS_FD osfd, char *pDataPtr, int readLen)
{
/* The object must have a read method */
- if (osfd->f_op && osfd->f_op->read) {
- return osfd->f_op->read(osfd, pDataPtr, readLen, &osfd->f_pos);
+ if (osfd->f_op) {
+ return __vfs_read(osfd, pDataPtr, readLen, &osfd->f_pos);
} else {
DBGPRINT(RT_DEBUG_ERROR, ("no file read method\n"));
return -1;
--- mt7610u_wifi_sta_v3002_dpo_20130916.orig/include/os/rt_linux.h 2013-09-16 09:03:08.000000000 -0500
+++ mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h 2016-06-24 19:08:03.384307517 -0500
@@ -277,8 +277,8 @@
typedef struct _OS_FS_INFO_
{
- int fsuid;
- int fsgid;
+ kuid_t fsuid;
+ kgid_t fsgid;
mm_segment_t fs;
} OS_FS_INFO;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment