aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mac80211_hwsim.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-01-06 17:29:20 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-01-10 14:12:59 -0500
commitbc7910989601fbde02b3dd485d595a614d21ef1e (patch)
tree1f42c4c6259207f293f8ee0e7cee1bbee72b7c83 /drivers/net/wireless/mac80211_hwsim.h
parentc5ac08548b53c3292aa3cbd02de6ae99ca7271e6 (diff)
mac80211_hwsim: allow creating/destroying radios on the fly
Add new commands to the hwsim generic netlink family to allow creating and destroying radios on the fly. The number of channels a radio supports can be specified when it's created, if it isn't the module parameter will be used as default. This should be extended in the future to allow other parameters to be specified, e.g. * list of channels * interface combinations, particularly P2P_DEVICE support * regtest * and pretty much all other hardware capabilities Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.h')
-rw-r--r--drivers/net/wireless/mac80211_hwsim.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.h b/drivers/net/wireless/mac80211_hwsim.h
index afaad5a443b6..fb9920a99396 100644
--- a/drivers/net/wireless/mac80211_hwsim.h
+++ b/drivers/net/wireless/mac80211_hwsim.h
@@ -65,6 +65,9 @@ enum hwsim_tx_control_flags {
65 * kernel, uses: 65 * kernel, uses:
66 * %HWSIM_ATTR_ADDR_TRANSMITTER, %HWSIM_ATTR_FLAGS, 66 * %HWSIM_ATTR_ADDR_TRANSMITTER, %HWSIM_ATTR_FLAGS,
67 * %HWSIM_ATTR_TX_INFO, %HWSIM_ATTR_SIGNAL, %HWSIM_ATTR_COOKIE 67 * %HWSIM_ATTR_TX_INFO, %HWSIM_ATTR_SIGNAL, %HWSIM_ATTR_COOKIE
68 * @HWSIM_CMD_CREATE_RADIO: create a new radio with the given parameters,
69 * returns the radio ID (>= 0) or negative on errors
70 * @HWSIM_CMD_DESTROY_RADIO: destroy a radio
68 * @__HWSIM_CMD_MAX: enum limit 71 * @__HWSIM_CMD_MAX: enum limit
69 */ 72 */
70enum { 73enum {
@@ -72,6 +75,8 @@ enum {
72 HWSIM_CMD_REGISTER, 75 HWSIM_CMD_REGISTER,
73 HWSIM_CMD_FRAME, 76 HWSIM_CMD_FRAME,
74 HWSIM_CMD_TX_INFO_FRAME, 77 HWSIM_CMD_TX_INFO_FRAME,
78 HWSIM_CMD_CREATE_RADIO,
79 HWSIM_CMD_DESTROY_RADIO,
75 __HWSIM_CMD_MAX, 80 __HWSIM_CMD_MAX,
76}; 81};
77#define HWSIM_CMD_MAX (_HWSIM_CMD_MAX - 1) 82#define HWSIM_CMD_MAX (_HWSIM_CMD_MAX - 1)
@@ -94,6 +99,10 @@ enum {
94 space 99 space
95 * @HWSIM_ATTR_TX_INFO: ieee80211_tx_rate array 100 * @HWSIM_ATTR_TX_INFO: ieee80211_tx_rate array
96 * @HWSIM_ATTR_COOKIE: sk_buff cookie to identify the frame 101 * @HWSIM_ATTR_COOKIE: sk_buff cookie to identify the frame
102 * @HWSIM_ATTR_CHANNELS: u32 attribute used with the %HWSIM_CMD_CREATE_RADIO
103 * command giving the number of channels supported by the new radio
104 * @HWSIM_ATTR_RADIO_ID: u32 attribute used with %HWSIM_CMD_DESTROY_RADIO
105 * only to destroy a radio
97 * @__HWSIM_ATTR_MAX: enum limit 106 * @__HWSIM_ATTR_MAX: enum limit
98 */ 107 */
99 108
@@ -108,6 +117,8 @@ enum {
108 HWSIM_ATTR_SIGNAL, 117 HWSIM_ATTR_SIGNAL,
109 HWSIM_ATTR_TX_INFO, 118 HWSIM_ATTR_TX_INFO,
110 HWSIM_ATTR_COOKIE, 119 HWSIM_ATTR_COOKIE,
120 HWSIM_ATTR_CHANNELS,
121 HWSIM_ATTR_RADIO_ID,
111 __HWSIM_ATTR_MAX, 122 __HWSIM_ATTR_MAX,
112}; 123};
113#define HWSIM_ATTR_MAX (__HWSIM_ATTR_MAX - 1) 124#define HWSIM_ATTR_MAX (__HWSIM_ATTR_MAX - 1)