1 /* 2 * Copyright 2019, 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 #pragma once 18 19 // mac80211_hwsim flags, from kernel drivers/net/wireless/mac80211_hwsim.h 20 #define BIT(num) (1UL << (num)) 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 // mac80211_hwsim commands, from kernel drivers/net/wireless/mac80211_hwsim.h 28 enum HwSimCommand { 29 HWSIM_CMD_UNSPEC, 30 HWSIM_CMD_REGISTER, 31 HWSIM_CMD_FRAME, 32 HWSIM_CMD_TX_INFO_FRAME, 33 HWSIM_CMD_NEW_RADIO, 34 HWSIM_CMD_DEL_RADIO, 35 HWSIM_CMD_GET_RADIO, 36 __HWSIM_CMD_MAX, 37 }; 38 39 // mac80211_hwsim attributes, from kernel drivers/net/wireless/mac80211_hwsim.h 40 enum HwSimAttribute { 41 HWSIM_ATTR_UNSPEC, 42 HWSIM_ATTR_ADDR_RECEIVER, 43 HWSIM_ATTR_ADDR_TRANSMITTER, 44 HWSIM_ATTR_FRAME, 45 HWSIM_ATTR_FLAGS, 46 HWSIM_ATTR_RX_RATE, 47 HWSIM_ATTR_SIGNAL, 48 HWSIM_ATTR_TX_INFO, 49 HWSIM_ATTR_COOKIE, 50 HWSIM_ATTR_CHANNELS, 51 HWSIM_ATTR_RADIO_ID, 52 HWSIM_ATTR_REG_HINT_ALPHA2, 53 HWSIM_ATTR_REG_CUSTOM_REG, 54 HWSIM_ATTR_REG_STRICT_REG, 55 HWSIM_ATTR_SUPPORT_P2P_DEVICE, 56 HWSIM_ATTR_USE_CHANCTX, 57 HWSIM_ATTR_DESTROY_RADIO_ON_CLOSE, 58 HWSIM_ATTR_RADIO_NAME, 59 HWSIM_ATTR_NO_VIF, 60 HWSIM_ATTR_FREQ, 61 __HWSIM_ATTR_MAX, 62 }; 63 #define HWSIM_ATTR_MAX (__HWSIM_ATTR_MAX - 1) 64 65