diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-12-18 20:03:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:59:51 -0500 |
commit | 5727ef1b2e797a1922f5bc239b6afb2b4cfb80bc (patch) | |
tree | 16fb0c8afcb1c5282fcc45ffa90c8e34b0daa6d4 /include/linux | |
parent | ed1b6cc7f80f831e192704b05b9917f9cc37be15 (diff) |
cfg80211/nl80211: station handling
This patch adds station handling to cfg80211/nl80211.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nl80211.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index f1e455a8b4de..85e2d7d1f9e3 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -7,6 +7,18 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * DOC: Station handling | ||
11 | * | ||
12 | * Stations are added per interface, but a special case exists with VLAN | ||
13 | * interfaces. When a station is bound to an AP interface, it may be moved | ||
14 | * into a VLAN identified by a VLAN interface index (%NL80211_ATTR_STA_VLAN). | ||
15 | * The station is still assumed to belong to the AP interface it was added | ||
16 | * to. | ||
17 | * | ||
18 | * TODO: need more info? | ||
19 | */ | ||
20 | |||
21 | /** | ||
10 | * enum nl80211_commands - supported nl80211 commands | 22 | * enum nl80211_commands - supported nl80211 commands |
11 | * | 23 | * |
12 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors | 24 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors |
@@ -56,6 +68,16 @@ | |||
56 | * parameters are like for %NL80211_CMD_SET_BEACON. | 68 | * parameters are like for %NL80211_CMD_SET_BEACON. |
57 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it | 69 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it |
58 | * | 70 | * |
71 | * @NL80211_CMD_GET_STATION: Get station attributes for station identified by | ||
72 | * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. | ||
73 | * @NL80211_CMD_SET_STATION: Set station attributes for station identified by | ||
74 | * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX. | ||
75 | * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the | ||
76 | * the interface identified by %NL80211_ATTR_IFINDEX. | ||
77 | * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC | ||
78 | * or, if no MAC address given, all stations, on the interface identified | ||
79 | * by %NL80211_ATTR_IFINDEX. | ||
80 | * | ||
59 | * @NL80211_CMD_MAX: highest used command number | 81 | * @NL80211_CMD_MAX: highest used command number |
60 | * @__NL80211_CMD_AFTER_LAST: internal use | 82 | * @__NL80211_CMD_AFTER_LAST: internal use |
61 | */ | 83 | */ |
@@ -83,6 +105,11 @@ enum nl80211_commands { | |||
83 | NL80211_CMD_NEW_BEACON, | 105 | NL80211_CMD_NEW_BEACON, |
84 | NL80211_CMD_DEL_BEACON, | 106 | NL80211_CMD_DEL_BEACON, |
85 | 107 | ||
108 | NL80211_CMD_GET_STATION, | ||
109 | NL80211_CMD_SET_STATION, | ||
110 | NL80211_CMD_NEW_STATION, | ||
111 | NL80211_CMD_DEL_STATION, | ||
112 | |||
86 | /* add commands here */ | 113 | /* add commands here */ |
87 | 114 | ||
88 | /* used to define NL80211_CMD_MAX below */ | 115 | /* used to define NL80211_CMD_MAX below */ |
@@ -120,6 +147,17 @@ enum nl80211_commands { | |||
120 | * @NL80211_ATTR_BEACON_HEAD: portion of the beacon before the TIM IE | 147 | * @NL80211_ATTR_BEACON_HEAD: portion of the beacon before the TIM IE |
121 | * @NL80211_ATTR_BEACON_TAIL: portion of the beacon after the TIM IE | 148 | * @NL80211_ATTR_BEACON_TAIL: portion of the beacon after the TIM IE |
122 | * | 149 | * |
150 | * @NL80211_ATTR_STA_AID: Association ID for the station (u16) | ||
151 | * @NL80211_ATTR_STA_FLAGS: flags, nested element with NLA_FLAG attributes of | ||
152 | * &enum nl80211_sta_flags. | ||
153 | * @NL80211_ATTR_STA_LISTEN_INTERVAL: listen interval as defined by | ||
154 | * IEEE 802.11 7.3.1.6 (u16). | ||
155 | * @NL80211_ATTR_STA_SUPPORTED_RATES: supported rates, array of supported | ||
156 | * rates as defined by IEEE 802.11 7.3.2.2 but without the length | ||
157 | * restriction (at most %NL80211_MAX_SUPP_RATES). | ||
158 | * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station | ||
159 | * to, or the AP interface the station was originally added to to. | ||
160 | * | ||
123 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 161 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
124 | * @__NL80211_ATTR_AFTER_LAST: internal use | 162 | * @__NL80211_ATTR_AFTER_LAST: internal use |
125 | */ | 163 | */ |
@@ -147,12 +185,20 @@ enum nl80211_attrs { | |||
147 | NL80211_ATTR_BEACON_HEAD, | 185 | NL80211_ATTR_BEACON_HEAD, |
148 | NL80211_ATTR_BEACON_TAIL, | 186 | NL80211_ATTR_BEACON_TAIL, |
149 | 187 | ||
188 | NL80211_ATTR_STA_AID, | ||
189 | NL80211_ATTR_STA_FLAGS, | ||
190 | NL80211_ATTR_STA_LISTEN_INTERVAL, | ||
191 | NL80211_ATTR_STA_SUPPORTED_RATES, | ||
192 | NL80211_ATTR_STA_VLAN, | ||
193 | |||
150 | /* add attributes here, update the policy in nl80211.c */ | 194 | /* add attributes here, update the policy in nl80211.c */ |
151 | 195 | ||
152 | __NL80211_ATTR_AFTER_LAST, | 196 | __NL80211_ATTR_AFTER_LAST, |
153 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | 197 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
154 | }; | 198 | }; |
155 | 199 | ||
200 | #define NL80211_MAX_SUPP_RATES 32 | ||
201 | |||
156 | /** | 202 | /** |
157 | * enum nl80211_iftype - (virtual) interface types | 203 | * enum nl80211_iftype - (virtual) interface types |
158 | * | 204 | * |
@@ -184,4 +230,26 @@ enum nl80211_iftype { | |||
184 | NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 | 230 | NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1 |
185 | }; | 231 | }; |
186 | 232 | ||
233 | /** | ||
234 | * enum nl80211_sta_flags - station flags | ||
235 | * | ||
236 | * Station flags. When a station is added to an AP interface, it is | ||
237 | * assumed to be already associated (and hence authenticated.) | ||
238 | * | ||
239 | * @NL80211_STA_FLAG_AUTHORIZED: station is authorized (802.1X) | ||
240 | * @NL80211_STA_FLAG_SHORT_PREAMBLE: station is capable of receiving frames | ||
241 | * with short barker preamble | ||
242 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | ||
243 | */ | ||
244 | enum nl80211_sta_flags { | ||
245 | __NL80211_STA_FLAG_INVALID, | ||
246 | NL80211_STA_FLAG_AUTHORIZED, | ||
247 | NL80211_STA_FLAG_SHORT_PREAMBLE, | ||
248 | NL80211_STA_FLAG_WME, | ||
249 | |||
250 | /* keep last */ | ||
251 | __NL80211_STA_FLAG_AFTER_LAST, | ||
252 | NL80211_STA_FLAG_MAX = __NL80211_STA_FLAG_AFTER_LAST - 1 | ||
253 | }; | ||
254 | |||
187 | #endif /* __LINUX_NL80211_H */ | 255 | #endif /* __LINUX_NL80211_H */ |