From 17743898c42729e6c8a1a21de5625503065bea17 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Wed, 13 Jun 2018 08:45:18 -0700 Subject: [PATCH] qcacld-3.0: Use mac_handle_t in wlan_hdd_scan Change "qcacld-3.0: Introduce mac_handle_t" introduced a modern name for what was previously called the tHalHandle. Transition wlan_hdd_scan to use the new naming. In the case of scheduled scan remove unnecessary testing of the handle since the scan component will validate the actual vdev. Change-Id: I68d2be133bd6d18c97ad5211b0d6f95f4ad28652 CRs-Fixed: 2264397 --- core/hdd/src/wlan_hdd_scan.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 9a6c693ae9..811a394c85 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -481,7 +481,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, TRACE_CODE_HDD_CFG80211_SCAN, adapter->session_id, request->n_channels)); - if (!sme_is_session_id_valid(hdd_ctx->hHal, adapter->session_id)) + if (!sme_is_session_id_valid(hdd_ctx->mac_handle, adapter->session_id)) return -EINVAL; if ((eConnectionState_Associated == @@ -1243,8 +1243,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx; - tHalHandle hHal; - int ret = 0; + int ret; hdd_enter(); @@ -1265,12 +1264,11 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, hdd_ctx = WLAN_HDD_GET_CTX(adapter); ret = wlan_hdd_validate_context(hdd_ctx); - - if (0 != ret) + if (ret) return ret; if (!hdd_ctx->config->PnoOffload) { - hdd_debug("PnoOffloadis not enabled!!!"); + hdd_debug("PnoOffload is not enabled!!!"); return -EINVAL; } @@ -1282,15 +1280,6 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, return -EBUSY; } - if (!sme_is_session_id_valid(hdd_ctx->hHal, adapter->session_id)) - return -EINVAL; - - hHal = WLAN_HDD_GET_HAL_CTX(adapter); - if (NULL == hHal) { - hdd_err("HAL context is Null!!!"); - return -EINVAL; - } - return wlan_cfg80211_sched_scan_start(hdd_ctx->hdd_pdev, dev, request, hdd_ctx->config->scan_backoff_multiplier); } @@ -1321,7 +1310,6 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev) { struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); struct hdd_context *hdd_ctx; - tHalHandle hHal; hdd_enter_dev(dev); @@ -1341,13 +1329,7 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev) return -EINVAL; } if (!hdd_ctx->config->PnoOffload) { - hdd_debug("PnoOffloadis not enabled!!!"); - return -EINVAL; - } - - hHal = WLAN_HDD_GET_HAL_CTX(adapter); - if (NULL == hHal) { - hdd_err(" HAL context is Null!!!"); + hdd_debug("PnoOffload is not enabled!!!"); return -EINVAL; }