blob: 6c925c59e0221454e75e0a13b2e56453a6a87924 [file]
/*
* Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
package android.os.statsd.wifi;
import "frameworks/proto_logging/stats/atom_field_options.proto";
import "frameworks/proto_logging/stats/atoms.proto";
import "frameworks/proto_logging/stats/enums/wifi/enums.proto";
option java_package = "com.android.os.wifi";
option java_multiple_files = true;
extend Atom {
optional WifiAwareNdpReported wifi_aware_ndp_reported = 638 [(module) = "wifi"];
optional WifiAwareAttachReported wifi_aware_attach_reported = 639 [(module) = "wifi"];
optional WifiSelfRecoveryTriggered wifi_self_recovery_triggered = 661 [(module) = "wifi"];
optional SoftApStarted soft_ap_started = 680 [(module) = "wifi"];
optional SoftApStopped soft_ap_stopped = 681 [(module) = "wifi"];
}
/**
* Logged when wifi aware data path is completed
*/
message WifiAwareNdpReported {
enum Role {
ROLE_UNKNOWN = 0;
ROLE_INITIATOR = 1;
ROLE_RESPONDER = 2;
}
// Role of data path
optional Role role = 1;
// If it is over out-of-band
optional bool is_out_of_band = 2;
// Status of NDP
optional android.net.wifi.AwareStatus status = 3;
// Duration to create NDP in millis.
optional int32 ndp_latency_ms= 4;
// The latency of discovery + NDP in millis.
optional int32 discovery_ndp_latency_ms= 5;
// Channel frequency in MHz, 0 if unavailable, >= 2400 otherwise.
optional int32 channel_frequency_mhz= 6;
}
/**
* Logged when wifi aware attach is completed
*/
message WifiAwareAttachReported {
// Status of attach
optional android.net.wifi.AwareStatus status = 1;
}
/**
* Logged when wifi self recovery triggered
*/
message WifiSelfRecoveryTriggered {
enum Reason {
REASON_UNKNOWN = 0;
REASON_LAST_RESORT_WDOG = 1;
REASON_WIFINATIVE_FAILURE = 2;
REASON_STA_IFACE_DOWN = 3;
REASON_API_CALL = 4;
REASON_SUBSYSTEM_RESTART = 5;
REASON_IFACE_ADDED = 6;
}
enum Result {
RES_UNSPECIFIED = 0;
RES_RESTART_SUCCESS = 1;
RES_INVALID_REASON = 2;
RES_IFACE_DOWN = 3;
RES_IFACE_ADD_DISABLED = 4;
RES_RETRY_DISABLED = 5;
RES_ABOVE_MAX_RETRY = 6;
RES_RESTART_FAILURE = 7;
}
// Trigger reason
optional Reason reason = 1;
// Self recovery result
optional Result result = 2;
}
/**
* Logged when Soft AP is started
*/
message SoftApStarted {
/**
* Result of starting Soft AP
*/
enum StartResult {
// Unknown
START_RESULT_UNKNOWN = 0;
// Successful start
START_RESULT_SUCCESS = 1;
// General failure
START_RESULT_FAILURE_GENERAL = 2;
// Failed due to no channel available
START_RESULT_FAILURE_NO_CHANNEL = 3;
// Failed due to config being unsupported
START_RESULT_FAILURE_UNSUPPORTED_CONFIG = 4;
// Failed to start the HAL
START_RESULT_FAILURE_START_HAL = 5;
// Failed to start hostapd
START_RESULT_FAILURE_START_HOSTAPD = 6;
// Failed due to interface conflict with user rejection
START_RESULT_FAILURE_INTERFACE_CONFLICT_USER_REJECTED = 7;
// Failed due to interface conflict
START_RESULT_FAILURE_INTERFACE_CONFLICT = 8;
// Failed to create interface in vendor HAL
START_RESULT_FAILURE_CREATE_INTERFACE = 9;
// Failed to set country code
START_RESULT_FAILURE_SET_COUNTRY_CODE = 10;
// Failed to set mac address
START_RESULT_FAILURE_SET_MAC_ADDRESS = 11;
// Failed to register AP callback with hostapd
START_RESULT_FAILURE_REGISTER_AP_CALLBACK_HOSTAPD = 12;
// Failed to register AP callback with wificond
START_RESULT_FAILURE_REGISTER_AP_CALLBACK_WIFICOND = 13;
// Failed to add AP to hostapd
START_RESULT_FAILURE_ADD_AP_HOSTAPD = 14;
}
// Result of the start event
optional StartResult result = 1;
// Role of the Soft AP
optional android.net.wifi.SoftApRole role = 2;
// First band bitmask indexed by WifiBandBucket
optional int32 band1 = 3;
// Second band bitmask indexed by WifiBandBucket
optional int32 band2 = 4;
// Whether DBS is supported or not
optional bool dbs_supported = 5;
// STA + AP concurrency capability of the device
optional android.net.wifi.StaApConcurrency sta_ap_concurrency = 6;
// STA connection status at the time of starting
optional android.net.wifi.StaStatus sta_status = 7;
// Authentication type of the Soft AP
optional android.net.wifi.WifiAuthType auth_type = 8;
}
/**
* Logged when Soft AP is stopped
*/
message SoftApStopped {
/**
* Type of Soft AP stop event
*/
enum StopEvent {
// Unknown
STOP_EVENT_UNKNOWN = 0;
// Stopped by the user
STOP_EVENT_STOPPED = 1;
// Stopped due to interface down
STOP_EVENT_INTERFACE_DOWN = 2;
// Stopped due to interface destroyed
STOP_EVENT_INTERFACE_DESTROYED = 3;
// Stopped due to hostapd failure
STOP_EVENT_HOSTAPD_FAILURE = 4;
// Stopped due to no usage timeout
STOP_EVENT_NO_USAGE_TIMEOUT = 5;
// Single DBS instance stopped due to no usage timeout
STOP_EVENT_NO_USAGE_TIMEOUT_ONE_INSTANCE = 6;
// Single DBS instance stopped due to failure
STOP_EVENT_INSTANCE_FAILURE = 7;
}
// Soft AP stop event
optional StopEvent stop_event = 1;
// Role of the Soft AP
optional android.net.wifi.SoftApRole role = 2;
// Band of the Soft AP at the time of stopping
optional int32 band = 3;
// Whether the Soft AP is DBS
optional bool is_dbs = 4;
// STA + AP concurrency capability of the device
optional android.net.wifi.StaApConcurrency sta_ap_concurrency = 5;
// STA connection status at the time of stopping
optional android.net.wifi.StaStatus sta_status = 6;
// Whether or not the no usage timeout is enabled
optional bool is_timeout_enabled = 7;
// Duration of the session in seconds
optional int32 session_duration_seconds = 8;
// Authentication type of the Soft AP
optional android.net.wifi.WifiAuthType auth_type = 9;
// Wi-Fi standard of the Soft AP
optional android.net.wifi.WifiStandard standard = 10;
// Max num of associated clients for the entire session
optional int32 max_clients = 11;
}