diff -urN a/net/wireless/core.c b/net/wireless/core.c
--- a/net/wireless/core.c	2016-10-24 11:56:03.973531809 +0800
+++ b/net/wireless/core.c	2016-10-24 11:55:51.365532306 +0800
@@ -1066,7 +1066,11 @@
 		if (rdev->scan_req && rdev->scan_req->wdev == wdev) {
 			if (WARN_ON(!rdev->scan_req->notified))
 				rdev->scan_req->aborted = true;
-			___cfg80211_scan_done(rdev, false);
+#if 1 //rtk: client mode 2nd Association
+                        cfg80211_scan_done(rdev->scan_req, false);
+#else
+                        ___cfg80211_scan_done(rdev, false);
+#endif		
 		}
 
 		sched_scan_req = rtnl_dereference(rdev->sched_scan_req);
diff -urN a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
--- a/net/wireless/wext-compat.c	2016-10-24 11:54:42.065535036 +0800
+++ b/net/wireless/wext-compat.c	2016-10-24 11:55:29.053533185 +0800
@@ -85,6 +85,9 @@
 	case IW_MODE_REPEAT:
 		type = NL80211_IFTYPE_WDS;
 		break;
+        case IW_MODE_MASTER:
+                type = NL80211_IFTYPE_AP;
+                break;
 	case IW_MODE_MONITOR:
 		type = NL80211_IFTYPE_MONITOR;
 		break;
