From 9c1f0dc05385bd3cded8d13e65570b31abba4da5 Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Sun, 14 May 2017 16:23:35 -0700 Subject: [PATCH] qcacld-3.0: Fix the return type in __wlan_hdd_cfg80211_ll_stats_get Fix the return data type in __wlan_hdd_cfg80211_ll_stats_get from unsigned long to int type. Change-Id: Ia51056adbf09fe6a2cb0d33337b4d9107c4f146d CRs-Fixed: 2051378 --- core/hdd/src/wlan_hdd_stats.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 576b591956be..e05b1f369969 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -1437,14 +1437,13 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy, const void *data, int data_len) { - unsigned long rc; + int ret; hdd_context_t *pHddCtx = wiphy_priv(wiphy); struct nlattr *tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_GET_MAX + 1]; tSirLLStatsGetReq LinkLayerStatsGetReq; struct net_device *dev = wdev->netdev; hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); hdd_station_ctx_t *hddstactx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); - int status; /* ENTER() intentionally not used in a frequently invoked API */ @@ -1453,8 +1452,8 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy, return -EPERM; } - status = wlan_hdd_validate_context(pHddCtx); - if (0 != status) + ret = wlan_hdd_validate_context(pHddCtx); + if (0 != ret) return -EINVAL; if (!pAdapter->isLinkLayerStatsSet) { @@ -1464,7 +1463,7 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy, } if (hddstactx->hdd_ReassocScenario) { - hdd_err("Roaming in progress, so unable to proceed this request"); + hdd_err("Roaming in progress, cannot process the request"); return -EBUSY; } @@ -1499,11 +1498,11 @@ __wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy, return -EINVAL; } - rc = wlan_hdd_send_ll_stats_req(pHddCtx, &LinkLayerStatsGetReq); - if (!rc) { + ret = wlan_hdd_send_ll_stats_req(pHddCtx, &LinkLayerStatsGetReq); + if (0 != ret) { hdd_err("Failed to send LL stats request (id:%u)", LinkLayerStatsGetReq.reqId); - return rc; + return ret; } EXIT();