BugID:23044555: dh5021a supports uND.
@@ -147,6 +147,26 @@ static int wlan_send_80211_raw_frame(hal_wifi_module_t *m, uint8_t *buf, int len
return 0;
}
+static int get_wireless_info(hal_wifi_module_t *m, void *wireless_info)
+{
+ hal_wireless_info_t *info = (hal_wireless_info_t *)wireless_info;
+ signed char rssi;
+
+ LOGD("get wireless info\r\n");
+
+ if (info == NULL)
+ return -1;
+
+ if (csi_wifi_connection_get_rssi(&rssi) < 0) {
+ return -1;
+ }
+ if (rssi > 0)
+ rssi -= 128;
+ info->rssi = rssi;
+
+ return 0;
+}
+
hal_wifi_module_t hobbit_wifi_esp8266 = {
.base.name = "csky_hobbit_wifi",
.init = wifi_init,
@@ -167,6 +187,8 @@ hal_wifi_module_t hobbit_wifi_esp8266 = {
.stop_monitor = stop_monitor,
.register_monitor_cb = register_monitor_cb,
.register_wlan_mgnt_monitor_cb = register_wlan_mgnt_monitor_cb,
- .wlan_send_80211_raw_frame = wlan_send_80211_raw_frame
+ .wlan_send_80211_raw_frame = wlan_send_80211_raw_frame,
+
+ .get_wireless_info = get_wireless_info,
};
