mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Fix bad return status from __iw_get_bitrate()
There are currently several error paths in __iw_get_bitrate() which incorrectly return internal status enumerations instead of returning negative errno values. Fix these paths to correctly return negative errno values. Change-Id: I42254dbe1b362fb42b87418419b97ccbabfac355 CRs-Fixed: 2004190
This commit is contained in:
parent
8e9edc8f6b
commit
f25ac10144
1 changed files with 6 additions and 13 deletions
|
|
@ -3137,8 +3137,7 @@ static int __iw_get_bitrate(struct net_device *dev,
|
|||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
QDF_STATUS status;
|
||||
hdd_wext_state_t *pWextState;
|
||||
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
|
|
@ -3152,12 +3151,6 @@ static int __iw_get_bitrate(struct net_device *dev,
|
|||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
if (cds_is_driver_recovering()) {
|
||||
hdd_alert("Recovery in Progress. State: 0x%x Ignore!!!",
|
||||
cds_get_driver_state());
|
||||
return status;
|
||||
}
|
||||
|
||||
if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) {
|
||||
wrqu->bitrate.value = 0;
|
||||
} else {
|
||||
|
|
@ -3177,18 +3170,18 @@ static int __iw_get_bitrate(struct net_device *dev,
|
|||
|
||||
if (QDF_STATUS_SUCCESS != status) {
|
||||
hdd_err("Unable to retrieve statistics");
|
||||
return status;
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
|
||||
|
||||
qdf_status =
|
||||
status =
|
||||
qdf_wait_single_event(&pWextState->hdd_qdf_event,
|
||||
WLAN_WAIT_TIME_STATS);
|
||||
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("SME timeout while retrieving statistics");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
return qdf_status_to_os_return(status);
|
||||
}
|
||||
|
||||
wrqu->bitrate.value =
|
||||
|
|
@ -3197,7 +3190,7 @@ static int __iw_get_bitrate(struct net_device *dev,
|
|||
|
||||
EXIT();
|
||||
|
||||
return qdf_status;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue