diff -ur DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/os/rt_linux.h DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/include/os/rt_linux.h
--- DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/os/rt_linux.h	2013-09-12 07:27:14.000000000 +0200
+++ DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/include/os/rt_linux.h	2014-08-28 02:09:13.823643901 +0200
@@ -882,9 +882,14 @@
 		
 #define GET_OS_PKT_DATATAIL(_pkt) \
 		(RTPKT_TO_OSPKT(_pkt)->tail)
+#ifdef NET_SKBUFF_DATA_USES_OFFSET
+#define SET_OS_PKT_DATATAIL(_pkt, _start, _len)	\
+		((RTPKT_TO_OSPKT(_pkt))->tail) = (ULONG)(RTPKT_TO_OSPKT(_pkt)->data - (ULONG)(RTPKT_TO_OSPKT(_pkt)->head) + (_len))
+#else
 #define SET_OS_PKT_DATATAIL(_pkt, _start, _len)	\
 		((RTPKT_TO_OSPKT(_pkt))->tail) = (PUCHAR)((_start) + (_len))
-		
+#endif
+
 #define GET_OS_PKT_HEAD(_pkt) \
 		(RTPKT_TO_OSPKT(_pkt)->head)
 
diff -ur DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/config.mk DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/os/linux/config.mk
--- DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/config.mk	2013-09-12 08:05:55.000000000 +0200
+++ DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/os/linux/config.mk	2014-08-28 02:09:32.557529121 +0200
@@ -290,7 +290,7 @@
 # config for STA mode
 
 ifeq ($(RT28xx_MODE),STA)
-WFLAGS += -DCONFIG_STA_SUPPORT -DSCAN_SUPPORT -DDBG
+WFLAGS += -DCONFIG_STA_SUPPORT -DSCAN_SUPPORT
 
 ifeq ($(HAS_XLINK),y)
 WFLAGS += -DXLINK_SUPPORT
@@ -1054,11 +1054,16 @@
 export CFLAGS
 endif
 
+GCCVERSION = $(shell gcc -dumpversion)
+
 ifeq ($(PLATFORM),PC)
     ifneq (,$(findstring 2.4,$(LINUX_SRC)))
 	# Linux 2.4
 	CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include $(LINUX_SRC)/include/linux/modversions.h $(WFLAGS)
 	export CFLAGS
+    else ifneq (,$(findstring 4.9,$(GCCVERSION)))
+	# GCC 4.9
+        EXTRA_CFLAGS := -Wno-error=date-time $(WFLAGS)
     else
 	# Linux 2.6
 	EXTRA_CFLAGS := $(WFLAGS) 
diff -ur DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/rt_linux.c DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/os/linux/rt_linux.c
--- DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/rt_linux.c	2013-09-12 07:27:14.000000000 +0200
+++ DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/os/linux/rt_linux.c	2014-08-28 02:09:13.838643009 +0200
@@ -27,13 +27,18 @@
 
 #define RTMP_MODULE_OS
 #define RTMP_MODULE_OS_UTIL
-
+#define CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#define NET_SKBUFF_DATA_USES_OFFSET
 
 #include "rtmp_comm.h"
 #include "rtmp_osabl.h"
 #include "rt_os_util.h"
 #include <linux/rtnetlink.h>
 
+#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#include <linux/uidgid.h>
+#endif
+
 #if defined(CONFIG_RA_HW_NAT) || defined(CONFIG_RA_HW_NAT_MODULE)
 #include "../../../../../../net/nat/hw_nat/ra_nat.h"
 #include "../../../../../../net/nat/hw_nat/frame_engine.h"
@@ -494,9 +499,15 @@
 		MEM_DBG_PKT_ALLOC_INC(skb);
 
 		skb_reserve(skb, 2);
+#ifdef NET_SKBUFF_DATA_USES_OFFSET
+		NdisMoveMemory(skb->data+skb->tail, pHeader802_3, HdrLen);
+		skb_put(skb, HdrLen);
+		NdisMoveMemory(skb->data+skb->tail, pData, DataSize);
+#else
 		NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
 		skb_put(skb, HdrLen);
 		NdisMoveMemory(skb->tail, pData, DataSize);
+#endif
 		skb_put(skb, DataSize);
 		skb->dev = pNetDev;	/*get_netdev_from_bssid(pAd, FromWhichBSSID); */
 		pPacket = OSPKT_TO_RTPKT(skb);
@@ -692,7 +703,11 @@
 	pOSPkt->dev = pNetDev;
 	pOSPkt->data = pData;
 	pOSPkt->len = DataSize;
+#ifdef NET_SKBUFF_DATA_USES_OFFSET
+	pOSPkt->tail = (pOSPkt->data-pOSPkt->head)+pOSPkt->len;
+#else
 	pOSPkt->tail = pOSPkt->data + pOSPkt->len;
+#endif
 
 	/* copy 802.3 header */
 
@@ -1118,9 +1133,15 @@
 		pOSFSInfo->fsgid = current->fsgid;
 		current->fsuid = current->fsgid = 0;
 #else
+#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+		struct user_namespace *to = current_user_ns();
+		pOSFSInfo->fsuid = from_kuid_munged(to, current_fsuid());
+		pOSFSInfo->fsgid = from_kgid_munged(to, current_fsgid());
+#else
 		pOSFSInfo->fsuid = current_fsuid();
 		pOSFSInfo->fsgid = current_fsgid();
 #endif
+#endif
 		pOSFSInfo->fs = get_fs();
 		set_fs(KERNEL_DS);
 	} else {
diff -ur DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/sta/sta_cfg.c DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/sta/sta_cfg.c
--- DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/sta/sta_cfg.c	2013-09-12 07:27:14.000000000 +0200
+++ DPO_MT7601U_LinuxSTA_3.0.0.4_20130913-Linux-3.17.0/sta/sta_cfg.c	2014-08-28 02:09:13.842642771 +0200
@@ -8274,6 +8274,7 @@
 			RTMPIoctlGetSiteSurvey(pAd, pRequest);
 			break;
 
+#ifdef DBG
 		case CMD_RTPRIV_IOCTL_MAC:
 			RTMPIoctlMAC(pAd, pRequest);
 			break;
@@ -8285,6 +8286,7 @@
 		case CMD_RTPRIV_IOCTL_RF:
 			RTMPIoctlRF(pAd, pRequest);
 			break;
+#endif /* DBG */
 
 		case CMD_RTPRIV_IOCTL_BBP:
 			RTMPIoctlBbp(pAd, pRequest, pData, Data);
