[Feature][T106][task-view-74]Based on baseline p56u06 first and fifth patch WiFi part and patch caused mac failure and gpio setting input low failure modification

	Only Configure: Yes
	Affected branch: master
	Affected module: wifi
	Is it affected on both ZXIC and MTK:only ZXIC
	Self-test: Yes
	Doc Update:No

Change-Id: I06a6b61b6e229f4f9f4e949e98c0454110be810c
(cherry picked from commit c08ce0473788b867365d436b4275e58672c7e43a)
diff --git a/ap/os/linux/linux-3.4.x/net/core/net-sysfs.c b/ap/os/linux/linux-3.4.x/net/core/net-sysfs.c
index eb6e8eb..6693e8d 100644
--- a/ap/os/linux/linux-3.4.x/net/core/net-sysfs.c
+++ b/ap/os/linux/linux-3.4.x/net/core/net-sysfs.c
@@ -1258,7 +1258,7 @@
 		goto exit;
 #endif
 	
-#ifdef CONFIG_AIC8800   
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 	if((strcmp(net->name,"wlan0") == 0) || (strcmp(net->name,"wlan0-vxd") == 0) || (strcmp(net->name,"wlan0-va1") == 0)){		
 		if(strncmp(kobj->name, "tx-", 3) != 0)
 			kobject_uevent(kobj, KOBJ_ADD);
diff --git a/ap/os/linux/linux-3.4.x/net/wireless/nl80211.c b/ap/os/linux/linux-3.4.x/net/wireless/nl80211.c
index 72d765e..3971fd0 100755
--- a/ap/os/linux/linux-3.4.x/net/wireless/nl80211.c
+++ b/ap/os/linux/linux-3.4.x/net/wireless/nl80211.c
@@ -206,7 +206,7 @@
 	[NL80211_ATTR_NOACK_MAP] = { .type = NLA_U16 },
 	[NL80211_ATTR_INACTIVITY_TIMEOUT] = { .type = NLA_U16 },
 	[NL80211_ATTR_BG_SCAN_PERIOD] = { .type = NLA_U16 },
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 	#if 0
 	[NL80211_ATTR_WDEV] = { .type = NLA_U64 },
 	[NL80211_ATTR_USER_REG_HINT_TYPE] = { .type = NLA_U32 },
@@ -4981,7 +4981,7 @@
 	err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys);
 	if (err)
 		kfree(connkeys);
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 	else if (info->attrs[NL80211_ATTR_SOCKET_OWNER]) {
 		printk("lemon %s sock_ow\n", __func__);
 		//dev->ieee80211_ptr->conn_owner_nlportid = info->snd_portid;
@@ -5277,7 +5277,7 @@
 		connect.ie = nla_data(info->attrs[NL80211_ATTR_IE]);
 		connect.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]);
 	}
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 	if (info->attrs[NL80211_ATTR_USE_MFP]) {
 		connect.mfp = nla_get_u32(info->attrs[NL80211_ATTR_USE_MFP]);
 		if (connect.mfp != NL80211_MFP_REQUIRED &&
@@ -5319,7 +5319,7 @@
 		       nla_data(info->attrs[NL80211_ATTR_HT_CAPABILITY]),
 		       sizeof(connect.ht_capa));
 	}
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 	if (nla_get_flag(info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT])) {
 		if (!info->attrs[NL80211_ATTR_SOCKET_OWNER]) {
 			kzfree(connkeys);
@@ -5335,7 +5335,7 @@
 	err = cfg80211_connect(rdev, dev, &connect, connkeys);
 	if (err)
 		kfree(connkeys);
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 	if (!err && info->attrs[NL80211_ATTR_SOCKET_OWNER]) {
 		//dev->ieee80211_ptr->conn_owner_nlportid = info->snd_portid;
 		dev->ieee80211_ptr->conn_owner_nlportid = info->snd_pid;
@@ -6447,7 +6447,7 @@
 
 	return 0;
 }
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 static inline int
 rdev_external_auth(struct cfg80211_registered_device *rdev,
 		   struct net_device *dev,
@@ -6909,7 +6909,7 @@
 		.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
 				  NL80211_FLAG_NEED_RTNL,
 	},
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 	{
 		.cmd = NL80211_CMD_EXTERNAL_AUTH,
 		//.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
@@ -8267,7 +8267,7 @@
 }
 EXPORT_SYMBOL(cfg80211_report_obss_beacon);
 
-#if defined(CONFIG_AIC8800)
+#if (defined CONFIG_AIC8800 || defined CONFIG_AIC8800D80L)
 int cfg80211_external_auth_request(struct net_device *dev,
 				   struct cfg80211_external_auth_params *params,
 				   gfp_t gfp)