diff options
Diffstat (limited to 'wcn6740/qcwcn/wifi_hal/wifi_hal.cpp')
-rw-r--r-- | wcn6740/qcwcn/wifi_hal/wifi_hal.cpp | 51 |
1 files changed, 36 insertions, 15 deletions
diff --git a/wcn6740/qcwcn/wifi_hal/wifi_hal.cpp b/wcn6740/qcwcn/wifi_hal/wifi_hal.cpp index f31c641..4e0d0da 100644 --- a/wcn6740/qcwcn/wifi_hal/wifi_hal.cpp +++ b/wcn6740/qcwcn/wifi_hal/wifi_hal.cpp @@ -144,7 +144,7 @@ wifi_error wifi_get_wake_reason_stats(wifi_interface_handle iface, static int wifi_is_nan_ext_cmd_supported(wifi_interface_handle handle); wifi_error - wifi_init_tcp_param_change_event_handler(wifi_interface_handle iface); + wifi_init_tcp_param_change_event_handler(wifi_interface_handle iface); /* Initialize/Cleanup */ @@ -1117,7 +1117,7 @@ static int wifi_get_iface_id(hal_info *info, const char *iface) wifi_error wifi_initialize(wifi_handle *handle) { - wifi_error ret = WIFI_SUCCESS; + wifi_error ret = WIFI_ERROR_UNKNOWN; wifi_interface_handle iface_handle; struct nl_sock *cmd_sock = NULL; struct nl_sock *event_sock = NULL; @@ -1292,6 +1292,7 @@ wifi_error wifi_initialize(wifi_handle *handle) free(info->interfaces[i]); } ALOGE("%s no iface with wlan0", __func__); + ret = WIFI_ERROR_UNKNOWN; goto unload; } iface_handle = (wifi_interface_handle)info->interfaces[index]; @@ -1448,7 +1449,7 @@ unload: cleanupGscanHandlers(info); cleanupRSSIMonitorHandler(info); cleanupRadioHandler(info); - cleanupTCPParamCommand(info); + cleanupTCPParamCommand(info); free(info->event_cb); if (info->driver_supported_features.flags) { free(info->driver_supported_features.flags); @@ -2523,8 +2524,10 @@ wifi_error wifi_get_concurrency_matrix(wifi_interface_handle handle, /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } ret = vCommand->put_u32( QCA_WLAN_VENDOR_ATTR_GET_CONCURRENCY_MATRIX_CONFIG_PARAM_SET_SIZE_MAX, @@ -2578,8 +2581,10 @@ wifi_error wifi_set_nodfs_flag(wifi_interface_handle handle, u32 nodfs) /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } /* Add the fixed part of the mac_oui to the nl command */ ret = vCommand->put_u32(QCA_WLAN_VENDOR_ATTR_SET_NO_DFS_FLAG, nodfs); @@ -2626,8 +2631,10 @@ wifi_error wifi_start_sending_offloaded_packet(wifi_request_id id, /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } ret = vCommand->put_u32( QCA_WLAN_VENDOR_ATTR_OFFLOADED_PACKETS_SENDING_CONTROL, @@ -2699,8 +2706,10 @@ wifi_error wifi_stop_sending_offloaded_packet(wifi_request_id id, /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } ret = vCommand->put_u32( QCA_WLAN_VENDOR_ATTR_OFFLOADED_PACKETS_SENDING_CONTROL, @@ -2755,8 +2764,10 @@ static wifi_error wifi_set_packet_filter(wifi_interface_handle iface, /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } ret = vCommand->put_u32(QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_SUB_CMD, QCA_WLAN_SET_PACKET_FILTER); @@ -2845,8 +2856,10 @@ static wifi_error wifi_get_packet_filter_capabilities( /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } ret = vCommand->put_u32(QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_SUB_CMD, QCA_WLAN_GET_PACKET_FILTER); @@ -2897,8 +2910,10 @@ static wifi_error wifi_configure_nd_offload(wifi_interface_handle iface, /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } ret = vCommand->put_u8(QCA_WLAN_VENDOR_ATTR_ND_OFFLOAD_FLAG, enable); if (ret != WIFI_SUCCESS) @@ -2966,8 +2981,10 @@ wifi_error wifi_write_packet_filter(wifi_interface_handle iface, /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } ret = vCommand->put_u32(QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_SUB_CMD, QCA_WLAN_WRITE_PACKET_FILTER); @@ -3005,7 +3022,7 @@ wifi_error wifi_write_packet_filter(wifi_interface_handle iface, vCommand->attr_end(nlData); ret = vCommand->requestResponse(); - if (ret != WIFI_SUCCESS) { + if (ret != WIFI_SUCCESS) { ALOGE("%s: requestResponse Error:%d",__func__, ret); goto cleanup; } @@ -3044,8 +3061,10 @@ wifi_error wifi_enable_packet_filter(wifi_interface_handle handle, } /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } subcmd = enable ? QCA_WLAN_ENABLE_PACKET_FILTER : QCA_WLAN_DISABLE_PACKET_FILTER; @@ -3091,7 +3110,7 @@ cleanup: static wifi_error wifi_read_packet_filter(wifi_interface_handle handle, u32 src_offset, u8 *host_dst, u32 length) { - wifi_error ret = WIFI_SUCCESS; + wifi_error ret = WIFI_ERROR_UNKNOWN; struct nlattr *nlData; WifihalGeneric *vCommand = NULL; interface_info *ifaceInfo = getIfaceInfo(handle); @@ -3346,8 +3365,10 @@ wifi_error wifi_get_radar_history(wifi_interface_handle handle, /* Add the vendor specific attributes for the NL command. */ nlData = vCommand->attr_start(NL80211_ATTR_VENDOR_DATA); - if (!nlData) + if (!nlData){ + ret = WIFI_ERROR_UNKNOWN; goto cleanup; + } vCommand->attr_end(nlData); |