1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.server.wifi;
18 
19 public class WifiLoggerHal {
20     // Must match wifi_logger.h
21     public static final int MAX_FATE_LOG_LEN = 32;
22 
23     public static final byte FRAME_TYPE_UNKNOWN = 0;
24     public static final byte FRAME_TYPE_ETHERNET_II = 1;
25     public static final byte FRAME_TYPE_80211_MGMT = 2;
26 
27     public static final byte TX_PKT_FATE_ACKED = 0;
28     public static final byte TX_PKT_FATE_SENT = 1;
29     public static final byte TX_PKT_FATE_FW_QUEUED = 2;
30     public static final byte TX_PKT_FATE_FW_DROP_INVALID = 3;
31     public static final byte TX_PKT_FATE_FW_DROP_NOBUFS = 4;
32     public static final byte TX_PKT_FATE_FW_DROP_OTHER = 5;
33     public static final byte TX_PKT_FATE_DRV_QUEUED = 6;
34     public static final byte TX_PKT_FATE_DRV_DROP_INVALID = 7;
35     public static final byte TX_PKT_FATE_DRV_DROP_NOBUFS = 8;
36     public static final byte TX_PKT_FATE_DRV_DROP_OTHER = 9;
37 
38     public static final byte RX_PKT_FATE_SUCCESS = 0;
39     public static final byte RX_PKT_FATE_FW_QUEUED = 1;
40     public static final byte RX_PKT_FATE_FW_DROP_FILTER = 2;
41     public static final byte RX_PKT_FATE_FW_DROP_INVALID = 3;
42     public static final byte RX_PKT_FATE_FW_DROP_NOBUFS = 4;
43     public static final byte RX_PKT_FATE_FW_DROP_OTHER = 5;
44     public static final byte RX_PKT_FATE_DRV_QUEUED = 6;
45     public static final byte RX_PKT_FATE_DRV_DROP_FILTER = 7;
46     public static final byte RX_PKT_FATE_DRV_DROP_INVALID = 8;
47     public static final byte RX_PKT_FATE_DRV_DROP_NOBUFS = 9;
48     public static final byte RX_PKT_FATE_DRV_DROP_OTHER = 10;
49 
50     /** These aren't formally part of the HAL. But they probably should be, eventually. */
51     public static final int WIFI_ALERT_REASON_RESERVED = 0;
52     public static final int WIFI_ALERT_REASON_MIN = 0;
53     public static final int WIFI_ALERT_REASON_MAX = 1024;
54 }
55