Home | History | Annotate | Download | only in 1.3
      1 /*
      2  * Copyright 2018 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 android.hardware.wifi@1.3;
     18 
     19 import @1.0::StaLinkLayerRadioStats;
     20 import @1.0::StaLinkLayerIfaceStats;
     21 import @1.0::TimeStampInMs;
     22 import @1.0::WifiChannelInfo;
     23 
     24 struct WifiChannelStats {
     25     /**
     26     * Channel information.
     27     */
     28     WifiChannelInfo channel;
     29     /**
     30      * Total time for which the radio is awake on this channel.
     31      */
     32     uint32_t onTimeInMs;
     33     /**
     34      * Total time for which CCA is held busy on this channel.
     35      */
     36     uint32_t ccaBusyTimeInMs;
     37 };
     38 
     39 struct StaLinkLayerRadioStats {
     40     /**
     41      * Baseline information as defined in HAL 1.0.
     42      */
     43     @1.0::StaLinkLayerRadioStats V1_0;
     44 
     45     /**
     46      * Total time for which the radio is awake due to NAN scan since boot or crash.
     47      */
     48     uint32_t onTimeInMsForNanScan;
     49 
     50     /**
     51      * Total time for which the radio is awake due to background scan since boot or crash.
     52      */
     53     uint32_t onTimeInMsForBgScan;
     54 
     55     /**
     56      * Total time for which the radio is awake due to roam scan since boot or crash.
     57      */
     58     uint32_t onTimeInMsForRoamScan;
     59 
     60     /**
     61      * Total time for which the radio is awake due to PNO scan since boot or crash.
     62      */
     63     uint32_t onTimeInMsForPnoScan;
     64 
     65     /**
     66      * Total time for which the radio is awake due to Hotspot 2.0 scans and GAS exchange since boot
     67      * or crash.
     68      */
     69     uint32_t onTimeInMsForHs20Scan;
     70 
     71     /**
     72      * List of channel stats associated with this radio
     73      */
     74     vec<WifiChannelStats> channelStats;
     75 };
     76 
     77 /**
     78  * Link layer stats retrieved via |getLinkLayerStats|.
     79  */
     80 struct StaLinkLayerStats {
     81     StaLinkLayerIfaceStats iface;
     82     vec<StaLinkLayerRadioStats> radios;
     83     /**
     84      * TimeStamp for each stats sample.
     85      * This is the absolute milliseconds from boot when these stats were
     86      * sampled.
     87      */
     88     TimeStampInMs timeStampInMs;
     89 };