• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 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.net.wifi.nl80211;
18 
19 /**
20  * A callback to notify the results of sending a management frame.
21  * @hide
22  */
23 interface ISendMgmtFrameEvent {
24   // Error codes for OnFailure():
25 
26   // Unknown error.
27   const int SEND_MGMT_FRAME_ERROR_UNKNOWN = 1;
28 
29   // Specifying the MCS rate is not supported by this device.
30   const int SEND_MGMT_FRAME_ERROR_MCS_UNSUPPORTED = 2;
31 
32   // Driver reported that no ACK was received for the transmitted frame.
33   const int SEND_MGMT_FRAME_ERROR_NO_ACK = 3;
34 
35   // Timed out while waiting for a response from the driver about the status
36   // of the transmitted frame.
37   const int SEND_MGMT_FRAME_ERROR_TIMEOUT = 4;
38 
39   // An existing transmission is in progress. Another frame cannot be sent until
40   // the first transmission completes.
41   const int SEND_MGMT_FRAME_ERROR_ALREADY_STARTED = 5;
42 
43   // Called when the management frame was successfully sent and ACKed by the
44   // recipient.
45   // @param elapsedTimeMs The elapsed time between when the management frame was
46   //     sent and when the ACK was processed, in milliseconds, as measured by
47   //     wificond. This includes the time that the send frame spent queuing
48   //     before it was sent, any firmware retries, and the time the received
49   //     ACK spent queuing before it was processed.
OnAck(int elapsedTimeMs)50   oneway void OnAck(int elapsedTimeMs);
51 
52   // Called when the send failed.
53   // @param reason The error code for the failure.
OnFailure(int reason)54   oneway void OnFailure(int reason);
55 }
56