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

Commit 2ea0959e authored by Etan Cohen's avatar Etan Cohen Committed by android-build-merger
Browse files

Merge "Wi-Fi/NAN HAL/service fixups" am: 7f1c9647

am: cc195e0c

Change-Id: Ie3a36500aa1901be8a8d9094c45ee6af517e046f
parents c198d27f cc195e0c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -162,8 +162,10 @@ interface IWifiNanIfaceEventCallback {
   *        |NanStatusType.INTERNAL_FAILURE|
   *        |NanStatusType.PROTOCOL_FAILURE|
   *        |NanStatusType.INVALID_PEER_ID|
   * @param ndpInstanceId ID of the new data path being negotiated (on successful status).
   */
  oneway notifyInitiateDataPathResponse(CommandIdShort id, WifiNanStatus status);
  oneway notifyInitiateDataPathResponse(CommandIdShort id, WifiNanStatus status,
        uint32_t ndpInstanceId );

  /**
   * Callback invoked in response to a respond to data path indication request
@@ -176,10 +178,8 @@ interface IWifiNanIfaceEventCallback {
   *        |NanStatusType.INTERNAL_FAILURE|
   *        |NanStatusType.PROTOCOL_FAILURE|
   *        |NanStatusType.INVALID_NDP_ID|
   * @param ndpInstanceId ID of the new data path being negotiated (on successful status).
   */
  oneway notifyRespondToDataPathIndicationResponse(CommandIdShort id, WifiNanStatus status,
                                                   uint32_t ndpInstanceId);
  oneway notifyRespondToDataPathIndicationResponse(CommandIdShort id, WifiNanStatus status);

  /**
   * Callback invoked in response to a terminate data path request |terminateDataPathRequest|.
+56 −20

File changed.

Preview size limit exceeded, changes collapsed.

+17 −3
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_DISABLED: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -67,6 +68,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_PUBLISH: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -75,6 +77,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_PUBLISH_CANCEL: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -82,6 +85,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_TRANSMIT_FOLLOWUP: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -89,6 +93,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_SUBSCRIBE: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -97,6 +102,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_SUBSCRIBE_CANCEL: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -104,6 +110,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_CONFIG: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -111,6 +118,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
     }
    case legacy_hal::NAN_RESPONSE_BEACON_SDF_PAYLOAD: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -118,6 +126,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
     }
    case legacy_hal::NAN_GET_CAPABILITIES: {
        NanCapabilities hidl_struct;
@@ -132,6 +141,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_DP_INTERFACE_CREATE: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -139,6 +149,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_DP_INTERFACE_DELETE: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
@@ -146,18 +157,20 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_DP_INITIATOR_RESPONSE: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
          if (!callback->notifyInitiateDataPathResponse(id, wifiNanStatus).isOk()) {
          if (!callback->notifyInitiateDataPathResponse(id, wifiNanStatus,
                msg.body.data_request_response.ndp_instance_id).isOk()) {
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_DP_RESPONDER_RESPONSE: {
        for (const auto& callback : shared_ptr_this->event_callbacks_) {
          if (!callback->notifyRespondToDataPathIndicationResponse(id, wifiNanStatus,
                    msg.body.data_request_response.ndp_instance_id).isOk()) {
          if (!callback->notifyRespondToDataPathIndicationResponse(id, wifiNanStatus).isOk()) {
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
@@ -168,6 +181,7 @@ WifiNanIface::WifiNanIface(
            LOG(ERROR) << "Failed to invoke the callback";
          }
        }
        break;
    }
    case legacy_hal::NAN_RESPONSE_TCA:
        /* fall through */
+6 −6
Original line number Diff line number Diff line
@@ -750,19 +750,19 @@ struct NanDebugConfig {
   * Frequency in MHz to of the discovery channel in the specified band. Indexed by |NanBandIndex|.
   */
  bool validDiscoveryChannelVal;
  vec<WifiChannelInMhz> discoveryChannelMhzVal;
  WifiChannelInMhz[2] discoveryChannelMhzVal;
  /**
   * Specifies whether sync/discovery beacons are transmitted in the specified band. Indexed by
   * |NanBandIndex|.
   */
  bool validUseBeaconsInBandVal;
  vec<bool> useBeaconsInBandVal;
  bool[2] useBeaconsInBandVal;
  /**
   * Specified whether SDF (service discovery frames) are transmitted in the specified band. Indexed
   * by |NanBandIndex|.
   */
  bool validUseSdfInBandVal;
  vec<bool> useSdfInBandVal;
  bool[2] useSdfInBandVal;
};

/**
@@ -816,7 +816,7 @@ struct NanConfigRequest {
  /**
   * Additional configuration provided per band: indexed by |NanBandIndex|.
   */
  vec<NanBandSpecificConfig> bandSpecificConfig;
  NanBandSpecificConfig[2] bandSpecificConfig;
};

/**
@@ -826,7 +826,7 @@ struct NanEnableRequest {
  /**
   * Enable operation in a specific band: indexed by |NanBandIndex|.
   */
  vec<bool> operateInBand;
  bool[2] operateInBand;
  /**
   * Specify extent of cluster by specifying the max hop count.
   */
@@ -888,7 +888,7 @@ struct NanDiscoveryCommonConfig {
   * UTF-8 encoded string identifying the service.
   * Max length: |NanCapabilities.maxServiceNameLen|.
   */
  string serviceName;
  vec<uint8_t> serviceName;
  /**
   * Specifies the matching indication to host: once, continuous, or never.
   */