diff options
Diffstat (limited to 'qcwcn')
-rw-r--r-- | qcwcn/wifi_hal/rtt.cpp | 29 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wifi_hal.cpp | 2 | ||||
-rwxr-xr-x | qcwcn/wifi_hal/wifihal_internal.h | 14 | ||||
-rw-r--r-- | qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c | 14 |
4 files changed, 31 insertions, 28 deletions
diff --git a/qcwcn/wifi_hal/rtt.cpp b/qcwcn/wifi_hal/rtt.cpp index 9b4a369..d929c3a 100644 --- a/qcwcn/wifi_hal/rtt.cpp +++ b/qcwcn/wifi_hal/rtt.cpp @@ -301,17 +301,18 @@ cleanup: return (wifi_error)ret; } -/** - * Get available WiFi channel to enable RTT responder on. +/* + * Get RTT responder information e.g. WiFi channel to enable responder on. */ -wifi_error wifi_rtt_get_available_channel(wifi_interface_handle iface, - wifi_channel_info* channel) +wifi_error wifi_rtt_get_responder_info(wifi_interface_handle iface, + wifi_rtt_responder *responder_info) { int ret = WIFI_SUCCESS; lowi_cb_table_t *lowiWifiHalApi = NULL; - if (iface == NULL || channel == NULL) { - ALOGE("%s: iface : %p channel : %p", __FUNCTION__, iface, channel); + if (iface == NULL || responder_info == NULL) { + ALOGE("%s: iface : %p responder_info : %p", __FUNCTION__, iface, + responder_info); return WIFI_ERROR_INVALID_ARGS; } @@ -319,14 +320,14 @@ wifi_error wifi_rtt_get_available_channel(wifi_interface_handle iface, lowiWifiHalApi = getLowiCallbackTable( ONE_SIDED_RANGING_SUPPORTED|DUAL_SIDED_RANGING_SUPPORED); if (lowiWifiHalApi == NULL || - lowiWifiHalApi->rtt_get_available_channnel == NULL) { + lowiWifiHalApi->rtt_get_responder_info == NULL) { ALOGE("%s: getLowiCallbackTable returned NULL or " "the function pointer is NULL. Exit.", __FUNCTION__); ret = WIFI_ERROR_NOT_SUPPORTED; goto cleanup; } - ret = lowiWifiHalApi->rtt_get_available_channnel(iface, channel); + ret = lowiWifiHalApi->rtt_get_responder_info(iface, responder_info); if (ret != WIFI_SUCCESS) { ALOGE("%s: returned error:%d. Exit.", __FUNCTION__, ret); @@ -342,20 +343,20 @@ cleanup: * channel_hint - hint of the channel information where RTT responder should * be enabled on. * max_duration_seconds - timeout of responder mode. - * channel_used - channel used for RTT responder, NULL if responder is not - * enabled. + * responder_info - responder information e.g. channel used for RTT responder, + * NULL if responder is not enabled. */ wifi_error wifi_enable_responder(wifi_request_id id, wifi_interface_handle iface, wifi_channel_info channel_hint, unsigned max_duration_seconds, - wifi_channel_info* channel_used) + wifi_rtt_responder *responder_info) { int ret = WIFI_SUCCESS; lowi_cb_table_t *lowiWifiHalApi = NULL; - if (iface == NULL || channel_used == NULL) { - ALOGE("%s: iface : %p channel : %p", __FUNCTION__, iface, channel_used); + if (iface == NULL || responder_info == NULL) { + ALOGE("%s: iface : %p responder_info : %p", __FUNCTION__, iface, responder_info); return WIFI_ERROR_INVALID_ARGS; } @@ -372,7 +373,7 @@ wifi_error wifi_enable_responder(wifi_request_id id, ret = lowiWifiHalApi->enable_responder(id, iface, channel_hint, max_duration_seconds, - channel_used); + responder_info); if (ret != WIFI_SUCCESS) { ALOGE("%s: returned error:%d. Exit.", __FUNCTION__, ret); diff --git a/qcwcn/wifi_hal/wifi_hal.cpp b/qcwcn/wifi_hal/wifi_hal.cpp index 0221e73..3541d87 100644 --- a/qcwcn/wifi_hal/wifi_hal.cpp +++ b/qcwcn/wifi_hal/wifi_hal.cpp @@ -307,7 +307,7 @@ wifi_error init_wifi_vendor_hal_func_table(wifi_hal_fn *fn) { fn->wifi_rtt_range_request = wifi_rtt_range_request; fn->wifi_rtt_range_cancel = wifi_rtt_range_cancel; fn->wifi_get_rtt_capabilities = wifi_get_rtt_capabilities; - fn->wifi_rtt_get_available_channel = wifi_rtt_get_available_channel; + fn->wifi_rtt_get_responder_info = wifi_rtt_get_responder_info; fn->wifi_enable_responder = wifi_enable_responder; fn->wifi_disable_responder = wifi_disable_responder; fn->wifi_set_nodfs_flag = wifi_set_nodfs_flag; diff --git a/qcwcn/wifi_hal/wifihal_internal.h b/qcwcn/wifi_hal/wifihal_internal.h index 8c58f63..986b151 100755 --- a/qcwcn/wifi_hal/wifihal_internal.h +++ b/qcwcn/wifi_hal/wifihal_internal.h @@ -38,7 +38,7 @@ #define WIFIHAL_LOWI_MAJOR_VERSION 2 #define WIFIHAL_LOWI_MINOR_VERSION 1 -#define WIFIHAL_LOWI_MICRO_VERSION 0 +#define WIFIHAL_LOWI_MICRO_VERSION 1 /* LOWI supported capabilities bit masks */ #define ONE_SIDED_RANGING_SUPPORTED 0x00000001 @@ -129,24 +129,24 @@ typedef struct wifi_lcr_information *lcr); /** - * Get available WiFi channel to enable RTT responder on. + * Get RTT responder information e.g. WiFi channel to enable responder on. */ - wifi_error (*rtt_get_available_channnel)(wifi_interface_handle iface, - wifi_channel_info* channel); + wifi_error (*rtt_get_responder_info)(wifi_interface_handle iface, + wifi_rtt_responder *responder_info); /** * Enable RTT responder mode. * channel_hint - hint of the channel information where RTT responder should * be enabled on. * max_duration_seconds - timeout of responder mode. - * channel_used - channel used for RTT responder, NULL if responder is not - * enabled. + * responder_info - responder information e.g. channel used for RTT responder, + * NULL if responder is not enabled. */ wifi_error (*enable_responder)(wifi_request_id id, wifi_interface_handle iface, wifi_channel_info channel_hint, unsigned max_duration_seconds, - wifi_channel_info* channel_used); + wifi_rtt_responder *responder_info); /** * Disable RTT responder mode. diff --git a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c index f2f625d..a82b980 100644 --- a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -82,12 +82,7 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, android_wifi_priv_cmd priv_cmd; int ret = 0; - if (os_strcasecmp(cmd, "STOP") == 0) { - dl_list_for_each(driver, &drv->global->interfaces, struct wpa_driver_nl80211_data, list) { - linux_set_iface_flags(drv->global->ioctl_sock, driver->first_bss->ifname, 0); - wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STOPPED"); - } - } else if (os_strcasecmp(cmd, "START") == 0) { + if (os_strcasecmp(cmd, "START") == 0) { dl_list_for_each(driver, &drv->global->interfaces, struct wpa_driver_nl80211_data, list) { linux_set_iface_flags(drv->global->ioctl_sock, driver->first_bss->ifname, 1); wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STARTED"); @@ -131,6 +126,13 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, wpa_printf(MSG_DEBUG, "%s: P2P: %s ", __func__, buf); else if (os_strcasecmp(cmd, "P2P_SET_NOA") == 0) wpa_printf(MSG_DEBUG, "%s: P2P: %s ", __func__, buf); + else if (os_strcasecmp(cmd, "STOP") == 0) { + wpa_printf(MSG_DEBUG, "%s: %s ", __func__, buf); + dl_list_for_each(driver, &drv->global->interfaces, struct wpa_driver_nl80211_data, list) { + linux_set_iface_flags(drv->global->ioctl_sock, driver->first_bss->ifname, 0); + wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "STOPPED"); + } + } else wpa_printf(MSG_DEBUG, "%s %s len = %d, %lu", __func__, buf, ret, buf_len); wpa_driver_notify_country_change(drv->ctx, cmd); |