1/* 2 * Copyright 2017 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 17package [email protected]; 18 19import @1.0::IWifiChipEventCallback; 20import @1.0::WifiBand; 21 22/** 23 * Wifi chip event callbacks. 24 */ 25interface IWifiChipEventCallback extends @1.0::IWifiChipEventCallback { 26 /** 27 * Struct describing the state of each iface operating on the radio chain 28 * (hardware MAC) on the device. 29 */ 30 struct IfaceInfo { 31 /** Name of the interface (For ex: "wlan0"). */ 32 string name; 33 /** Wifi channel on which this interface is operating. */ 34 uint32_t channel; 35 }; 36 37 /** 38 * Struct describing the state of each hardware radio chain (hardware MAC) 39 * on the device. 40 */ 41 struct RadioModeInfo { 42 /** 43 * Identifier for this radio chain. This is vendor dependent & used 44 * only for debugging purposes. 45 */ 46 uint32_t radioId; 47 /** 48 * List of bands on which this radio chain is operating. 49 * Can be one of: 50 * a) WifiBand.BAND_24GHZ => 2.4Ghz. 51 * b) WifiBand.BAND_5GHZ => 5Ghz. 52 * c) WifiBand.BAND_24GHZ_5GHZ = 2.4Ghz + 5Ghz (Radio is time sharing 53 * across the 2 bands). 54 */ 55 WifiBand bandInfo; 56 /** List of interfaces on this radio chain (hardware MAC). */ 57 vec<IfaceInfo> ifaceInfos; 58 }; 59 60 /** 61 * Asynchronous callback indicating a radio mode change. 62 * Radio mode change could be a result of: 63 * a) Bringing up concurrent interfaces (For ex: STA + AP). 64 * b) Change in operating band of one of the concurrent interfaces (For ex: 65 * STA connection moved from 2.4G to 5G) 66 * 67 * @param radioModeInfos List of RadioModeInfo structures for each 68 * radio chain (hardware MAC) on the device. 69 */ 70 oneway onRadioModeChange(vec<RadioModeInfo> radioModeInfos); 71}; 72