diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 51 | ||||
-rw-r--r-- | include/net/cfg80211.h | 54 | ||||
-rw-r--r-- | include/net/mac80211.h | 6 | ||||
-rw-r--r-- | include/pcmcia/device_id.h | 5 |
4 files changed, 110 insertions, 6 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 127a73015760..28ba20fda3e2 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * 802.11 netlink interface public header | 4 | * 802.11 netlink interface public header |
5 | * | 5 | * |
6 | * Copyright 2006, 2007, 2008 Johannes Berg <johannes@sipsolutions.net> | 6 | * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> |
7 | * Copyright 2008 Michael Wu <flamingice@sourmilk.net> | 7 | * Copyright 2008 Michael Wu <flamingice@sourmilk.net> |
8 | * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com> | 8 | * Copyright 2008 Luis Carlos Cobo <luisca@cozybit.com> |
9 | * Copyright 2008 Michael Buesch <mb@bu3sch.de> | 9 | * Copyright 2008 Michael Buesch <mb@bu3sch.de> |
@@ -299,6 +299,31 @@ | |||
299 | * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface | 299 | * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface |
300 | * and @NL80211_ATTR_TX_RATES the set of allowed rates. | 300 | * and @NL80211_ATTR_TX_RATES the set of allowed rates. |
301 | * | 301 | * |
302 | * @NL80211_CMD_REGISTER_ACTION: Register for receiving certain action frames | ||
303 | * (via @NL80211_CMD_ACTION) for processing in userspace. This command | ||
304 | * requires an interface index and a match attribute containing the first | ||
305 | * few bytes of the frame that should match, e.g. a single byte for only | ||
306 | * a category match or four bytes for vendor frames including the OUI. | ||
307 | * The registration cannot be dropped, but is removed automatically | ||
308 | * when the netlink socket is closed. Multiple registrations can be made. | ||
309 | * @NL80211_CMD_ACTION: Action frame TX request and RX notification. This | ||
310 | * command is used both as a request to transmit an Action frame and as an | ||
311 | * event indicating reception of an Action frame that was not processed in | ||
312 | * kernel code, but is for us (i.e., which may need to be processed in a | ||
313 | * user space application). %NL80211_ATTR_FRAME is used to specify the | ||
314 | * frame contents (including header). %NL80211_ATTR_WIPHY_FREQ (and | ||
315 | * optionally %NL80211_ATTR_WIPHY_CHANNEL_TYPE) is used to indicate on | ||
316 | * which channel the frame is to be transmitted or was received. This | ||
317 | * channel has to be the current channel (remain-on-channel or the | ||
318 | * operational channel). When called, this operation returns a cookie | ||
319 | * (%NL80211_ATTR_COOKIE) that will be included with the TX status event | ||
320 | * pertaining to the TX request. | ||
321 | * @NL80211_CMD_ACTION_TX_STATUS: Report TX status of an Action frame | ||
322 | * transmitted with %NL80211_CMD_ACTION. %NL80211_ATTR_COOKIE identifies | ||
323 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the | ||
324 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged | ||
325 | * the frame. | ||
326 | * | ||
302 | * @NL80211_CMD_MAX: highest used command number | 327 | * @NL80211_CMD_MAX: highest used command number |
303 | * @__NL80211_CMD_AFTER_LAST: internal use | 328 | * @__NL80211_CMD_AFTER_LAST: internal use |
304 | */ | 329 | */ |
@@ -387,6 +412,13 @@ enum nl80211_commands { | |||
387 | 412 | ||
388 | NL80211_CMD_SET_TX_BITRATE_MASK, | 413 | NL80211_CMD_SET_TX_BITRATE_MASK, |
389 | 414 | ||
415 | NL80211_CMD_REGISTER_ACTION, | ||
416 | NL80211_CMD_ACTION, | ||
417 | NL80211_CMD_ACTION_TX_STATUS, | ||
418 | |||
419 | NL80211_CMD_SET_POWER_SAVE, | ||
420 | NL80211_CMD_GET_POWER_SAVE, | ||
421 | |||
390 | /* add new commands above here */ | 422 | /* add new commands above here */ |
391 | 423 | ||
392 | /* used to define NL80211_CMD_MAX below */ | 424 | /* used to define NL80211_CMD_MAX below */ |
@@ -653,6 +685,12 @@ enum nl80211_commands { | |||
653 | * rates based on negotiated supported rates information. This attribute | 685 | * rates based on negotiated supported rates information. This attribute |
654 | * is used with %NL80211_CMD_SET_TX_BITRATE_MASK. | 686 | * is used with %NL80211_CMD_SET_TX_BITRATE_MASK. |
655 | * | 687 | * |
688 | * @NL80211_ATTR_FRAME_MATCH: A binary attribute which typically must contain | ||
689 | * at least one byte, currently used with @NL80211_CMD_REGISTER_ACTION. | ||
690 | * | ||
691 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was | ||
692 | * acknowledged by the recipient. | ||
693 | * | ||
656 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 694 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
657 | * @__NL80211_ATTR_AFTER_LAST: internal use | 695 | * @__NL80211_ATTR_AFTER_LAST: internal use |
658 | */ | 696 | */ |
@@ -798,6 +836,12 @@ enum nl80211_attrs { | |||
798 | 836 | ||
799 | NL80211_ATTR_TX_RATES, | 837 | NL80211_ATTR_TX_RATES, |
800 | 838 | ||
839 | NL80211_ATTR_FRAME_MATCH, | ||
840 | |||
841 | NL80211_ATTR_ACK, | ||
842 | |||
843 | NL80211_ATTR_PS_STATE, | ||
844 | |||
801 | /* add attributes here, update the policy in nl80211.c */ | 845 | /* add attributes here, update the policy in nl80211.c */ |
802 | 846 | ||
803 | __NL80211_ATTR_AFTER_LAST, | 847 | __NL80211_ATTR_AFTER_LAST, |
@@ -1534,4 +1578,9 @@ enum nl80211_band { | |||
1534 | NL80211_BAND_5GHZ, | 1578 | NL80211_BAND_5GHZ, |
1535 | }; | 1579 | }; |
1536 | 1580 | ||
1581 | enum nl80211_ps_state { | ||
1582 | NL80211_PS_DISABLED, | ||
1583 | NL80211_PS_ENABLED, | ||
1584 | }; | ||
1585 | |||
1537 | #endif /* __LINUX_NL80211_H */ | 1586 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 5b3569b2a74c..3d134a1fb96b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * 802.11 device and configuration interface | 4 | * 802.11 device and configuration interface |
5 | * | 5 | * |
6 | * Copyright 2006-2009 Johannes Berg <johannes@sipsolutions.net> | 6 | * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -998,6 +998,7 @@ struct cfg80211_pmksa { | |||
998 | * @cancel_remain_on_channel: Cancel an on-going remain-on-channel operation. | 998 | * @cancel_remain_on_channel: Cancel an on-going remain-on-channel operation. |
999 | * This allows the operation to be terminated prior to timeout based on | 999 | * This allows the operation to be terminated prior to timeout based on |
1000 | * the duration value. | 1000 | * the duration value. |
1001 | * @action: Transmit an action frame | ||
1001 | * | 1002 | * |
1002 | * @testmode_cmd: run a test mode command | 1003 | * @testmode_cmd: run a test mode command |
1003 | * | 1004 | * |
@@ -1144,7 +1145,11 @@ struct cfg80211_ops { | |||
1144 | struct net_device *dev, | 1145 | struct net_device *dev, |
1145 | u64 cookie); | 1146 | u64 cookie); |
1146 | 1147 | ||
1147 | /* some temporary stuff to finish wext */ | 1148 | int (*action)(struct wiphy *wiphy, struct net_device *dev, |
1149 | struct ieee80211_channel *chan, | ||
1150 | enum nl80211_channel_type channel_type, | ||
1151 | const u8 *buf, size_t len, u64 *cookie); | ||
1152 | |||
1148 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | 1153 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, |
1149 | bool enabled, int timeout); | 1154 | bool enabled, int timeout); |
1150 | }; | 1155 | }; |
@@ -1445,6 +1450,8 @@ struct cfg80211_cached_keys; | |||
1445 | * set by driver (if supported) on add_interface BEFORE registering the | 1450 | * set by driver (if supported) on add_interface BEFORE registering the |
1446 | * netdev and may otherwise be used by driver read-only, will be update | 1451 | * netdev and may otherwise be used by driver read-only, will be update |
1447 | * by cfg80211 on change_interface | 1452 | * by cfg80211 on change_interface |
1453 | * @action_registrations: list of registrations for action frames | ||
1454 | * @action_registrations_lock: lock for the list | ||
1448 | */ | 1455 | */ |
1449 | struct wireless_dev { | 1456 | struct wireless_dev { |
1450 | struct wiphy *wiphy; | 1457 | struct wiphy *wiphy; |
@@ -1454,6 +1461,9 @@ struct wireless_dev { | |||
1454 | struct list_head list; | 1461 | struct list_head list; |
1455 | struct net_device *netdev; | 1462 | struct net_device *netdev; |
1456 | 1463 | ||
1464 | struct list_head action_registrations; | ||
1465 | spinlock_t action_registrations_lock; | ||
1466 | |||
1457 | struct mutex mtx; | 1467 | struct mutex mtx; |
1458 | 1468 | ||
1459 | struct work_struct cleanup_work; | 1469 | struct work_struct cleanup_work; |
@@ -1478,6 +1488,9 @@ struct wireless_dev { | |||
1478 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; | 1488 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; |
1479 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ | 1489 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ |
1480 | 1490 | ||
1491 | bool ps; | ||
1492 | int ps_timeout; | ||
1493 | |||
1481 | #ifdef CONFIG_CFG80211_WEXT | 1494 | #ifdef CONFIG_CFG80211_WEXT |
1482 | /* wext data */ | 1495 | /* wext data */ |
1483 | struct { | 1496 | struct { |
@@ -1489,8 +1502,7 @@ struct wireless_dev { | |||
1489 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; | 1502 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; |
1490 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1503 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1491 | s8 default_key, default_mgmt_key; | 1504 | s8 default_key, default_mgmt_key; |
1492 | bool ps, prev_bssid_valid; | 1505 | bool prev_bssid_valid; |
1493 | int ps_timeout; | ||
1494 | } wext; | 1506 | } wext; |
1495 | #endif | 1507 | #endif |
1496 | }; | 1508 | }; |
@@ -2291,4 +2303,38 @@ void cfg80211_remain_on_channel_expired(struct net_device *dev, | |||
2291 | void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr, | 2303 | void cfg80211_new_sta(struct net_device *dev, const u8 *mac_addr, |
2292 | struct station_info *sinfo, gfp_t gfp); | 2304 | struct station_info *sinfo, gfp_t gfp); |
2293 | 2305 | ||
2306 | /** | ||
2307 | * cfg80211_rx_action - notification of received, unprocessed Action frame | ||
2308 | * @dev: network device | ||
2309 | * @freq: Frequency on which the frame was received in MHz | ||
2310 | * @buf: Action frame (header + body) | ||
2311 | * @len: length of the frame data | ||
2312 | * @gfp: context flags | ||
2313 | * Returns %true if a user space application is responsible for rejecting the | ||
2314 | * unrecognized Action frame; %false if no such application is registered | ||
2315 | * (i.e., the driver is responsible for rejecting the unrecognized Action | ||
2316 | * frame) | ||
2317 | * | ||
2318 | * This function is called whenever an Action frame is received for a station | ||
2319 | * mode interface, but is not processed in kernel. | ||
2320 | */ | ||
2321 | bool cfg80211_rx_action(struct net_device *dev, int freq, const u8 *buf, | ||
2322 | size_t len, gfp_t gfp); | ||
2323 | |||
2324 | /** | ||
2325 | * cfg80211_action_tx_status - notification of TX status for Action frame | ||
2326 | * @dev: network device | ||
2327 | * @cookie: Cookie returned by cfg80211_ops::action() | ||
2328 | * @buf: Action frame (header + body) | ||
2329 | * @len: length of the frame data | ||
2330 | * @ack: Whether frame was acknowledged | ||
2331 | * @gfp: context flags | ||
2332 | * | ||
2333 | * This function is called whenever an Action frame was requested to be | ||
2334 | * transmitted with cfg80211_ops::action() to report the TX status of the | ||
2335 | * transmission attempt. | ||
2336 | */ | ||
2337 | void cfg80211_action_tx_status(struct net_device *dev, u64 cookie, | ||
2338 | const u8 *buf, size_t len, bool ack, gfp_t gfp); | ||
2339 | |||
2294 | #endif /* __NET_CFG80211_H */ | 2340 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 314e98173166..80eb7cc42ce9 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright 2002-2005, Devicescape Software, Inc. | 4 | * Copyright 2002-2005, Devicescape Software, Inc. |
5 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 5 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
6 | * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net> | 6 | * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -264,6 +264,9 @@ struct ieee80211_bss_conf { | |||
264 | * be modified again (no seqno assignment, crypto, etc.) | 264 | * be modified again (no seqno assignment, crypto, etc.) |
265 | * @IEEE80211_TX_INTFL_HAS_RADIOTAP: This frame was injected and still | 265 | * @IEEE80211_TX_INTFL_HAS_RADIOTAP: This frame was injected and still |
266 | * has a radiotap header at skb->data. | 266 | * has a radiotap header at skb->data. |
267 | * @IEEE80211_TX_INTFL_NL80211_FRAME_TX: Frame was requested through nl80211 | ||
268 | * MLME command (internal to mac80211 to figure out whether to send TX | ||
269 | * status to user space) | ||
267 | */ | 270 | */ |
268 | enum mac80211_tx_control_flags { | 271 | enum mac80211_tx_control_flags { |
269 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 272 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -286,6 +289,7 @@ enum mac80211_tx_control_flags { | |||
286 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), | 289 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), |
287 | IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), | 290 | IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), |
288 | IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20), | 291 | IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20), |
292 | IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21), | ||
289 | }; | 293 | }; |
290 | 294 | ||
291 | /** | 295 | /** |
diff --git a/include/pcmcia/device_id.h b/include/pcmcia/device_id.h index c33ea08352b8..63e5b8f6b7dd 100644 --- a/include/pcmcia/device_id.h +++ b/include/pcmcia/device_id.h | |||
@@ -34,6 +34,11 @@ | |||
34 | .prod_id = { NULL, (v2), NULL, NULL }, \ | 34 | .prod_id = { NULL, (v2), NULL, NULL }, \ |
35 | .prod_id_hash = { 0, (vh2), 0, 0 }, } | 35 | .prod_id_hash = { 0, (vh2), 0, 0 }, } |
36 | 36 | ||
37 | #define PCMCIA_DEVICE_PROD_ID3(v3, vh3) { \ | ||
38 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID3, \ | ||
39 | .prod_id = { NULL, NULL, (v3), NULL }, \ | ||
40 | .prod_id_hash = { 0, 0, (vh3), 0 }, } | ||
41 | |||
37 | #define PCMCIA_DEVICE_PROD_ID12(v1, v2, vh1, vh2) { \ | 42 | #define PCMCIA_DEVICE_PROD_ID12(v1, v2, vh1, vh2) { \ |
38 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ | 43 | .match_flags = PCMCIA_DEV_ID_MATCH_PROD_ID1| \ |
39 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ | 44 | PCMCIA_DEV_ID_MATCH_PROD_ID2, \ |