From: Seongil Hahm Date: Thu, 7 Sep 2017 17:08:18 +0000 (-0700) Subject: Modify scan API of Wi-Fi Manager to get channel and phy type of scanned APs X-Git-Tag: 1.1_Public_Release~235^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b710c66332aa2acb1b346fb40f60a3fb0570d48;p=rtos%2Ftinyara.git Modify scan API of Wi-Fi Manager to get channel and phy type of scanned APs This modification enables us to have channel and phy type of scanned APs after scanning. --- diff --git a/framework/include/wifi_manager/wifi_manager.h b/framework/include/wifi_manager/wifi_manager.h index b791dc7..3e89a66 100644 --- a/framework/include/wifi_manager/wifi_manager.h +++ b/framework/include/wifi_manager/wifi_manager.h @@ -64,6 +64,8 @@ struct wifi_manager_scan_info_s { char ssid[33]; // 802.11 spec defined unspecified or uint8 char bssid[18]; // char string e.g. xx:xx:xx:xx:xx:xx int8_t rssi; // received signal strength indication + uint8_t channel; // channel/frequency + uint8_t phy_mode; // 0:legacy 1: 11N HT struct wifi_manager_scan_info_s *next; }; diff --git a/framework/src/wifi_manager/wifi_manager.c b/framework/src/wifi_manager/wifi_manager.c index 4a050fa..80cf588 100644 --- a/framework/src/wifi_manager/wifi_manager.c +++ b/framework/src/wifi_manager/wifi_manager.c @@ -256,6 +256,8 @@ static wifi_manager_result_e wifi_fetch_scan_results(slsi_scan_info_t **wifi_sca memset(curr_record->ssid, 0x00, SLSI_SSID_LEN + 1); memset(curr_record->bssid, 0x00, SLSI_MACADDR_STR_LEN); curr_record->rssi = wifi_scan_iter->rssi; + curr_record->channel = wifi_scan_iter->channel; + curr_record->phy_mode = wifi_scan_iter->phy_mode; strncpy(curr_record->ssid, (char *)wifi_scan_iter->ssid, strlen((const char *)wifi_scan_iter->ssid)); strncpy(curr_record->bssid, (char *)wifi_scan_iter->bssid, strlen((const char *)wifi_scan_iter->bssid)); prev_record = curr_record;