• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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 // API definitions from kernel drivers/net/wireless/mac80211_hwsim.h
18 
19 #define BIT(n) (1 << (n))
20 
21 enum hwsim_tx_control_flags {
22     HWSIM_TX_CTL_REQ_TX_STATUS = BIT(0),
23     HWSIM_TX_CTL_NO_ACK = BIT(1),
24     HWSIM_TX_STAT_ACK = BIT(2),
25 };
26 
27 enum {
28     HWSIM_CMD_UNSPEC,
29     HWSIM_CMD_REGISTER,
30     HWSIM_CMD_FRAME,
31     HWSIM_CMD_TX_INFO_FRAME,
32     HWSIM_CMD_NEW_RADIO,
33     HWSIM_CMD_DEL_RADIO,
34     HWSIM_CMD_GET_RADIO,
35     HWSIM_CMD_ADD_MAC_ADDR,
36     HWSIM_CMD_DEL_MAC_ADDR,
37 };
38 
39 enum {
40     HWSIM_ATTR_UNSPEC,
41     HWSIM_ATTR_ADDR_RECEIVER,
42     HWSIM_ATTR_ADDR_TRANSMITTER,
43     HWSIM_ATTR_FRAME,
44     HWSIM_ATTR_FLAGS,
45     HWSIM_ATTR_RX_RATE,
46     HWSIM_ATTR_SIGNAL,
47     HWSIM_ATTR_TX_INFO,
48     HWSIM_ATTR_COOKIE,
49     HWSIM_ATTR_CHANNELS,
50     HWSIM_ATTR_RADIO_ID,
51     HWSIM_ATTR_REG_HINT_ALPHA2,
52     HWSIM_ATTR_REG_CUSTOM_REG,
53     HWSIM_ATTR_REG_STRICT_REG,
54     HWSIM_ATTR_SUPPORT_P2P_DEVICE,
55     HWSIM_ATTR_USE_CHANCTX,
56     HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE,
57     HWSIM_ATTR_RADIO_NAME,
58     HWSIM_ATTR_NO_VIF,
59     HWSIM_ATTR_FREQ,
60     HWSIM_ATTR_PAD,
61     HWSIM_ATTR_TX_INFO_FLAGS,
62     HWSIM_ATTR_PERM_ADDR,
63     HWSIM_ATTR_IFTYPE_SUPPORT,
64     HWSIM_ATTR_CIPHER_SUPPORT,
65 };
66 
67 struct hwsim_tx_rate {
68     int8_t idx;
69     uint8_t count;
70 } __packed;
71 static_assert(sizeof(hwsim_tx_rate) == 2);
72 
73 #undef BIT
74