Wifi-HAL: Remove gscan APIs route to LOWI

gscan APIs are no longer supported by LOWI. So do not route any
gscan APIs to LOWI.

Change-Id: I8f68a6c956dd264d68125a5f55e4a155d33e2ebe
CRs-Fixed: 2087798
diff --git a/qcwcn/wifi_hal/gscan.cpp b/qcwcn/wifi_hal/gscan.cpp
index b55e629..04193a2 100644
--- a/qcwcn/wifi_hal/gscan.cpp
+++ b/qcwcn/wifi_hal/gscan.cpp
@@ -97,20 +97,6 @@
     struct nlattr *nlData;
     interface_info *ifaceInfo = getIfaceInfo(handle);
     wifi_handle wifiHandle = getWifiHandle(handle);
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
-
-    /* Route GSCAN request through LOWI if supported */
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->get_valid_channels == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->get_valid_channels(handle, band, max_channels,
-                          channels, num_channels);
-        ALOGV("%s: lowi get_valid_channels "
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
 
     /* No request id from caller, so generate one and pass it on to the driver.
      * Generate one randomly.
@@ -184,7 +170,6 @@
     wifi_error ret = WIFI_SUCCESS;
     wifi_handle wifiHandle = getWifiHandle(handle);
     hal_info *info = getHalInfo(wifiHandle);
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
 
     if (!(info->supported_feature_set & WIFI_FEATURE_GSCAN)) {
         ALOGE("%s: GSCAN is not supported by driver", __FUNCTION__);
@@ -196,17 +181,6 @@
         return WIFI_ERROR_INVALID_ARGS;
     }
 
-    /* Route GSCAN request through LOWI if supported */
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->get_gscan_capabilities == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->get_gscan_capabilities(handle, capabilities);
-        ALOGV("%s: lowi get_gscan_capabilities returned: %d. Exit.", __FUNCTION__, ret);
-        return ret;
-    }
-
     memcpy(capabilities, &info->capa.gscan_capa, sizeof(wifi_gscan_capabilities));
 
     return ret;
@@ -227,7 +201,6 @@
     wifi_scan_bucket_spec bucketSpec;
     struct nlattr *nlBuckectSpecList;
     hal_info *info = getHalInfo(wifiHandle);
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
     gscan_event_handlers* event_handlers;
     GScanCommandEventHandler *gScanStartCmdEventHandler;
 
@@ -240,18 +213,6 @@
         return WIFI_ERROR_NOT_SUPPORTED;
     }
 
-    /* Route GSCAN request through LOWI if supported */
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->start_gscan  == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->start_gscan(id, iface, params, handler);
-        ALOGV("%s: lowi start_gscan "
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
-
     ALOGV("%s: RequestId:%d ", __FUNCTION__, id);
     /* Wi-Fi HAL doesn't need to check if a similar request to start gscan was
      *  made earlier. If start_gscan() is called while another gscan is already
@@ -445,7 +406,6 @@
     int ret = 0;
     GScanCommand *gScanCommand;
     struct nlattr *nlData;
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
 
     interface_info *ifaceInfo = getIfaceInfo(iface);
     wifi_handle wifiHandle = getWifiHandle(iface);
@@ -463,18 +423,6 @@
     }
     return (wifi_error)ret;
 
-    /* Route GSCAN request through LOWI if supported */
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->stop_gscan == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->stop_gscan(id, iface);
-        ALOGV("%s: lowi stop_gscan "
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
-
     if (gScanStartCmdEventHandler == NULL ||
         gScanStartCmdEventHandler->isEventHandlingEnabled() == false) {
         ALOGE("%s: GSCAN isn't running or already stopped. "
@@ -542,7 +490,6 @@
     interface_info *ifaceInfo = getIfaceInfo(iface);
     wifi_handle wifiHandle = getWifiHandle(iface);
     hal_info *info = getHalInfo(wifiHandle);
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
     gscan_event_handlers* event_handlers;
     GScanCommandEventHandler *gScanSetBssidHotlistCmdEventHandler;
 
@@ -556,18 +503,6 @@
         return WIFI_ERROR_NOT_SUPPORTED;
     }
 
-    /* Route request through LOWI if supported*/
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->set_bssid_hotlist == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->set_bssid_hotlist(id, iface, params,handler);
-        ALOGV("%s: lowi set_bssid_hotlist "
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
-
     /* Wi-Fi HAL doesn't need to check if a similar request to set bssid
      * hotlist was made earlier. If set_bssid_hotlist() is called while
      * another one is running, the request will be sent down to driver and
@@ -715,7 +650,6 @@
     interface_info *ifaceInfo = getIfaceInfo(iface);
     wifi_handle wifiHandle = getWifiHandle(iface);
     hal_info *info = getHalInfo(wifiHandle);
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
     gscan_event_handlers* event_handlers;
     GScanCommandEventHandler *gScanSetBssidHotlistCmdEventHandler;
 
@@ -729,19 +663,6 @@
         return WIFI_ERROR_NOT_SUPPORTED;
     }
 
-    /* Route request through LOWI if supported*/
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->reset_bssid_hotlist == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->reset_bssid_hotlist(id, iface);
-        ALOGV("%s: lowi reset_bssid_hotlist "
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
-
-
     if (gScanSetBssidHotlistCmdEventHandler == NULL ||
         (gScanSetBssidHotlistCmdEventHandler->isEventHandlingEnabled() ==
          false)) {
@@ -810,7 +731,6 @@
     interface_info *ifaceInfo = getIfaceInfo(iface);
     wifi_handle wifiHandle = getWifiHandle(iface);
     hal_info *info = getHalInfo(wifiHandle);
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
     gscan_event_handlers* event_handlers;
     GScanCommandEventHandler *gScanSetSignificantChangeCmdEventHandler;
 
@@ -824,21 +744,6 @@
         return WIFI_ERROR_NOT_SUPPORTED;
     }
 
-    /* Route request through LOWI if supported*/
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->set_significant_change_handler == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->set_significant_change_handler(id,
-                                                             iface,
-                                                             params,
-                                                             handler);
-        ALOGV("%s: lowi set_significant_change_handler "
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
-
     /* Wi-Fi HAL doesn't need to check if a similar request to set significant
      * change list was made earlier. If set_significant_change() is called while
      * another one is running, the request will be sent down to driver and
@@ -998,7 +903,6 @@
     interface_info *ifaceInfo = getIfaceInfo(iface);
     wifi_handle wifiHandle = getWifiHandle(iface);
     hal_info *info = getHalInfo(wifiHandle);
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
     gscan_event_handlers* event_handlers;
     GScanCommandEventHandler *gScanSetSignificantChangeCmdEventHandler;
 
@@ -1012,18 +916,6 @@
         return WIFI_ERROR_NOT_SUPPORTED;
     }
 
-    /* Route request through LOWI if supported*/
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->reset_significant_change_handler == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->reset_significant_change_handler(id, iface);
-        ALOGV("%s: lowi reset_significant_change_handler "
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
-
     if (gScanSetSignificantChangeCmdEventHandler == NULL ||
         (gScanSetSignificantChangeCmdEventHandler->isEventHandlingEnabled() ==
         false)) {
@@ -1091,7 +983,6 @@
     int requestId, ret = 0, retRequestRsp = 0;
     GScanCommand *gScanCommand;
     struct nlattr *nlData;
-    lowi_cb_table_t *lowiWifiHalApi = NULL;
 
     interface_info *ifaceInfo = getIfaceInfo(iface);
     wifi_handle wifiHandle = getWifiHandle(iface);
@@ -1103,22 +994,6 @@
         return WIFI_ERROR_NOT_SUPPORTED;
     }
 
-    /* Route GSCAN request through LOWI if supported */
-    lowiWifiHalApi = getLowiCallbackTable(GSCAN_SUPPORTED);
-    if (lowiWifiHalApi == NULL ||
-        lowiWifiHalApi->get_cached_gscan_results == NULL) {
-        ALOGV("%s: Sending cmd directly to host", __FUNCTION__);
-    } else {
-        ret = lowiWifiHalApi->get_cached_gscan_results(iface,
-                                                       flush,
-                                                       max,
-                                                       results,
-                                                       num);
-        ALOGV("%s: lowi get_cached_gscan_results"
-            "returned: %d. Exit.", __FUNCTION__, ret);
-        return (wifi_error)ret;
-    }
-
     /* No request id from caller, so generate one and pass it on to the driver. */
     /* Generate it randomly */
     requestId = get_requestid();