From 824e475cd1e81a74529a50d1ed99b86e802a9de3 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Fri, 2 Dec 2016 15:01:06 -0800 Subject: [PATCH] wifi: Remove unused methods in IWifiRttController These are currently unused in the legacy HAL function table and there isn't any need for these to be migrated over to HIDL. Bug: 31991232 Test: Compiles Change-Id: I50611d1fd5a6ac276e7911ca1920c3d5ee2d5ba6 --- wifi/1.0/Android.mk | 152 ----------------------- wifi/1.0/IWifiRttController.hal | 65 ---------- wifi/1.0/default/hidl_struct_util.cpp | 12 -- wifi/1.0/default/hidl_struct_util.h | 2 - wifi/1.0/default/wifi_rtt_controller.cpp | 61 --------- wifi/1.0/default/wifi_rtt_controller.h | 15 --- wifi/1.0/types.hal | 46 ------- 7 files changed, 353 deletions(-) diff --git a/wifi/1.0/Android.mk b/wifi/1.0/Android.mk index 7f158d463b..254a15a750 100644 --- a/wifi/1.0/Android.mk +++ b/wifi/1.0/Android.mk @@ -1175,25 +1175,6 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) -# -# Build types.hal (RttChannelMap) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttChannelMap.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttChannelMap - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - # # Build types.hal (RttConfig) # @@ -1213,63 +1194,6 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) -# -# Build types.hal (RttDebugFormat) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttDebugFormat.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttDebugFormat - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - -# -# Build types.hal (RttDebugInfo) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttDebugInfo.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttDebugInfo - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - -# -# Build types.hal (RttDebugType) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttDebugType.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttDebugType - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - # # Build types.hal (RttLciInformation) # @@ -3736,25 +3660,6 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) -# -# Build types.hal (RttChannelMap) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttChannelMap.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttChannelMap - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - # # Build types.hal (RttConfig) # @@ -3774,63 +3679,6 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) -# -# Build types.hal (RttDebugFormat) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttDebugFormat.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttDebugFormat - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - -# -# Build types.hal (RttDebugInfo) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttDebugInfo.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttDebugInfo - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - -# -# Build types.hal (RttDebugType) -# -GEN := $(intermediates)/android/hardware/wifi/1.0/RttDebugType.java -$(GEN): $(HIDL) -$(GEN): PRIVATE_HIDL := $(HIDL) -$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal -$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) -$(GEN): PRIVATE_CUSTOM_TOOL = \ - $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \ - -Ljava \ - -randroid.hardware:hardware/interfaces \ - -randroid.hidl:system/libhidl/transport \ - android.hardware.wifi@1.0::types.RttDebugType - -$(GEN): $(LOCAL_PATH)/types.hal - $(transform-generated-source) -LOCAL_GENERATED_SOURCES += $(GEN) - # # Build types.hal (RttLciInformation) # diff --git a/wifi/1.0/IWifiRttController.hal b/wifi/1.0/IWifiRttController.hal index 93b3d92561..2f81176573 100644 --- a/wifi/1.0/IWifiRttController.hal +++ b/wifi/1.0/IWifiRttController.hal @@ -82,45 +82,6 @@ interface IWifiRttController { rangeCancel(CommandId cmdId, vec addrs) generates (WifiStatus status); - /** - * API to start publishing the channel map on responder device in an NBD - * cluster. - * Responder device must take this request and schedule broadcasting the - * channel map in a NBD ranging attribute in a Service Discovery Frame. - * DE must automatically remove the ranging attribute from the OTA queue - * after number of Discovery Window specified by numDw where each - * Discovery Window is 512 TUs apart. - * - * @param cmdId command Id to use for this invocation. - * @param params Instance of |RttChannelMap|. - * @return status WifiStatus of the operation. - * Possible status codes: - * |WifiStatusCode.SUCCESS|, - * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|, - * |WifiStatusCode.ERROR_INVALID_ARGS|, - * |WifiStatusCode.ERROR_NOT_AVAILABLE|, - * |WifiStatusCode.ERROR_UNKNOWN| - */ - setChannelMap(CommandId cmdId, RttChannelMap params, uint32_t numDw) - generates (WifiStatus status); - - /** - * API to clear the channel map on the responder device in an NBD cluster. - * Responder device must cancel future ranging channel request, starting from - * next Discovery Window interval and must also stop broadcasting NBD - * ranging attribute in Service Discovery Frame. - * - * @param cmdId command Id corresponding to the original request. - * @return status WifiStatus of the operation. - * Possible status codes: - * |WifiStatusCode.SUCCESS|, - * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|, - * |WifiStatusCode.ERROR_INVALID_ARGS|, - * |WifiStatusCode.ERROR_NOT_AVAILABLE|, - * |WifiStatusCode.ERROR_UNKNOWN| - */ - clearChannelMap(CommandId cmdId) generates (WifiStatus status); - /** * RTT capabilities of the device. * @@ -133,32 +94,6 @@ interface IWifiRttController { */ getCapabilities() generates (WifiStatus status, RttCapabilities capabilities); - /** - * Set configuration for debug. - * - * @param type debug level to be set. - * @return status WifiStatus of the operation. - * Possible status codes: - * |WifiStatusCode.SUCCESS|, - * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|, - * |WifiStatusCode.ERROR_INVALID_ARGS|, - * |WifiStatusCode.ERROR_NOT_AVAILABLE|, - * |WifiStatusCode.ERROR_UNKNOWN| - */ - setDebugCfg(RttDebugType Type) generates (WifiStatus status); - - /** - * Get the debug information. - * - * @return status WifiStatus of the operation. - * Possible status codes: - * |WifiStatusCode.ERROR_WIFI_RTT_CONTROLLER_INVALID|, - * |WifiStatusCode.ERROR_NOT_AVAILABLE|, - * |WifiStatusCode.ERROR_UNKNOWN| - * @return info Instance of |RttDebugInfo|. - */ - getDebugInfo() generates (WifiStatus status, RttDebugInfo info); - /** * API to configure the LCI(Location civic information). * Used in RTT Responder mode only. diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp index 1d4ff7927c..c33939d885 100644 --- a/wifi/1.0/default/hidl_struct_util.cpp +++ b/wifi/1.0/default/hidl_struct_util.cpp @@ -1155,18 +1155,6 @@ bool convertHidlRttConfigToLegacy(const RttConfig& hidl_config, return true; } -bool convertHidlRttChannelMapToLegacy( - const RttChannelMap& hidl_map, legacy_hal::wifi_channel_map* legacy_map) { - if (!legacy_map) { - return false; - } - CHECK(hidl_map.availablity.size() == sizeof(legacy_map->availablity)); - memcpy(legacy_map->availablity, - hidl_map.availablity.data(), - hidl_map.availablity.size()); - return true; -} - bool convertHidlRttLciInformationToLegacy( const RttLciInformation& hidl_info, legacy_hal::wifi_lci_information* legacy_info) { diff --git a/wifi/1.0/default/hidl_struct_util.h b/wifi/1.0/default/hidl_struct_util.h index 1e5a9ff252..af45029c26 100644 --- a/wifi/1.0/default/hidl_struct_util.h +++ b/wifi/1.0/default/hidl_struct_util.h @@ -147,8 +147,6 @@ bool convertLegacyNanTransmitFollowupIndToHidl( // RTT controller conversion methods. bool convertHidlRttConfigToLegacy(const RttConfig& hidl_config, legacy_hal::wifi_rtt_config* legacy_config); -bool convertHidlRttChannelMapToLegacy(const RttChannelMap& hidl_map, - legacy_hal::wifi_channel_map* legacy_map); bool convertHidlRttLciInformationToLegacy( const RttLciInformation& hidl_info, legacy_hal::wifi_lci_information* legacy_info); diff --git a/wifi/1.0/default/wifi_rtt_controller.cpp b/wifi/1.0/default/wifi_rtt_controller.cpp index 6ac06292e9..ac8ac95f46 100644 --- a/wifi/1.0/default/wifi_rtt_controller.cpp +++ b/wifi/1.0/default/wifi_rtt_controller.cpp @@ -83,28 +83,6 @@ Return WifiRttController::rangeCancel( addrs); } -Return WifiRttController::setChannelMap(uint32_t cmd_id, - const RttChannelMap& params, - uint32_t num_dw, - setChannelMap_cb hidl_status_cb) { - return validateAndCall(this, - WifiStatusCode::ERROR_WIFI_RTT_CONTROLLER_INVALID, - &WifiRttController::setChannelMapInternal, - hidl_status_cb, - cmd_id, - params, - num_dw); -} - -Return WifiRttController::clearChannelMap( - uint32_t cmd_id, clearChannelMap_cb hidl_status_cb) { - return validateAndCall(this, - WifiStatusCode::ERROR_WIFI_RTT_CONTROLLER_INVALID, - &WifiRttController::clearChannelMapInternal, - hidl_status_cb, - cmd_id); -} - Return WifiRttController::getCapabilities( getCapabilities_cb hidl_status_cb) { return validateAndCall(this, @@ -113,22 +91,6 @@ Return WifiRttController::getCapabilities( hidl_status_cb); } -Return WifiRttController::setDebugCfg(RttDebugType type, - setDebugCfg_cb hidl_status_cb) { - return validateAndCall(this, - WifiStatusCode::ERROR_WIFI_RTT_CONTROLLER_INVALID, - &WifiRttController::setDebugCfgInternal, - hidl_status_cb, - type); -} - -Return WifiRttController::getDebugInfo(getDebugInfo_cb hidl_status_cb) { - return validateAndCall(this, - WifiStatusCode::ERROR_WIFI_RTT_CONTROLLER_INVALID, - &WifiRttController::getDebugInfoInternal, - hidl_status_cb); -} - Return WifiRttController::setLci(uint32_t cmd_id, const RttLciInformation& lci, setLci_cb hidl_status_cb) { @@ -209,35 +171,12 @@ WifiStatus WifiRttController::rangeCancelInternal( return createWifiStatus(WifiStatusCode::SUCCESS); } -WifiStatus WifiRttController::setChannelMapInternal( - uint32_t /* cmd_id */, - const RttChannelMap& /* params */, - uint32_t /* num_dw */) { - // TODO implement - return createWifiStatus(WifiStatusCode::SUCCESS); -} - -WifiStatus WifiRttController::clearChannelMapInternal(uint32_t /* cmd_id */) { - // TODO implement - return createWifiStatus(WifiStatusCode::SUCCESS); -} - std::pair WifiRttController::getCapabilitiesInternal() { // TODO implement return {createWifiStatus(WifiStatusCode::SUCCESS), {}}; } -WifiStatus WifiRttController::setDebugCfgInternal(RttDebugType /* type */) { - // TODO implement - return createWifiStatus(WifiStatusCode::SUCCESS); -} - -std::pair WifiRttController::getDebugInfoInternal() { - // TODO implement - return {createWifiStatus(WifiStatusCode::SUCCESS), {}}; -} - WifiStatus WifiRttController::setLciInternal( uint32_t /* cmd_id */, const RttLciInformation& /* lci */) { // TODO implement diff --git a/wifi/1.0/default/wifi_rtt_controller.h b/wifi/1.0/default/wifi_rtt_controller.h index 3dd5340fcf..b51ac4abf9 100644 --- a/wifi/1.0/default/wifi_rtt_controller.h +++ b/wifi/1.0/default/wifi_rtt_controller.h @@ -52,16 +52,7 @@ class WifiRttController : public IWifiRttController { Return rangeCancel(uint32_t cmd_id, const hidl_vec>& addrs, rangeCancel_cb hidl_status_cb) override; - Return setChannelMap(uint32_t cmd_id, - const RttChannelMap& params, - uint32_t num_dw, - setChannelMap_cb hidl_status_cb) override; - Return clearChannelMap(uint32_t cmd_id, - clearChannelMap_cb hidl_status_cb) override; Return getCapabilities(getCapabilities_cb hidl_status_cb) override; - Return setDebugCfg(RttDebugType type, - setDebugCfg_cb hidl_status_cb) override; - Return getDebugInfo(getDebugInfo_cb hidl_status_cb) override; Return setLci(uint32_t cmd_id, const RttLciInformation& lci, setLci_cb hidl_status_cb) override; @@ -86,13 +77,7 @@ class WifiRttController : public IWifiRttController { const std::vector& rtt_configs); WifiStatus rangeCancelInternal( uint32_t cmd_id, const std::vector>& addrs); - WifiStatus setChannelMapInternal(uint32_t cmd_id, - const RttChannelMap& params, - uint32_t num_dw); - WifiStatus clearChannelMapInternal(uint32_t cmd_id); std::pair getCapabilitiesInternal(); - WifiStatus setDebugCfgInternal(RttDebugType type); - std::pair getDebugInfoInternal(); WifiStatus setLciInternal(uint32_t cmd_id, const RttLciInformation& lci); WifiStatus setLcrInternal(uint32_t cmd_id, const RttLcrInformation& lcr); std::pair getResponderInfoInternal(); diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal index 5d19524e5a..8dd33b5a09 100644 --- a/wifi/1.0/types.hal +++ b/wifi/1.0/types.hal @@ -2182,13 +2182,6 @@ struct RttResult { WifiInformationElement lcr; }; -/** - * NBD ranging channel map. - */ -struct RttChannelMap { - WifiChannelInMhz[32] availablity; -}; - /** * RTT Capabilities. */ @@ -2230,45 +2223,6 @@ struct RttCapabilities { uint8_t mcVersion; }; -/** - * Debugging definitions. - */ -enum RttDebugType : uint32_t { - DISABLE, - LOG, - PROTO, - BURST, - ACCURACY, - LOGDETAIL, -}; - -enum RttDebugFormat : uint32_t { - TXT, - BINARY, -}; - -/** - * Debug info. - */ -struct RttDebugInfo { - /** - * Version info. - */ - uint32_t version; - /** - * Debug data type. - */ - RttDebugType type; - /** - * Debug data format. - */ - RttDebugFormat format; - /** - * Debug data content. - */ - vec data; -}; - /** * Structs for setting LCI/LCR information to be provided to a requestor. */