From 668ec47f31c7af3e063149d147b916d9baed296c Mon Sep 17 00:00:00 2001
From: yogeshgprasad <33669126+yogeshgprasad@users.noreply.github.com>
Date: Tue, 14 Nov 2017 15:29:41 -0600
Subject: [PATCH 1/2] enable `set_wiphy_netns` cmd to support namespace

Set WIPHY_FLAG_NETNS_OK in struct wiphy->flags to enable `set_wiphy_netns` command to support network namespace
---
 os/linux/cfg80211.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/os/linux/cfg80211.c b/os/linux/cfg80211.c
index 70d4cb5b..5854e2ec 100644
--- a/os/linux/cfg80211.c
+++ b/os/linux/cfg80211.c
@@ -2051,6 +2051,9 @@ static struct wireless_dev *CFG80211_WdevAlloc(
 	pWdev->wiphy->n_cipher_suites = ARRAY_SIZE(CipherSuites);
 #endif /* LINUX_VERSION_CODE */
 
+	/* @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this wiphy at all */
+        pWdev->wiphy->flags |=WIPHY_FLAG_NETNS_OK;
+	
 	if (wiphy_register(pWdev->wiphy) < 0)
 	{
 		DBGPRINT(RT_DEBUG_ERROR, ("80211> Register wiphy device fail!\n"));

From b18c81d8fb7e962ed7da6cda5fa1410b7bccac21 Mon Sep 17 00:00:00 2001
From: yogeshgprasad <33669126+yogeshgprasad@users.noreply.github.com>
Date: Wed, 3 Jan 2018 13:02:00 -0600
Subject: [PATCH 2/2] Fix signal strength reported by `iw dev ra0 scan`.

`$ iw dev ra0 scan` was reporting `signal: 0.-51 dBm` instead of `signal: -51 dBm`. It is fixed in this commit.
---
 os/linux/cfg80211drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os/linux/cfg80211drv.c b/os/linux/cfg80211drv.c
index afe95d57..8599f205 100644
--- a/os/linux/cfg80211drv.c
+++ b/os/linux/cfg80211drv.c
@@ -1206,7 +1206,7 @@ VOID CFG80211_Scaning(
 						ChanId,
 						pFrame,
 						FrameLen,
-						RSSI,
+						RSSI*100,
 						FlgIsNMode,
 						BW);
 #endif /* CONFIG_STA_SUPPORT */