Add SAE security type for netlink scan. 20/262920/3 accepted/tizen/unified/20210915.025101 submit/tizen/20210908.150016 submit/tizen/20210909.045500
authorNiraj Kumar Goit <niraj.g@samsung.com>
Mon, 23 Aug 2021 15:26:26 +0000 (20:56 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Thu, 26 Aug 2021 15:28:36 +0000 (20:58 +0530)
Change-Id: I1f37d0fed1dfdbc8947f3ade2a2ed1faf32acd48
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
packaging/net-config.spec
src/wifi-netlink-scan.c

index 42263fc6fc3a4a0450be5746ccf32a398bc80ca2..817f96fa4b8a54871112c91bb4ae5d7d7aab26f5 100755 (executable)
@@ -1,7 +1,7 @@
 Name:          net-config
 Summary:       TIZEN Network Configuration service
 Version:       1.2.10
-Release:       2
+Release:       3
 Group:         System/Network
 License:       Apache-2.0
 Source0:       %{name}-%{version}.tar.gz
index efc55233cba1c56f01d1a25c71f52302f6f0b969..409534a32836e7c42a2b1b25a6b7495633d41cfb 100755 (executable)
@@ -253,7 +253,8 @@ typedef enum {
        WIFI_SECURITY_TYPE_WEP = 1,
        WIFI_SECURITY_TYPE_WPA_PSK = 2,
        WIFI_SECURITY_TYPE_WPA2_PSK = 3,
-       WIFI_SECURITY_TYPE_EAP = 4,
+       WIFI_SECURITY_TYPE_SAE = 4,
+       WIFI_SECURITY_TYPE_EAP = 5,
 } wifi_security_type_e;
 
 typedef enum {
@@ -274,6 +275,7 @@ static void __netconfig_get_security(unsigned char *bss_element, int length, wif
        uint8_t *t_data;
        int len;
        __u16 count;
+       gboolean ieee80211_psk = false;
 
        *sec_type = WIFI_SECURITY_TYPE_NONE;
        *enc_type = WIFI_ENCRYPTION_TYPE_NONE;
@@ -417,6 +419,10 @@ static void __netconfig_get_security(unsigned char *bss_element, int length, wif
                                                *sec_type = WIFI_SECURITY_TYPE_EAP;
                                        } else if (t_data[3] == 2 || t_data[3] == 4 || t_data[3] == 6) {  // 2 : PSK, 4 : FT/PSK, 6 : PSK/SHA-256
                                                *sec_type = WIFI_SECURITY_TYPE_WPA2_PSK;
+                                               ieee80211_psk = true;
+                                       } else if (t_data[3] == 8) { // Add SAE security type for netlink scan
+                                               if (ieee80211_psk != true)
+                                                       *sec_type = WIFI_SECURITY_TYPE_SAE;
                                        }
                                }
                        } //for