#define IEEE80211_CAP_IBSS 0x0002
#define IEEE80211_CAP_PRIVACY 0x0010
+#if defined TIZEN_EXT
+#define COUNTRY_CODE_LENGTH 2
+#endif
+
#define BSS_UNKNOWN_STRENGTH -90
static DBusConnection *connection;
dbus_bool_t ft_ieee8021x;
GSList *vsie_list;
dbus_bool_t hs20;
+ unsigned char country_code[COUNTRY_CODE_LENGTH];
#endif
unsigned int wps_capabilities;
};
char *phase2;
unsigned int keymgmt;
GSList *vsie_list;
+ unsigned char country_code[COUNTRY_CODE_LENGTH];
#endif
};
return network->keymgmt;
}
+
+const unsigned char *g_supplicant_network_get_countrycode(GSupplicantNetwork
+ *network)
+{
+ if (!network)
+ return NULL;
+
+ return network->country_code;
+}
#endif
const unsigned char *g_supplicant_peer_get_widi_ies(GSupplicantPeer *peer,
}
network->isHS20AP = bss->hs20;
+ memcpy(network->country_code, bss->country_code, COUNTRY_CODE_LENGTH);
#endif
SUPPLICANT_DBG("New network %s created", network->name);
#define WPS_CONFIGURED 0x02
#if defined TIZEN_EXT
#define VENDOR_SPECIFIC_INFO 0xDD
+#define WLAN_EID_COUNTRY 7
#endif
dbus_message_iter_recurse(iter, &array);
bss->wps_capabilities = 0;
bss->keymgmt = 0;
+ memset(bss->country_code, 0, COUNTRY_CODE_LENGTH);
for (ie_end = ie + ie_len; ie < ie_end && ie + ie[1] + 1 <= ie_end;
ie += ie[1] + 2) {
SUPPLICANT_DBG("Failed to allocate memory");
continue;
}
+
+ if(ie[0] == WLAN_EID_COUNTRY && ie[1] >= 2) {
+ memcpy(bss->country_code, ie+2, COUNTRY_CODE_LENGTH);
+ continue;
+ }
#endif
if (ie[0] != WMM_WPA1_WPS_INFO || ie[1] < WPS_INFO_MIN_LEN ||
memcmp(ie+2, WPS_OUI, sizeof(WPS_OUI)) != 0)