15443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills/* 25443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Copyright 2016 The Android Open Source Project 35443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 45443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Licensed under the Apache License, Version 2.0 (the "License"); 55443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * you may not use this file except in compliance with the License. 65443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * You may obtain a copy of the License at 75443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 85443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * http://www.apache.org/licenses/LICENSE-2.0 95443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 105443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Unless required by applicable law or agreed to in writing, software 115443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * distributed under the License is distributed on an "AS IS" BASIS, 125443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * See the License for the specific language governing permissions and 145443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * limitations under the License. 155443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 165443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 175443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Willspackage android.hardware.wifi@1.0; 185443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 195443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Willsimport IWifiChipEventCallback; 20fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Piusimport IWifiIface; 21adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiApIface; 22adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiNanIface; 23adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiP2pIface; 24adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiStaIface; 25fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Piusimport IWifiRttController; 265443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 275443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills/** 285443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Interface that represents a chip that must be configured as a single unit. 295443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * The HAL/driver/firmware will be responsible for determining which phy is used 305443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * to perform operations like NAN, RTT, etc. 315443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 325443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Willsinterface IWifiChip { 335443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 345443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Set of interface types with the maximum number of interfaces that can have 35271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius * one of the specified type for a given ChipIfaceCombination. See 36271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius * ChipIfaceCombination for examples. 375443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 38271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius struct ChipIfaceCombinationLimit { 397b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius vec<IfaceType> types; // Each IfaceType must occur at most once. 405443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills uint32_t maxIfaces; 415443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills }; 425443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 435443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 445443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Set of interfaces that can operate concurrently when in a given mode. See 455443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * ChipMode below. 465443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 475443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * For example: 485443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [{STA} <= 2] 495443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * At most two STA interfaces are supported 505443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [], [STA], [STA+STA] 515443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 525443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [{STA} <= 1, {NAN} <= 1, {AP} <= 1] 535443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Any combination of STA, NAN, AP 545443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [], [STA], [NAN], [AP], [STA+NAN], [STA+AP], [NAN+AP], [STA+NAN+AP] 555443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 565443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [{STA} <= 1, {NAN,P2P} <= 1] 575443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Optionally a STA and either NAN or P2P 585443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [], [STA], [STA+NAN], [STA+P2P], [NAN], [P2P] 595443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Not included [NAN+P2P], [STA+NAN+P2P] 605443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 615443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [{STA} <= 1, {STA,NAN} <= 1] 625443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Optionally a STA and either a second STA or a NAN 635443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [], [STA], [STA+NAN], [STA+STA], [NAN] 645443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Not included [STA+STA+NAN] 655443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 66271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius struct ChipIfaceCombination { 67271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius vec<ChipIfaceCombinationLimit> limits; 685443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills }; 695443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 705443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 715443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * A mode that the chip can be put in. A mode defines a set of constraints on 725443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * the interfaces that can exist while in that mode. Modes define a unit of 735443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * configuration where all interfaces must be torn down to switch to a 745443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * different mode. Some HALs may only have a single mode, but an example where 755443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * multiple modes would be required is if a chip has different firmwares with 765443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * different capabilities. 775443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 785443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * When in a mode, it must be possible to perform any combination of creating 795443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * and removing interfaces as long as at least one of the 80271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius * ChipIfaceCombinations is satisfied. This means that if a chip has two 815443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * available combinations, [{STA} <= 1] and [{AP} <= 1] then it is expected 825443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * that exactly one STA interface or one AP interface can be created, but it 835443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * is not expected that both a STA and AP interface could be created. If it 845443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * was then there would be a single available combination 855443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [{STA} <=1, {AP} <= 1]. 865443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 875443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * When switching between two available combinations it is expected that 88e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * interfaces only supported by the initial combination must be removed until 895443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * the target combination is also satisfied. At that point new interfaces 905443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * satisfying only the target combination can be added (meaning the initial 915443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * combination limits will no longer satisfied). The addition of these new 927b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius * interfaces must not impact the existence of interfaces that satisfy both 935443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * combinations. 945443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 955443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * For example, a chip with available combinations: 965443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * [{STA} <= 2, {NAN} <=1] and [{STA} <=1, {NAN} <= 1, {AP} <= 1}] 975443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * If the chip currently has 3 interfaces STA, STA and NAN and wants to add an 985443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * AP interface in place of one of the STAs then first one of the STA 995443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * interfaces must be removed and then the AP interface can be created after 1005443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * the STA had been torn down. During this process the remaining STA and NAN 1017b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius * interfaces must not be removed/recreated. 1025443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 1035443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * If a chip does not support this kind of reconfiguration in this mode then 1047b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius * the combinations must be separated into two separate modes. Before 105e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * switching modes all interfaces must be torn down, the mode switch must be 106e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * enacted and when it completes the new interfaces must be brought up. 1075443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 1085443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills struct ChipMode { 1095443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 1105443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Id that can be used to put the chip in this mode. 1115443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 1125443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills ChipModeId id; 1135443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 1145443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 1155443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * A list of the possible interface combinations that the chip can have 1165443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * while in this mode. 1175443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 118271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius vec<ChipIfaceCombination> availableCombinations; 1195443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills }; 1205443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 1215443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 122a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * Information about the version of the driver and firmware running this chip. 123a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * 124a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * The information in these ASCII strings are vendor specific and does not 125a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * need to follow any particular format. It may be dumped as part of the bug 126a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * report. 127a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius */ 128a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius struct ChipDebugInfo { 129a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius string driverDescription; 130a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius string firmwareDescription; 131a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius }; 132a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius 133a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius /** 134fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Capabilities exposed by this chip. 135fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 136fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius enum ChipCapabilityMask : uint32_t { 137fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 138fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Memory dump of Firmware. 139fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 140a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius DEBUG_MEMORY_FIRMWARE_DUMP = 1 << 0, 141fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 142fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Memory dump of Driver. 143fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 144a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius DEBUG_MEMORY_DRIVER_DUMP = 1 << 1, 145fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 146fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Connectivity events reported via debug ring buffer. 147fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 148a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius DEBUG_RING_BUFFER_CONNECT_EVENT = 1 << 2, 149fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 150fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Power events reported via debug ring buffer. 151fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 152a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius DEBUG_RING_BUFFER_POWER_EVENT = 1 << 3, 153fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 154fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Wakelock events reported via debug ring buffer. 155fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 156a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius DEBUG_RING_BUFFER_WAKELOCK_EVENT = 1 << 4, 157fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 158fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Vendor data reported via debug ring buffer. 159fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * This mostly contains firmware event logs. 160fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 161a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius DEBUG_RING_BUFFER_VENDOR_DATA = 1 << 5, 162e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius /** 163e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * Host wake reasons stats collection. 164e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius */ 165e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius DEBUG_HOST_WAKE_REASON_STATS = 1 << 6, 166203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius /** 167203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * Error alerts. 168203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius */ 169203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius DEBUG_ERROR_ALERTS = 1 << 7 170fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius }; 171fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius 172fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 173adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Get the id assigned to this chip. 174adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 175a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 1761f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 177a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 178a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 179adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return id Assigned chip Id. 180adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 181a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getId() generates (WifiStatus status, ChipId id); 182adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 183adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 1845443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Requests notifications of significant events on this chip. Multiple calls 185e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * to this must register multiple callbacks each of which must receive all 1865443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * events. 1876f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * 1886f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * @param callback An instance of the |IWifiChipEventCallback| HIDL interface 1896f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * object. 190a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 1911f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 192a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 193a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 1945443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 195a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius registerEventCallback(IWifiChipEventCallback callback) generates (WifiStatus status); 1965443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 1975443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 198fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Get the capabilities supported by this chip. 199fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * 200fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * @return status WifiStatus of the operation. 201fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * Possible status codes: 202fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.SUCCESS|, 203fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 204fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.ERROR_NOT_AVAILABLE|, 205fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.ERROR_UNKNOWN| 206fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * @return capabilities Bitset of |ChipCapabilityMask| values. 207fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius */ 2085c3a0d9666ea8f61e893791a115304819a816fd0Roshan Pius getCapabilities() 2095c3a0d9666ea8f61e893791a115304819a816fd0Roshan Pius generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities); 210fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius 211fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius /** 2125443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Get the set of operation modes that the chip supports. 2136f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * 214a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 2151f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 216a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 217a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 2186f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * @return modes List of modes supported by the device. 2195443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 220a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getAvailableModes() generates (WifiStatus status, vec<ChipMode> modes); 2215443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 2225443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 223b1ad3a7bf1973c04989fa91a728fced27cd12f62Ningyuan Wang * Configure the Chip. 224b1ad3a7bf1973c04989fa91a728fced27cd12f62Ningyuan Wang * This may NOT be called to reconfigure a chip due to an internal 225b1ad3a7bf1973c04989fa91a728fced27cd12f62Ningyuan Wang * limitation. Calling this when chip is already configured in a different 226b1ad3a7bf1973c04989fa91a728fced27cd12f62Ningyuan Wang * mode must trigger an ERROR_NOT_SUPPORTED failure. 227b1ad3a7bf1973c04989fa91a728fced27cd12f62Ningyuan Wang * If you want to do reconfiguration, please call IWifi.stop() and IWifi.start() 228b1ad3a7bf1973c04989fa91a728fced27cd12f62Ningyuan Wang * to restart Wifi HAL before calling this. 229a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * Any existing |IWifiIface| objects must be marked invalid after this call. 230a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * If this fails then the chips is now in an undefined state and 231a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * configureChip must be called again. 232a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * Must trigger |IWifiChipEventCallback.onChipReconfigured| on success. 233a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * Must trigger |IWifiEventCallback.onFailure| on failure. 2345443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * 23518680b7affe027388c0d299d9222c37c2833dda2Roshan Pius * @param modeId The mode that the chip must switch to, corresponding to the 2366f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * id property of the target ChipMode. 237a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 2381f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 239a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 240a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 241a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_AVAILABLE|, 242b1ad3a7bf1973c04989fa91a728fced27cd12f62Ningyuan Wang * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 243a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_UNKNOWN| 2445443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 245a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius configureChip(ChipModeId modeId) generates (WifiStatus status); 2465443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 2475443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 2485443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Get the current mode that the chip is in. 2496f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * 2506f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * @return modeId The mode that the chip is currently configured to, 2516f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * corresponding to the id property of the target ChipMode. 252a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 2531f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 254a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 255a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 2565443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 257a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getMode() generates (WifiStatus status, ChipModeId modeId); 2585443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 2595443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 2606f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * Request information about the chip. 2611f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * 262a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 2631f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 264a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 265a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 266a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_AVAILABLE|, 267a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_UNKNOWN| 268a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return chipDebugInfo Instance of |ChipDebugInfo|. 2695443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 270a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius requestChipDebugInfo() generates (WifiStatus status, ChipDebugInfo chipDebugInfo); 2715443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 2725443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 2736f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * Request vendor debug info from the driver. 2741f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * 275a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 2761f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 277a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 278a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 279a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_AVAILABLE|, 280a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_UNKNOWN| 281a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @param blob Vector of bytes retrieved from the driver. 2825443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 283a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius requestDriverDebugDump() generates (WifiStatus status, vec<uint8_t> blob); 2845443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills 2855443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills /** 2866f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius * Request vendor debug info from the firmware. 2871f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * 288a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 2891f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 290a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 291a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 292a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_AVAILABLE|, 293a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_UNKNOWN| 294a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @param blob Vector of bytes retrieved from the driver. 2955443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */ 296a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius requestFirmwareDebugDump() generates (WifiStatus status, vec<uint8_t> blob); 297adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 298adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 299adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Create an AP iface on the chip. 300adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 301adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Depending on the mode the chip is configured in, the interface creation 302a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum 303a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP 304a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * type. 305adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 306a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 3071f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 308a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 309a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 310a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED| 311adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 312adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * successful, null otherwise. 313adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 314a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius createApIface() generates (WifiStatus status, IWifiApIface iface); 315adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 316adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 317adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * List all the AP iface names configured on the chip. 318adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * The corresponding |IWifiApIface| object for any iface are 319adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * retrieved using |getApIface| method. 320adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 321a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 3221f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 323a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 324a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 325adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return ifnames List of all AP iface names on the chip. 326adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 327a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getApIfaceNames() generates (WifiStatus status, vec<string> ifnames); 328adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 329adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 330adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Gets a HIDL interface object for the AP Iface corresponding 331adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * to the provided ifname. 332adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 333adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @param ifname Name of the iface. 334a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 3351f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 336a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 3378b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 3388b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 339adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 340adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * it exists, null otherwise. 341adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 342a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getApIface(string ifname) generates (WifiStatus status, IWifiApIface iface); 343adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 344adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 3458b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Removes the AP Iface with the provided ifname. 3468b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Any further calls on the corresponding |IWifiApIface| HIDL interface 3478b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * object must fail. 3488b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * 3498b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @param ifname Name of the iface. 3508b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @return status WifiStatus of the operation. 3518b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Possible status codes: 3528b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.SUCCESS|, 3538b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 3548b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 3558b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius */ 3568b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius removeApIface(string ifname) generates (WifiStatus status); 3578b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius 3588b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius /** 359adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Create a NAN iface on the chip. 360adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 361adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Depending on the mode the chip is configured in, the interface creation 362a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum 363a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN 364a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * type. 365adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 366a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 3671f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 368a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 369a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 370a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED| 371adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 372adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * successful, null otherwise. 373adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 374a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius createNanIface() generates (WifiStatus status, IWifiNanIface iface); 375adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 376adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 377adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * List all the NAN iface names configured on the chip. 378adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * The corresponding |IWifiNanIface| object for any iface are 379adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * retrieved using |getNanIface| method. 380adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 381a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 3821f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 383a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 384a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 385adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return ifnames List of all NAN iface names on the chip. 386adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 387a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getNanIfaceNames() generates (WifiStatus status, vec<string> ifnames); 388adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 389adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 390adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Gets a HIDL interface object for the NAN Iface corresponding 391adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * to the provided ifname. 392adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 393adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @param ifname Name of the iface. 394a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 3951f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 396a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 3978b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 3988b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 399adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 400adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * it exists, null otherwise. 401adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 402a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getNanIface(string ifname) generates (WifiStatus status, IWifiNanIface iface); 403adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 404adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 4058b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Removes the NAN Iface with the provided ifname. 4068b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Any further calls on the corresponding |IWifiNanIface| HIDL interface 4078b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * object must fail. 4088b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * 4098b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @param ifname Name of the iface. 4108b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @return status WifiStatus of the operation. 4118b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Possible status codes: 4128b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.SUCCESS|, 4138b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 4148b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 4158b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius */ 4168b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius removeNanIface(string ifname) generates (WifiStatus status); 4178b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius 4188b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius /** 419adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Create a P2P iface on the chip. 420adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 421adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Depending on the mode the chip is configured in, the interface creation 422a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum 423a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P 424a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * type. 425adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 426a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 4271f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 428a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 429a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 430a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED| 431adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 432adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * successful, null otherwise. 433adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 434a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius createP2pIface() generates (WifiStatus status, IWifiP2pIface iface); 435adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 436adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 437adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * List all the P2P iface names configured on the chip. 438adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * The corresponding |IWifiP2pIface| object for any iface are 439adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * retrieved using |getP2pIface| method. 440adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 441a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 4421f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 443a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 444a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 445adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return ifnames List of all P2P iface names on the chip. 446adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 447a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getP2pIfaceNames() generates (WifiStatus status, vec<string> ifnames); 448adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 449adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 450adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Gets a HIDL interface object for the P2P Iface corresponding 451adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * to the provided ifname. 452adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 453adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @param ifname Name of the iface. 454a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 4551f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 456a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 4578b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 4588b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 459adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 460adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * it exists, null otherwise. 461adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 462a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getP2pIface(string ifname) generates (WifiStatus status, IWifiP2pIface iface); 463adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 464adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 4658b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Removes the P2P Iface with the provided ifname. 4668b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Any further calls on the corresponding |IWifiP2pIface| HIDL interface 4678b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * object must fail. 4688b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * 4698b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @param ifname Name of the iface. 4708b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @return status WifiStatus of the operation. 4718b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Possible status codes: 4728b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.SUCCESS|, 4738b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 4748b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 4758b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius */ 4768b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius removeP2pIface(string ifname) generates (WifiStatus status); 4778b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius 4788b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius /** 479adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Create an STA iface on the chip. 480adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 481adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Depending on the mode the chip is configured in, the interface creation 482a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum 483a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA 484a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * type. 485adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 486a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 4871f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 488a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 489a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 490a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED| 491adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 492adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * successful, null otherwise. 493adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 494a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius createStaIface() generates (WifiStatus status, IWifiStaIface iface); 495adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 496adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 497adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * List all the STA iface names configured on the chip. 498adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * The corresponding |IWifiStaIface| object for any iface are 499adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * retrieved using |getStaIface| method. 500adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 501a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 5021f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 503a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 504a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 505adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return ifnames List of all STA iface names on the chip. 506adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 507a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getStaIfaceNames() generates (WifiStatus status, vec<string> ifnames); 508adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius 509adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius /** 510adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * Gets a HIDL interface object for the STA Iface corresponding 511adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * to the provided ifname. 512adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * 513adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @param ifname Name of the iface. 514a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 5151f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 516a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 5178b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 5188b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 519adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * @return iface HIDL interface object representing the iface if 520adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius * it exists, null otherwise. 521adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius */ 522a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius getStaIface(string ifname) generates (WifiStatus status, IWifiStaIface iface); 523fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius 524fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius /** 5258b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Removes the STA Iface with the provided ifname. 5268b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Any further calls on the corresponding |IWifiStaIface| HIDL interface 5278b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * object must fail. 5288b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * 5298b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @param ifname Name of the iface. 5308b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * @return status WifiStatus of the operation. 5318b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * Possible status codes: 5328b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.SUCCESS|, 5338b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 5348b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius * |WifiStatusCode.ERROR_INVALID_ARGS| 5358b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius */ 5368b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius removeStaIface(string ifname) generates (WifiStatus status); 5378b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius 5388b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius /** 539fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * Create a RTTController instance. 540fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * 541fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * RTT controller can be either: 542fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * a) Bound to a specific iface by passing in the corresponding |IWifiIface| 543fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * object in |iface| param, OR 544fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * b) Let the implementation decide the iface to use for RTT operations by 545fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * passing null in |iface| param. 546fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * 547fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * @param boundIface HIDL interface object representing the iface if 548fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius * the responder must be bound to a specific iface, null otherwise. 549a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * @return status WifiStatus of the operation. 5501f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius * Possible status codes: 551a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.SUCCESS|, 552a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| 553fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius */ 5541f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius createRttController(IWifiIface boundIface) 555a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius generates (WifiStatus status, IWifiRttController rtt); 556e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius 557e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius /** 558e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * WiFi debug ring buffer life cycle is as follow: 559e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * - At initialization time, framework must call |getDebugRingBuffersStatus|. 560e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * to obtain the names and list of supported ring buffers. 561e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * The driver may expose several different rings each holding a different 562e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * type of data (connection events, power events, etc). 563e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * - When WiFi operations start framework must call 564e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |startLoggingToDebugRingBuffer| to trigger log collection for a specific 565e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * ring. The vebose level for each ring buffer can be specified in this API. 566e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * - During wifi operations, driver must periodically report per ring data to 567e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * framework by invoking the 56848185b2a2d267a248001448574905b58ea84845dRoshan Pius * |IWifiChipEventCallback.onDebugRingBufferDataAvailable| callback. 569e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * - When capturing a bug report, framework must indicate to driver that all 570e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * the data has to be uploaded urgently by calling 571e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |forceDumpToDebugRingBuffer|. 572e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * 573e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * The data uploaded by driver must be stored by framework in separate files, 574e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * with one stream of file per ring. Framework must store the files in pcapng 575e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * format, allowing for easy merging and parsing with network analyzer tools. 576e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * TODO: Since we're not longer dumping out the raw data, storing in separate 577e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * pcapng files for parsing later must not work anymore. 578e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius */ 579e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius /** 580e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * API to get the status of all ring buffers supported by driver. 581e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * 582e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @return status WifiStatus of the operation. 583e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * Possible status codes: 584e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.SUCCESS|, 585e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 586fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 587e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.NOT_AVAILABLE|, 588e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.UNKNOWN| 589e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @return ringBuffers Vector of |WifiDebugRingBufferStatus| corresponding to the 590e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * status of each ring bufffer on the device. 591e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius */ 592e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius getDebugRingBuffersStatus() generates (WifiStatus status, 593e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius vec<WifiDebugRingBufferStatus> ringBuffers); 594e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius 595e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius /** 596e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * API to trigger the debug data collection. 597e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * 598e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @param ringName represent the name of the ring for which data collection 599e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * shall start. This can be retrieved via the corresponding 600e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiDebugRingBufferStatus|. 601e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @parm maxIntervalInSec Maximum interval in seconds for driver to invoke 602e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |onDebugRingBufferData|, ignore if zero. 603e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @parm minDataSizeInBytes: Minimum data size in buffer for driver to invoke 604e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |onDebugRingBufferData|, ignore if zero. 605e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @return status WifiStatus of the operation. 606e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * Possible status codes: 607e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.SUCCESS|, 608e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 609fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 610e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.NOT_AVAILABLE|, 611e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.UNKNOWN| 612e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius */ 613e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius startLoggingToDebugRingBuffer(string ringName, 614e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius WifiDebugRingBufferVerboseLevel verboseLevel, 615e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius uint32_t maxIntervalInSec, 616e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius uint32_t minDataSizeInBytes) 617e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius generates (WifiStatus status); 618e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius 619e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius /** 620e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * API to force dump data into the corresponding ring buffer. 621e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * This is to be invoked during bugreport collection. 622e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * 623e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @param ringName represent the name of the ring for which data collection 624e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * shall be forced. This can be retrieved via the corresponding 625e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiDebugRingBufferStatus|. 626e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * @return status WifiStatus of the operation. 627e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * Possible status codes: 628e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.SUCCESS|, 629e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 630fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 631fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius * |WifiStatusCode.ERROR_NOT_STARTED|, 632e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.NOT_AVAILABLE|, 633e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius * |WifiStatusCode.UNKNOWN| 634e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius */ 635e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status); 636e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius 637e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius /** 6388c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * API to stop the debug data collection for all ring buffers. 6398c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * 6408c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * @return status WifiStatus of the operation. 6418c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * Possible status codes: 6428c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * |WifiStatusCode.SUCCESS|, 6438c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 6448c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 6458c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * |WifiStatusCode.NOT_AVAILABLE|, 6468c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius * |WifiStatusCode.UNKNOWN| 6478c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius */ 6488c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius stopLoggingToDebugRingBuffer() generates (WifiStatus status); 6498c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius 6508c0c8e9aa030c8bdc2922a24c8304ddaed43a615Roshan Pius /** 651e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * API to retrieve the wifi wake up reason stats for debugging. 652e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * The driver is expected to start maintaining these stats once the chip 653e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * is configured using |configureChip|. These stats must be reset whenever 654e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * the chip is reconfigured or the HAL is stopped. 655e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * 656e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * @return status WifiStatus of the operation. 657e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * Possible status codes: 658e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * |WifiStatusCode.SUCCESS|, 659e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 660e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 661e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * |WifiStatusCode.NOT_AVAILABLE|, 662e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * |WifiStatusCode.UNKNOWN| 663e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius * @return stats Instance of |WifiDebugHostWakeReasonStats|. 664e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius */ 665e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius getDebugHostWakeReasonStats() 666e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius generates (WifiStatus status, WifiDebugHostWakeReasonStats stats); 667203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius 668203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius /** 669203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * API to enable/disable alert notifications from the chip. 670203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * These alerts must be used to notify framework of any fatal error events 671203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * that the chip encounters via |IWifiChipEventCallback.onDebugErrorAlert| method. 672203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * Must fail if |ChipCapabilityMask.DEBUG_ERROR_ALERTS| is not set. 673203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * 674203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * @param enable true to enable, false to disable. 675203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * @return status WifiStatus of the operation. 676203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * Possible status codes: 677203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * |WifiStatusCode.SUCCESS|, 678203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, 679203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * |WifiStatusCode.ERROR_NOT_SUPPORTED|, 680203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * |WifiStatusCode.NOT_AVAILABLE|, 681203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius * |WifiStatusCode.UNKNOWN| 682203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius */ 683203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius enableDebugErrorAlerts(bool enable) generates (WifiStatus status); 6845443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills}; 685