Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccb15627 authored by Etan Cohen's avatar Etan Cohen
Browse files

[AWARE] Remove support for vendor-specific attributes

Vendor-specific attribute support API is not fully functional or
thought out. The Tx portion is working but the Rx portion requires
additional configuration to prevent spamming the framework with all
vendor-specific attributes.

Remove until full solution is designed.

Bug: 35193235
Test: unit tests and integration (sl4a) tests.
Change-Id: I31a601af3b2c1f9f736130ce00abf73c55ac086a
parent f60aeb44
Loading
Loading
Loading
Loading
+0 −114
Original line number Diff line number Diff line
@@ -73,44 +73,6 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanBeaconSdfPayloadInd)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/NanBeaconSdfPayloadInd.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.NanBeaconSdfPayloadInd

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanBeaconSdfPayloadRequest)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/NanBeaconSdfPayloadRequest.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.NanBeaconSdfPayloadRequest

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanCapabilities)
#
@@ -586,25 +548,6 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanVsaRxFrameMask)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/NanVsaRxFrameMask.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.NanVsaRxFrameMask

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (RttBw)
#
@@ -1933,44 +1876,6 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanBeaconSdfPayloadInd)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/NanBeaconSdfPayloadInd.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.NanBeaconSdfPayloadInd

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanBeaconSdfPayloadRequest)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/NanBeaconSdfPayloadRequest.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.NanBeaconSdfPayloadRequest

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanCapabilities)
#
@@ -2446,25 +2351,6 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (NanVsaRxFrameMask)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/NanVsaRxFrameMask.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.NanVsaRxFrameMask

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (RttBw)
#
+0 −15
Original line number Diff line number Diff line
@@ -240,19 +240,4 @@ interface IWifiNanIface extends IWifiIface {
   */
  terminateDataPathRequest(CommandIdShort cmdId, uint32_t ndpInstanceId)
      generates (WifiStatus status);

  /**
   * Configure NAN Beacon or SDF payload to include vendor-specific payload.
   *
   * @param cmdId command Id to use for this invocation.
   * @param msg Instance of |NanBeaconSdfPayloadRequest|.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
   *         |WifiStatusCode.ERROR_INVALID_ARGS|,
   *         |WifiStatusCode.ERROR_UNKNOWN|
   */
  beaconSdfPayloadRequest(CommandIdShort cmdId, NanBeaconSdfPayloadRequest msg)
      generates (WifiStatus status);
};
+0 −19
Original line number Diff line number Diff line
@@ -194,18 +194,6 @@ interface IWifiNanIfaceEventCallback {
   */
  oneway notifyTerminateDataPathResponse(CommandIdShort id, WifiNanStatus status);

  /**
   * Callback invoked in response to a request to include vendor-specific payload in beacon or SDF
   * frames |beaconSdfPayloadRequest|.
   *
   * @param cmdId command Id corresponding to the original request.
   * @param status WifiNanStatus of the operation. Possible status codes are:
   *        |NanStatusType.SUCCESS|
   *        |NanStatusType.INVALID_ARGS|
   *        |NanStatusType.INTERNAL_FAILURE|
   */
  oneway notifyBeaconSdfPayloadResponse(CommandIdShort id, WifiNanStatus status);

  /**
   * Callbacks for the various asynchornous NAN Events.
   */
@@ -303,11 +291,4 @@ interface IWifiNanIfaceEventCallback {
   * @param ndpInstanceId: data-path ID of the terminated data-path.
   */
  oneway eventDataPathTerminated(uint32_t ndpInstanceId);

  /**
   * Asynchronous callback indicating vendor-specific payload received in NAN beacon or SDF frame.
   *
   * @param event: NanBeaconSdfPayloadInd containing event details.
   */
  oneway eventBeaconSdfPayload(NanBeaconSdfPayloadInd event);
};
+0 −44
Original line number Diff line number Diff line
@@ -1177,30 +1177,6 @@ bool convertHidlNanConfigRequestToLegacy(
  return true;
}

bool convertHidlNanBeaconSdfPayloadRequestToLegacy(
    const NanBeaconSdfPayloadRequest& hidl_request,
    legacy_hal::NanBeaconSdfPayloadRequest* legacy_request) {
  if (!legacy_request) {
    LOG(ERROR) << "convertHidlNanBeaconSdfPayloadRequestToLegacy: legacy_request is null";
    return false;
  }
  memset(legacy_request, 0, sizeof(legacy_hal::NanBeaconSdfPayloadRequest));

  legacy_request->vsa.payload_transmit_flag = hidl_request.transmitInNext16dws ? 1 : 0;
  legacy_request->vsa.tx_in_discovery_beacon = hidl_request.transmitInDiscoveryBeacon;
  legacy_request->vsa.tx_in_sync_beacon = hidl_request.transmitInSyncBeacon;
  legacy_request->vsa.tx_in_service_discovery = hidl_request.transmitInServiceDiscoveryFrame;
  legacy_request->vsa.vendor_oui = hidl_request.vendorOui;
  legacy_request->vsa.vsa_len = hidl_request.vsa.size();
  if (legacy_request->vsa.vsa_len > NAN_MAX_VSA_DATA_LEN) {
    LOG(ERROR) << "convertHidlNanBeaconSdfPayloadRequestToLegacy: vsa_len too long";
    return false;
  }
  memcpy(legacy_request->vsa.vsa, hidl_request.vsa.data(), legacy_request->vsa.vsa_len);

  return true;
}

bool convertHidlNanDataPathInitiatorRequestToLegacy(
    const NanInitiateDataPathRequest& hidl_request,
    legacy_hal::NanDataPathInitiatorRequest* legacy_request) {
@@ -1352,26 +1328,6 @@ bool convertLegacyNanFollowupIndToHidl(
  return true;
}

bool convertLegacyNanBeaconSdfPayloadIndToHidl(
    const legacy_hal::NanBeaconSdfPayloadInd& legacy_ind,
    NanBeaconSdfPayloadInd* hidl_ind) {
  if (!hidl_ind) {
    LOG(ERROR) << "convertLegacyNanBeaconSdfPayloadIndToHidl: hidl_ind is null";
    return false;
  }
  hidl_ind->addr = hidl_array<uint8_t, 6>(legacy_ind.addr);
  hidl_ind->isVsaReceived = legacy_ind.is_vsa_received == 1;
  hidl_ind->vsaReceivedOnFrames = legacy_ind.vsa.vsa_received_on;
  hidl_ind->vsaVendorOui = legacy_ind.vsa.vendor_oui;
  hidl_ind->vsa = std::vector<uint8_t>(legacy_ind.vsa.vsa,
        legacy_ind.vsa.vsa + legacy_ind.vsa.attr_len);
  hidl_ind->isBeaconSdfPayloadReceived = legacy_ind.is_beacon_sdf_payload_received == 1;
  hidl_ind->beaconSdfPayloadData = std::vector<uint8_t>(legacy_ind.data.frame_data,
        legacy_ind.data.frame_data + legacy_ind.data.frame_len);

  return true;
}

bool convertLegacyNanDataPathRequestIndToHidl(
    const legacy_hal::NanDataPathRequestInd& legacy_ind,
    NanDataPathRequestInd* hidl_ind) {
+0 −6
Original line number Diff line number Diff line
@@ -110,9 +110,6 @@ bool convertHidlNanSubscribeRequestToLegacy(
bool convertHidlNanTransmitFollowupRequestToLegacy(
    const NanTransmitFollowupRequest& hidl_request,
    legacy_hal::NanTransmitFollowupRequest* legacy_request);
bool convertHidlNanBeaconSdfPayloadRequestToLegacy(
    const NanBeaconSdfPayloadRequest& hidl_request,
    legacy_hal::NanBeaconSdfPayloadRequest* legacy_request);
bool convertHidlNanDataPathInitiatorRequestToLegacy(
    const NanInitiateDataPathRequest& hidl_request,
    legacy_hal::NanDataPathInitiatorRequest* legacy_request);
@@ -135,9 +132,6 @@ bool convertLegacyNanDataPathRequestIndToHidl(
bool convertLegacyNanDataPathConfirmIndToHidl(
    const legacy_hal::NanDataPathConfirmInd& legacy_ind,
    NanDataPathConfirmInd* hidl_ind);
bool convertLegacyNanBeaconSdfPayloadIndToHidl(
    const legacy_hal::NanBeaconSdfPayloadInd& legacy_ind,
    NanBeaconSdfPayloadInd* hidl_ind);

// RTT controller conversion methods.
bool convertHidlVectorOfRttConfigToLegacy(
Loading