diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-10-11 15:35:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-11 15:35:42 -0400 |
commit | 094daf7db7c47861009899ce23f9177d761e20b0 (patch) | |
tree | a107065393720b80664157a035b206576e834793 /include | |
parent | 3ed6f6958c0ac21958285d8648f14d34da4bbcb3 (diff) | |
parent | 5f68a2b0a890d086e40fc7b55f4a0c32c28bc0d2 (diff) |
Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts:
Documentation/feature-removal-schedule.txt
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 85 | ||||
-rw-r--r-- | include/linux/if_ether.h | 1 | ||||
-rw-r--r-- | include/linux/nl80211.h | 44 | ||||
-rw-r--r-- | include/linux/rfkill-gpio.h | 4 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 3 | ||||
-rw-r--r-- | include/net/cfg80211.h | 29 | ||||
-rw-r--r-- | include/net/ieee80211_radiotap.h | 1 | ||||
-rw-r--r-- | include/net/mac80211.h | 229 |
8 files changed, 381 insertions, 15 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index b5e0a5c344fd..48363c3c40f8 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -759,6 +759,12 @@ struct ieee80211_mgmt { | |||
759 | u8 action; | 759 | u8 action; |
760 | u8 smps_control; | 760 | u8 smps_control; |
761 | } __attribute__ ((packed)) ht_smps; | 761 | } __attribute__ ((packed)) ht_smps; |
762 | struct { | ||
763 | u8 action_code; | ||
764 | u8 dialog_token; | ||
765 | __le16 capability; | ||
766 | u8 variable[0]; | ||
767 | } __packed tdls_discover_resp; | ||
762 | } u; | 768 | } u; |
763 | } __attribute__ ((packed)) action; | 769 | } __attribute__ ((packed)) action; |
764 | } u; | 770 | } u; |
@@ -805,6 +811,52 @@ struct ieee80211_pspoll { | |||
805 | u8 ta[6]; | 811 | u8 ta[6]; |
806 | } __attribute__ ((packed)); | 812 | } __attribute__ ((packed)); |
807 | 813 | ||
814 | /* TDLS */ | ||
815 | |||
816 | /* Link-id information element */ | ||
817 | struct ieee80211_tdls_lnkie { | ||
818 | u8 ie_type; /* Link Identifier IE */ | ||
819 | u8 ie_len; | ||
820 | u8 bssid[6]; | ||
821 | u8 init_sta[6]; | ||
822 | u8 resp_sta[6]; | ||
823 | } __packed; | ||
824 | |||
825 | struct ieee80211_tdls_data { | ||
826 | u8 da[6]; | ||
827 | u8 sa[6]; | ||
828 | __be16 ether_type; | ||
829 | u8 payload_type; | ||
830 | u8 category; | ||
831 | u8 action_code; | ||
832 | union { | ||
833 | struct { | ||
834 | u8 dialog_token; | ||
835 | __le16 capability; | ||
836 | u8 variable[0]; | ||
837 | } __packed setup_req; | ||
838 | struct { | ||
839 | __le16 status_code; | ||
840 | u8 dialog_token; | ||
841 | __le16 capability; | ||
842 | u8 variable[0]; | ||
843 | } __packed setup_resp; | ||
844 | struct { | ||
845 | __le16 status_code; | ||
846 | u8 dialog_token; | ||
847 | u8 variable[0]; | ||
848 | } __packed setup_cfm; | ||
849 | struct { | ||
850 | __le16 reason_code; | ||
851 | u8 variable[0]; | ||
852 | } __packed teardown; | ||
853 | struct { | ||
854 | u8 dialog_token; | ||
855 | u8 variable[0]; | ||
856 | } __packed discover_req; | ||
857 | } u; | ||
858 | } __packed; | ||
859 | |||
808 | /** | 860 | /** |
809 | * struct ieee80211_bar - HT Block Ack Request | 861 | * struct ieee80211_bar - HT Block Ack Request |
810 | * | 862 | * |
@@ -1196,6 +1248,8 @@ enum ieee80211_eid { | |||
1196 | WLAN_EID_TS_DELAY = 43, | 1248 | WLAN_EID_TS_DELAY = 43, |
1197 | WLAN_EID_TCLAS_PROCESSING = 44, | 1249 | WLAN_EID_TCLAS_PROCESSING = 44, |
1198 | WLAN_EID_QOS_CAPA = 46, | 1250 | WLAN_EID_QOS_CAPA = 46, |
1251 | /* 802.11z */ | ||
1252 | WLAN_EID_LINK_ID = 101, | ||
1199 | /* 802.11s */ | 1253 | /* 802.11s */ |
1200 | WLAN_EID_MESH_CONFIG = 113, | 1254 | WLAN_EID_MESH_CONFIG = 113, |
1201 | WLAN_EID_MESH_ID = 114, | 1255 | WLAN_EID_MESH_ID = 114, |
@@ -1279,6 +1333,7 @@ enum ieee80211_category { | |||
1279 | WLAN_CATEGORY_HT = 7, | 1333 | WLAN_CATEGORY_HT = 7, |
1280 | WLAN_CATEGORY_SA_QUERY = 8, | 1334 | WLAN_CATEGORY_SA_QUERY = 8, |
1281 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, | 1335 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, |
1336 | WLAN_CATEGORY_TDLS = 12, | ||
1282 | WLAN_CATEGORY_MESH_ACTION = 13, | 1337 | WLAN_CATEGORY_MESH_ACTION = 13, |
1283 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1338 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
1284 | WLAN_CATEGORY_SELF_PROTECTED = 15, | 1339 | WLAN_CATEGORY_SELF_PROTECTED = 15, |
@@ -1342,6 +1397,36 @@ enum ieee80211_key_len { | |||
1342 | WLAN_KEY_LEN_AES_CMAC = 16, | 1397 | WLAN_KEY_LEN_AES_CMAC = 16, |
1343 | }; | 1398 | }; |
1344 | 1399 | ||
1400 | /* Public action codes */ | ||
1401 | enum ieee80211_pub_actioncode { | ||
1402 | WLAN_PUB_ACTION_TDLS_DISCOVER_RES = 14, | ||
1403 | }; | ||
1404 | |||
1405 | /* TDLS action codes */ | ||
1406 | enum ieee80211_tdls_actioncode { | ||
1407 | WLAN_TDLS_SETUP_REQUEST = 0, | ||
1408 | WLAN_TDLS_SETUP_RESPONSE = 1, | ||
1409 | WLAN_TDLS_SETUP_CONFIRM = 2, | ||
1410 | WLAN_TDLS_TEARDOWN = 3, | ||
1411 | WLAN_TDLS_PEER_TRAFFIC_INDICATION = 4, | ||
1412 | WLAN_TDLS_CHANNEL_SWITCH_REQUEST = 5, | ||
1413 | WLAN_TDLS_CHANNEL_SWITCH_RESPONSE = 6, | ||
1414 | WLAN_TDLS_PEER_PSM_REQUEST = 7, | ||
1415 | WLAN_TDLS_PEER_PSM_RESPONSE = 8, | ||
1416 | WLAN_TDLS_PEER_TRAFFIC_RESPONSE = 9, | ||
1417 | WLAN_TDLS_DISCOVERY_REQUEST = 10, | ||
1418 | }; | ||
1419 | |||
1420 | /* | ||
1421 | * TDLS capabililites to be enabled in the 5th byte of the | ||
1422 | * @WLAN_EID_EXT_CAPABILITY information element | ||
1423 | */ | ||
1424 | #define WLAN_EXT_CAPA5_TDLS_ENABLED BIT(5) | ||
1425 | #define WLAN_EXT_CAPA5_TDLS_PROHIBITED BIT(6) | ||
1426 | |||
1427 | /* TDLS specific payload type in the LLC/SNAP header */ | ||
1428 | #define WLAN_TDLS_SNAP_RFTYPE 0x2 | ||
1429 | |||
1345 | /** | 1430 | /** |
1346 | * enum - mesh path selection protocol identifier | 1431 | * enum - mesh path selection protocol identifier |
1347 | * | 1432 | * |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index c63bbd754a84..e473003e4bda 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -83,6 +83,7 @@ | |||
83 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ | 83 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ |
84 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | 84 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ |
85 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | 85 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ |
86 | #define ETH_P_TDLS 0x890D /* TDLS */ | ||
86 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ | 87 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ |
87 | #define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 88 | #define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
88 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 89 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index c73582fb9d20..9d797f253d8e 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -506,6 +506,9 @@ | |||
506 | * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace | 506 | * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace |
507 | * of PMKSA caching dandidates. | 507 | * of PMKSA caching dandidates. |
508 | * | 508 | * |
509 | * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup). | ||
510 | * @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame. | ||
511 | * | ||
509 | * @NL80211_CMD_MAX: highest used command number | 512 | * @NL80211_CMD_MAX: highest used command number |
510 | * @__NL80211_CMD_AFTER_LAST: internal use | 513 | * @__NL80211_CMD_AFTER_LAST: internal use |
511 | */ | 514 | */ |
@@ -632,6 +635,9 @@ enum nl80211_commands { | |||
632 | 635 | ||
633 | NL80211_CMD_PMKSA_CANDIDATE, | 636 | NL80211_CMD_PMKSA_CANDIDATE, |
634 | 637 | ||
638 | NL80211_CMD_TDLS_OPER, | ||
639 | NL80211_CMD_TDLS_MGMT, | ||
640 | |||
635 | /* add new commands above here */ | 641 | /* add new commands above here */ |
636 | 642 | ||
637 | /* used to define NL80211_CMD_MAX below */ | 643 | /* used to define NL80211_CMD_MAX below */ |
@@ -1089,6 +1095,20 @@ enum nl80211_commands { | |||
1089 | * This attribute is used with %NL80211_CMD_TRIGGER_SCAN and | 1095 | * This attribute is used with %NL80211_CMD_TRIGGER_SCAN and |
1090 | * %NL80211_CMD_FRAME commands. | 1096 | * %NL80211_CMD_FRAME commands. |
1091 | * | 1097 | * |
1098 | * @NL80211_ATTR_TDLS_ACTION: Low level TDLS action code (e.g. link setup | ||
1099 | * request, link setup confirm, link teardown, etc.). Values are | ||
1100 | * described in the TDLS (802.11z) specification. | ||
1101 | * @NL80211_ATTR_TDLS_DIALOG_TOKEN: Non-zero token for uniquely identifying a | ||
1102 | * TDLS conversation between two devices. | ||
1103 | * @NL80211_ATTR_TDLS_OPERATION: High level TDLS operation; see | ||
1104 | * &enum nl80211_tdls_operation, represented as a u8. | ||
1105 | * @NL80211_ATTR_TDLS_SUPPORT: A flag indicating the device can operate | ||
1106 | * as a TDLS peer sta. | ||
1107 | * @NL80211_ATTR_TDLS_EXTERNAL_SETUP: The TDLS discovery/setup and teardown | ||
1108 | * procedures should be performed by sending TDLS packets via | ||
1109 | * %NL80211_CMD_TDLS_MGMT. Otherwise %NL80211_CMD_TDLS_OPER should be | ||
1110 | * used for asking the driver to perform a TDLS operation. | ||
1111 | * | ||
1092 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1112 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1093 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1113 | * @__NL80211_ATTR_AFTER_LAST: internal use |
1094 | */ | 1114 | */ |
@@ -1311,6 +1331,12 @@ enum nl80211_attrs { | |||
1311 | 1331 | ||
1312 | NL80211_ATTR_TX_NO_CCK_RATE, | 1332 | NL80211_ATTR_TX_NO_CCK_RATE, |
1313 | 1333 | ||
1334 | NL80211_ATTR_TDLS_ACTION, | ||
1335 | NL80211_ATTR_TDLS_DIALOG_TOKEN, | ||
1336 | NL80211_ATTR_TDLS_OPERATION, | ||
1337 | NL80211_ATTR_TDLS_SUPPORT, | ||
1338 | NL80211_ATTR_TDLS_EXTERNAL_SETUP, | ||
1339 | |||
1314 | /* add attributes here, update the policy in nl80211.c */ | 1340 | /* add attributes here, update the policy in nl80211.c */ |
1315 | 1341 | ||
1316 | __NL80211_ATTR_AFTER_LAST, | 1342 | __NL80211_ATTR_AFTER_LAST, |
@@ -1408,6 +1434,7 @@ enum nl80211_iftype { | |||
1408 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 1434 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
1409 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | 1435 | * @NL80211_STA_FLAG_MFP: station uses management frame protection |
1410 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated | 1436 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated |
1437 | * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer | ||
1411 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1438 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
1412 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1439 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
1413 | */ | 1440 | */ |
@@ -1418,6 +1445,7 @@ enum nl80211_sta_flags { | |||
1418 | NL80211_STA_FLAG_WME, | 1445 | NL80211_STA_FLAG_WME, |
1419 | NL80211_STA_FLAG_MFP, | 1446 | NL80211_STA_FLAG_MFP, |
1420 | NL80211_STA_FLAG_AUTHENTICATED, | 1447 | NL80211_STA_FLAG_AUTHENTICATED, |
1448 | NL80211_STA_FLAG_TDLS_PEER, | ||
1421 | 1449 | ||
1422 | /* keep last */ | 1450 | /* keep last */ |
1423 | __NL80211_STA_FLAG_AFTER_LAST, | 1451 | __NL80211_STA_FLAG_AFTER_LAST, |
@@ -2604,4 +2632,20 @@ enum nl80211_pmksa_candidate_attr { | |||
2604 | MAX_NL80211_PMKSA_CANDIDATE = NUM_NL80211_PMKSA_CANDIDATE - 1 | 2632 | MAX_NL80211_PMKSA_CANDIDATE = NUM_NL80211_PMKSA_CANDIDATE - 1 |
2605 | }; | 2633 | }; |
2606 | 2634 | ||
2635 | /** | ||
2636 | * enum nl80211_tdls_operation - values for %NL80211_ATTR_TDLS_OPERATION | ||
2637 | * @NL80211_TDLS_DISCOVERY_REQ: Send a TDLS discovery request | ||
2638 | * @NL80211_TDLS_SETUP: Setup TDLS link | ||
2639 | * @NL80211_TDLS_TEARDOWN: Teardown a TDLS link which is already established | ||
2640 | * @NL80211_TDLS_ENABLE_LINK: Enable TDLS link | ||
2641 | * @NL80211_TDLS_DISABLE_LINK: Disable TDLS link | ||
2642 | */ | ||
2643 | enum nl80211_tdls_operation { | ||
2644 | NL80211_TDLS_DISCOVERY_REQ, | ||
2645 | NL80211_TDLS_SETUP, | ||
2646 | NL80211_TDLS_TEARDOWN, | ||
2647 | NL80211_TDLS_ENABLE_LINK, | ||
2648 | NL80211_TDLS_DISABLE_LINK, | ||
2649 | }; | ||
2650 | |||
2607 | #endif /* __LINUX_NL80211_H */ | 2651 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/rfkill-gpio.h b/include/linux/rfkill-gpio.h index a175d0598033..4d09f6eab359 100644 --- a/include/linux/rfkill-gpio.h +++ b/include/linux/rfkill-gpio.h | |||
@@ -30,6 +30,8 @@ | |||
30 | * @reset_gpio: GPIO which is used for reseting rfkill switch | 30 | * @reset_gpio: GPIO which is used for reseting rfkill switch |
31 | * @shutdown_gpio: GPIO which is used for shutdown of rfkill switch | 31 | * @shutdown_gpio: GPIO which is used for shutdown of rfkill switch |
32 | * @power_clk_name: [optional] name of clk to turn off while blocked | 32 | * @power_clk_name: [optional] name of clk to turn off while blocked |
33 | * @gpio_runtime_close: clean up platform specific gpio configuration | ||
34 | * @gpio_runtime_setup: set up platform specific gpio configuration | ||
33 | */ | 35 | */ |
34 | 36 | ||
35 | struct rfkill_gpio_platform_data { | 37 | struct rfkill_gpio_platform_data { |
@@ -38,6 +40,8 @@ struct rfkill_gpio_platform_data { | |||
38 | int shutdown_gpio; | 40 | int shutdown_gpio; |
39 | const char *power_clk_name; | 41 | const char *power_clk_name; |
40 | enum rfkill_type type; | 42 | enum rfkill_type type; |
43 | void (*gpio_runtime_close)(struct platform_device *); | ||
44 | int (*gpio_runtime_setup)(struct platform_device *); | ||
41 | }; | 45 | }; |
42 | 46 | ||
43 | #endif /* __RFKILL_GPIO_H */ | 47 | #endif /* __RFKILL_GPIO_H */ |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 7f878b9d5642..ab90ae0970a6 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -354,8 +354,8 @@ struct l2cap_chan { | |||
354 | __u8 retry_count; | 354 | __u8 retry_count; |
355 | __u8 num_acked; | 355 | __u8 num_acked; |
356 | __u16 sdu_len; | 356 | __u16 sdu_len; |
357 | __u16 partial_sdu_len; | ||
358 | struct sk_buff *sdu; | 357 | struct sk_buff *sdu; |
358 | struct sk_buff *sdu_last_frag; | ||
359 | 359 | ||
360 | __u8 remote_tx_win; | 360 | __u8 remote_tx_win; |
361 | __u8 remote_max_tx; | 361 | __u8 remote_max_tx; |
@@ -448,7 +448,6 @@ enum { | |||
448 | #define L2CAP_CONF_MAX_CONF_RSP 2 | 448 | #define L2CAP_CONF_MAX_CONF_RSP 2 |
449 | 449 | ||
450 | enum { | 450 | enum { |
451 | CONN_SAR_SDU, | ||
452 | CONN_SREJ_SENT, | 451 | CONN_SREJ_SENT, |
453 | CONN_WAIT_F, | 452 | CONN_WAIT_F, |
454 | CONN_SREJ_ACT, | 453 | CONN_SREJ_ACT, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 31d823a3092b..74f4f85be32f 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -424,6 +424,17 @@ enum plink_actions { | |||
424 | }; | 424 | }; |
425 | 425 | ||
426 | /** | 426 | /** |
427 | * enum station_parameters_apply_mask - station parameter values to apply | ||
428 | * @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp) | ||
429 | * | ||
430 | * Not all station parameters have in-band "no change" signalling, | ||
431 | * for those that don't these flags will are used. | ||
432 | */ | ||
433 | enum station_parameters_apply_mask { | ||
434 | STATION_PARAM_APPLY_UAPSD = BIT(0), | ||
435 | }; | ||
436 | |||
437 | /** | ||
427 | * struct station_parameters - station parameters | 438 | * struct station_parameters - station parameters |
428 | * | 439 | * |
429 | * Used to change and create a new station. | 440 | * Used to change and create a new station. |
@@ -450,6 +461,7 @@ struct station_parameters { | |||
450 | u8 *supported_rates; | 461 | u8 *supported_rates; |
451 | struct net_device *vlan; | 462 | struct net_device *vlan; |
452 | u32 sta_flags_mask, sta_flags_set; | 463 | u32 sta_flags_mask, sta_flags_set; |
464 | u32 sta_modify_mask; | ||
453 | int listen_interval; | 465 | int listen_interval; |
454 | u16 aid; | 466 | u16 aid; |
455 | u8 supported_rates_len; | 467 | u8 supported_rates_len; |
@@ -1410,6 +1422,9 @@ struct cfg80211_gtk_rekey_data { | |||
1410 | * @set_ringparam: Set tx and rx ring sizes. | 1422 | * @set_ringparam: Set tx and rx ring sizes. |
1411 | * | 1423 | * |
1412 | * @get_ringparam: Get tx and rx ring current and maximum sizes. | 1424 | * @get_ringparam: Get tx and rx ring current and maximum sizes. |
1425 | * | ||
1426 | * @tdls_mgmt: Transmit a TDLS management frame. | ||
1427 | * @tdls_oper: Perform a high-level TDLS operation (e.g. TDLS link setup). | ||
1413 | */ | 1428 | */ |
1414 | struct cfg80211_ops { | 1429 | struct cfg80211_ops { |
1415 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); | 1430 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
@@ -1593,6 +1608,12 @@ struct cfg80211_ops { | |||
1593 | 1608 | ||
1594 | int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev, | 1609 | int (*set_rekey_data)(struct wiphy *wiphy, struct net_device *dev, |
1595 | struct cfg80211_gtk_rekey_data *data); | 1610 | struct cfg80211_gtk_rekey_data *data); |
1611 | |||
1612 | int (*tdls_mgmt)(struct wiphy *wiphy, struct net_device *dev, | ||
1613 | u8 *peer, u8 action_code, u8 dialog_token, | ||
1614 | u16 status_code, const u8 *buf, size_t len); | ||
1615 | int (*tdls_oper)(struct wiphy *wiphy, struct net_device *dev, | ||
1616 | u8 *peer, enum nl80211_tdls_operation oper); | ||
1596 | }; | 1617 | }; |
1597 | 1618 | ||
1598 | /* | 1619 | /* |
@@ -1645,6 +1666,12 @@ struct cfg80211_ops { | |||
1645 | * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the | 1666 | * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the |
1646 | * firmware. | 1667 | * firmware. |
1647 | * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP. | 1668 | * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP. |
1669 | * @WIPHY_FLAG_SUPPORTS_TDLS: The device supports TDLS (802.11z) operation. | ||
1670 | * @WIPHY_FLAG_TDLS_EXTERNAL_SETUP: The device does not handle TDLS (802.11z) | ||
1671 | * link setup/discovery operations internally. Setup, discovery and | ||
1672 | * teardown packets should be sent through the @NL80211_CMD_TDLS_MGMT | ||
1673 | * command. When this flag is not set, @NL80211_CMD_TDLS_OPER should be | ||
1674 | * used for asking the driver/firmware to perform a TDLS operation. | ||
1648 | */ | 1675 | */ |
1649 | enum wiphy_flags { | 1676 | enum wiphy_flags { |
1650 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | 1677 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), |
@@ -1661,6 +1688,8 @@ enum wiphy_flags { | |||
1661 | WIPHY_FLAG_ENFORCE_COMBINATIONS = BIT(12), | 1688 | WIPHY_FLAG_ENFORCE_COMBINATIONS = BIT(12), |
1662 | WIPHY_FLAG_SUPPORTS_FW_ROAM = BIT(13), | 1689 | WIPHY_FLAG_SUPPORTS_FW_ROAM = BIT(13), |
1663 | WIPHY_FLAG_AP_UAPSD = BIT(14), | 1690 | WIPHY_FLAG_AP_UAPSD = BIT(14), |
1691 | WIPHY_FLAG_SUPPORTS_TDLS = BIT(15), | ||
1692 | WIPHY_FLAG_TDLS_EXTERNAL_SETUP = BIT(16), | ||
1664 | }; | 1693 | }; |
1665 | 1694 | ||
1666 | /** | 1695 | /** |
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index b0be5fb9de19..7e2c4d483ad0 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -251,6 +251,7 @@ enum ieee80211_radiotap_type { | |||
251 | * retries */ | 251 | * retries */ |
252 | #define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ | 252 | #define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ |
253 | #define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ | 253 | #define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ |
254 | #define IEEE80211_RADIOTAP_F_TX_NOACK 0x0008 /* don't expect an ack */ | ||
254 | 255 | ||
255 | 256 | ||
256 | /* For IEEE80211_RADIOTAP_MCS */ | 257 | /* For IEEE80211_RADIOTAP_MCS */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 1e83afae3c64..cd108dfa1952 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -109,6 +109,7 @@ enum ieee80211_ac_numbers { | |||
109 | IEEE80211_AC_BE = 2, | 109 | IEEE80211_AC_BE = 2, |
110 | IEEE80211_AC_BK = 3, | 110 | IEEE80211_AC_BK = 3, |
111 | }; | 111 | }; |
112 | #define IEEE80211_NUM_ACS 4 | ||
112 | 113 | ||
113 | /** | 114 | /** |
114 | * struct ieee80211_tx_queue_params - transmit queue configuration | 115 | * struct ieee80211_tx_queue_params - transmit queue configuration |
@@ -338,9 +339,9 @@ struct ieee80211_bss_conf { | |||
338 | * used to indicate that a frame was already retried due to PS | 339 | * used to indicate that a frame was already retried due to PS |
339 | * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, | 340 | * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, |
340 | * used to indicate frame should not be encrypted | 341 | * used to indicate frame should not be encrypted |
341 | * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) | 342 | * @IEEE80211_TX_CTL_POLL_RESPONSE: This frame is a response to a poll |
342 | * This frame is a response to a PS-poll frame and should be sent | 343 | * frame (PS-Poll or uAPSD) and should be sent although the station |
343 | * although the station is in powersave mode. | 344 | * is in powersave mode. |
344 | * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the | 345 | * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the |
345 | * transmit function after the current frame, this can be used | 346 | * transmit function after the current frame, this can be used |
346 | * by drivers to kick the DMA queue only if unset or when the | 347 | * by drivers to kick the DMA queue only if unset or when the |
@@ -366,6 +367,14 @@ struct ieee80211_bss_conf { | |||
366 | * @IEEE80211_TX_CTL_NO_CCK_RATE: This frame will be sent at non CCK rate. | 367 | * @IEEE80211_TX_CTL_NO_CCK_RATE: This frame will be sent at non CCK rate. |
367 | * This flag is actually used for management frame especially for P2P | 368 | * This flag is actually used for management frame especially for P2P |
368 | * frames not being sent at CCK rate in 2GHz band. | 369 | * frames not being sent at CCK rate in 2GHz band. |
370 | * @IEEE80211_TX_STATUS_EOSP: This packet marks the end of service period, | ||
371 | * when its status is reported the service period ends. For frames in | ||
372 | * an SP that mac80211 transmits, it is already set; for driver frames | ||
373 | * the driver may set this flag. It is also used to do the same for | ||
374 | * PS-Poll responses. | ||
375 | * @IEEE80211_TX_CTL_USE_MINRATE: This frame will be sent at lowest rate. | ||
376 | * This flag is used to send nullfunc frame at minimum rate when | ||
377 | * the nullfunc is used for connection monitoring purpose. | ||
369 | * | 378 | * |
370 | * Note: If you have to add new flags to the enumeration, then don't | 379 | * Note: If you have to add new flags to the enumeration, then don't |
371 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. | 380 | * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. |
@@ -387,7 +396,7 @@ enum mac80211_tx_control_flags { | |||
387 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | 396 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), |
388 | IEEE80211_TX_INTFL_RETRIED = BIT(15), | 397 | IEEE80211_TX_INTFL_RETRIED = BIT(15), |
389 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), | 398 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), |
390 | IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), | 399 | IEEE80211_TX_CTL_POLL_RESPONSE = BIT(17), |
391 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), | 400 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), |
392 | IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), | 401 | IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), |
393 | IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20), | 402 | IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20), |
@@ -397,6 +406,8 @@ enum mac80211_tx_control_flags { | |||
397 | IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), | 406 | IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25), |
398 | IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26), | 407 | IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26), |
399 | IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27), | 408 | IEEE80211_TX_CTL_NO_CCK_RATE = BIT(27), |
409 | IEEE80211_TX_STATUS_EOSP = BIT(28), | ||
410 | IEEE80211_TX_CTL_USE_MINRATE = BIT(29), | ||
400 | }; | 411 | }; |
401 | 412 | ||
402 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 | 413 | #define IEEE80211_TX_CTL_STBC_SHIFT 23 |
@@ -410,9 +421,9 @@ enum mac80211_tx_control_flags { | |||
410 | IEEE80211_TX_CTL_SEND_AFTER_DTIM | IEEE80211_TX_CTL_AMPDU | \ | 421 | IEEE80211_TX_CTL_SEND_AFTER_DTIM | IEEE80211_TX_CTL_AMPDU | \ |
411 | IEEE80211_TX_STAT_TX_FILTERED | IEEE80211_TX_STAT_ACK | \ | 422 | IEEE80211_TX_STAT_TX_FILTERED | IEEE80211_TX_STAT_ACK | \ |
412 | IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_STAT_AMPDU_NO_BACK | \ | 423 | IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_STAT_AMPDU_NO_BACK | \ |
413 | IEEE80211_TX_CTL_RATE_CTRL_PROBE | IEEE80211_TX_CTL_PSPOLL_RESPONSE | \ | 424 | IEEE80211_TX_CTL_RATE_CTRL_PROBE | IEEE80211_TX_CTL_POLL_RESPONSE | \ |
414 | IEEE80211_TX_CTL_MORE_FRAMES | IEEE80211_TX_CTL_LDPC | \ | 425 | IEEE80211_TX_CTL_MORE_FRAMES | IEEE80211_TX_CTL_LDPC | \ |
415 | IEEE80211_TX_CTL_STBC) | 426 | IEEE80211_TX_CTL_STBC | IEEE80211_TX_STATUS_EOSP) |
416 | 427 | ||
417 | /** | 428 | /** |
418 | * enum mac80211_rate_control_flags - per-rate flags set by the | 429 | * enum mac80211_rate_control_flags - per-rate flags set by the |
@@ -1532,6 +1543,95 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1532 | */ | 1543 | */ |
1533 | 1544 | ||
1534 | /** | 1545 | /** |
1546 | * DOC: AP support for powersaving clients | ||
1547 | * | ||
1548 | * In order to implement AP and P2P GO modes, mac80211 has support for | ||
1549 | * client powersaving, both "legacy" PS (PS-Poll/null data) and uAPSD. | ||
1550 | * There currently is no support for sAPSD. | ||
1551 | * | ||
1552 | * There is one assumption that mac80211 makes, namely that a client | ||
1553 | * will not poll with PS-Poll and trigger with uAPSD at the same time. | ||
1554 | * Both are supported, and both can be used by the same client, but | ||
1555 | * they can't be used concurrently by the same client. This simplifies | ||
1556 | * the driver code. | ||
1557 | * | ||
1558 | * The first thing to keep in mind is that there is a flag for complete | ||
1559 | * driver implementation: %IEEE80211_HW_AP_LINK_PS. If this flag is set, | ||
1560 | * mac80211 expects the driver to handle most of the state machine for | ||
1561 | * powersaving clients and will ignore the PM bit in incoming frames. | ||
1562 | * Drivers then use ieee80211_sta_ps_transition() to inform mac80211 of | ||
1563 | * stations' powersave transitions. In this mode, mac80211 also doesn't | ||
1564 | * handle PS-Poll/uAPSD. | ||
1565 | * | ||
1566 | * In the mode without %IEEE80211_HW_AP_LINK_PS, mac80211 will check the | ||
1567 | * PM bit in incoming frames for client powersave transitions. When a | ||
1568 | * station goes to sleep, we will stop transmitting to it. There is, | ||
1569 | * however, a race condition: a station might go to sleep while there is | ||
1570 | * data buffered on hardware queues. If the device has support for this | ||
1571 | * it will reject frames, and the driver should give the frames back to | ||
1572 | * mac80211 with the %IEEE80211_TX_STAT_TX_FILTERED flag set which will | ||
1573 | * cause mac80211 to retry the frame when the station wakes up. The | ||
1574 | * driver is also notified of powersave transitions by calling its | ||
1575 | * @sta_notify callback. | ||
1576 | * | ||
1577 | * When the station is asleep, it has three choices: it can wake up, | ||
1578 | * it can PS-Poll, or it can possibly start a uAPSD service period. | ||
1579 | * Waking up is implemented by simply transmitting all buffered (and | ||
1580 | * filtered) frames to the station. This is the easiest case. When | ||
1581 | * the station sends a PS-Poll or a uAPSD trigger frame, mac80211 | ||
1582 | * will inform the driver of this with the @allow_buffered_frames | ||
1583 | * callback; this callback is optional. mac80211 will then transmit | ||
1584 | * the frames as usual and set the %IEEE80211_TX_CTL_POLL_RESPONSE | ||
1585 | * on each frame. The last frame in the service period (or the only | ||
1586 | * response to a PS-Poll) also has %IEEE80211_TX_STATUS_EOSP set to | ||
1587 | * indicate that it ends the service period; as this frame must have | ||
1588 | * TX status report it also sets %IEEE80211_TX_CTL_REQ_TX_STATUS. | ||
1589 | * When TX status is reported for this frame, the service period is | ||
1590 | * marked has having ended and a new one can be started by the peer. | ||
1591 | * | ||
1592 | * Another race condition can happen on some devices like iwlwifi | ||
1593 | * when there are frames queued for the station and it wakes up | ||
1594 | * or polls; the frames that are already queued could end up being | ||
1595 | * transmitted first instead, causing reordering and/or wrong | ||
1596 | * processing of the EOSP. The cause is that allowing frames to be | ||
1597 | * transmitted to a certain station is out-of-band communication to | ||
1598 | * the device. To allow this problem to be solved, the driver can | ||
1599 | * call ieee80211_sta_block_awake() if frames are buffered when it | ||
1600 | * is notified that the station went to sleep. When all these frames | ||
1601 | * have been filtered (see above), it must call the function again | ||
1602 | * to indicate that the station is no longer blocked. | ||
1603 | * | ||
1604 | * If the driver buffers frames in the driver for aggregation in any | ||
1605 | * way, it must use the ieee80211_sta_set_buffered() call when it is | ||
1606 | * notified of the station going to sleep to inform mac80211 of any | ||
1607 | * TIDs that have frames buffered. Note that when a station wakes up | ||
1608 | * this information is reset (hence the requirement to call it when | ||
1609 | * informed of the station going to sleep). Then, when a service | ||
1610 | * period starts for any reason, @release_buffered_frames is called | ||
1611 | * with the number of frames to be released and which TIDs they are | ||
1612 | * to come from. In this case, the driver is responsible for setting | ||
1613 | * the EOSP (for uAPSD) and MORE_DATA bits in the released frames, | ||
1614 | * to help the @more_data paramter is passed to tell the driver if | ||
1615 | * there is more data on other TIDs -- the TIDs to release frames | ||
1616 | * from are ignored since mac80211 doesn't know how many frames the | ||
1617 | * buffers for those TIDs contain. | ||
1618 | * | ||
1619 | * If the driver also implement GO mode, where absence periods may | ||
1620 | * shorten service periods (or abort PS-Poll responses), it must | ||
1621 | * filter those response frames except in the case of frames that | ||
1622 | * are buffered in the driver -- those must remain buffered to avoid | ||
1623 | * reordering. Because it is possible that no frames are released | ||
1624 | * in this case, the driver must call ieee80211_sta_eosp_irqsafe() | ||
1625 | * to indicate to mac80211 that the service period ended anyway. | ||
1626 | * | ||
1627 | * Finally, if frames from multiple TIDs are released from mac80211 | ||
1628 | * but the driver might reorder them, it must clear & set the flags | ||
1629 | * appropriately (only the last frame may have %IEEE80211_TX_STATUS_EOSP) | ||
1630 | * and also take care of the EOSP and MORE_DATA bits in the frame. | ||
1631 | * The driver may also use ieee80211_sta_eosp_irqsafe() in this case. | ||
1632 | */ | ||
1633 | |||
1634 | /** | ||
1535 | * enum ieee80211_filter_flags - hardware filter flags | 1635 | * enum ieee80211_filter_flags - hardware filter flags |
1536 | * | 1636 | * |
1537 | * These flags determine what the filter in hardware should be | 1637 | * These flags determine what the filter in hardware should be |
@@ -1621,6 +1721,17 @@ enum ieee80211_tx_sync_type { | |||
1621 | }; | 1721 | }; |
1622 | 1722 | ||
1623 | /** | 1723 | /** |
1724 | * enum ieee80211_frame_release_type - frame release reason | ||
1725 | * @IEEE80211_FRAME_RELEASE_PSPOLL: frame released for PS-Poll | ||
1726 | * @IEEE80211_FRAME_RELEASE_UAPSD: frame(s) released due to | ||
1727 | * frame received on trigger-enabled AC | ||
1728 | */ | ||
1729 | enum ieee80211_frame_release_type { | ||
1730 | IEEE80211_FRAME_RELEASE_PSPOLL, | ||
1731 | IEEE80211_FRAME_RELEASE_UAPSD, | ||
1732 | }; | ||
1733 | |||
1734 | /** | ||
1624 | * struct ieee80211_ops - callbacks from mac80211 to the driver | 1735 | * struct ieee80211_ops - callbacks from mac80211 to the driver |
1625 | * | 1736 | * |
1626 | * This structure contains various callbacks that the driver may | 1737 | * This structure contains various callbacks that the driver may |
@@ -1930,6 +2041,45 @@ enum ieee80211_tx_sync_type { | |||
1930 | * The callback can sleep. | 2041 | * The callback can sleep. |
1931 | * @rssi_callback: Notify driver when the average RSSI goes above/below | 2042 | * @rssi_callback: Notify driver when the average RSSI goes above/below |
1932 | * thresholds that were registered previously. The callback can sleep. | 2043 | * thresholds that were registered previously. The callback can sleep. |
2044 | * | ||
2045 | * @release_buffered_frames: Release buffered frames according to the given | ||
2046 | * parameters. In the case where the driver buffers some frames for | ||
2047 | * sleeping stations mac80211 will use this callback to tell the driver | ||
2048 | * to release some frames, either for PS-poll or uAPSD. | ||
2049 | * Note that if the @more_data paramter is %false the driver must check | ||
2050 | * if there are more frames on the given TIDs, and if there are more than | ||
2051 | * the frames being released then it must still set the more-data bit in | ||
2052 | * the frame. If the @more_data parameter is %true, then of course the | ||
2053 | * more-data bit must always be set. | ||
2054 | * The @tids parameter tells the driver which TIDs to release frames | ||
2055 | * from, for PS-poll it will always have only a single bit set. | ||
2056 | * In the case this is used for a PS-poll initiated release, the | ||
2057 | * @num_frames parameter will always be 1 so code can be shared. In | ||
2058 | * this case the driver must also set %IEEE80211_TX_STATUS_EOSP flag | ||
2059 | * on the TX status (and must report TX status) so that the PS-poll | ||
2060 | * period is properly ended. This is used to avoid sending multiple | ||
2061 | * responses for a retried PS-poll frame. | ||
2062 | * In the case this is used for uAPSD, the @num_frames parameter may be | ||
2063 | * bigger than one, but the driver may send fewer frames (it must send | ||
2064 | * at least one, however). In this case it is also responsible for | ||
2065 | * setting the EOSP flag in the QoS header of the frames. Also, when the | ||
2066 | * service period ends, the driver must set %IEEE80211_TX_STATUS_EOSP | ||
2067 | * on the last frame in the SP. Alternatively, it may call the function | ||
2068 | * ieee80211_sta_eosp_irqsafe() to inform mac80211 of the end of the SP. | ||
2069 | * This callback must be atomic. | ||
2070 | * @allow_buffered_frames: Prepare device to allow the given number of frames | ||
2071 | * to go out to the given station. The frames will be sent by mac80211 | ||
2072 | * via the usual TX path after this call. The TX information for frames | ||
2073 | * released will also have the %IEEE80211_TX_CTL_POLL_RESPONSE flag set | ||
2074 | * and the last one will also have %IEEE80211_TX_STATUS_EOSP set. In case | ||
2075 | * frames from multiple TIDs are released and the driver might reorder | ||
2076 | * them between the TIDs, it must set the %IEEE80211_TX_STATUS_EOSP flag | ||
2077 | * on the last frame and clear it on all others and also handle the EOSP | ||
2078 | * bit in the QoS header correctly. Alternatively, it can also call the | ||
2079 | * ieee80211_sta_eosp_irqsafe() function. | ||
2080 | * The @tids parameter is a bitmap and tells the driver which TIDs the | ||
2081 | * frames will be on; it will at most have two bits set. | ||
2082 | * This callback must be atomic. | ||
1933 | */ | 2083 | */ |
1934 | struct ieee80211_ops { | 2084 | struct ieee80211_ops { |
1935 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 2085 | void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -2002,7 +2152,8 @@ struct ieee80211_ops { | |||
2002 | struct ieee80211_sta *sta); | 2152 | struct ieee80211_sta *sta); |
2003 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2153 | void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
2004 | enum sta_notify_cmd, struct ieee80211_sta *sta); | 2154 | enum sta_notify_cmd, struct ieee80211_sta *sta); |
2005 | int (*conf_tx)(struct ieee80211_hw *hw, u16 queue, | 2155 | int (*conf_tx)(struct ieee80211_hw *hw, |
2156 | struct ieee80211_vif *vif, u16 queue, | ||
2006 | const struct ieee80211_tx_queue_params *params); | 2157 | const struct ieee80211_tx_queue_params *params); |
2007 | u64 (*get_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | 2158 | u64 (*get_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
2008 | void (*set_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | 2159 | void (*set_tsf)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, |
@@ -2044,6 +2195,17 @@ struct ieee80211_ops { | |||
2044 | const struct cfg80211_bitrate_mask *mask); | 2195 | const struct cfg80211_bitrate_mask *mask); |
2045 | void (*rssi_callback)(struct ieee80211_hw *hw, | 2196 | void (*rssi_callback)(struct ieee80211_hw *hw, |
2046 | enum ieee80211_rssi_event rssi_event); | 2197 | enum ieee80211_rssi_event rssi_event); |
2198 | |||
2199 | void (*allow_buffered_frames)(struct ieee80211_hw *hw, | ||
2200 | struct ieee80211_sta *sta, | ||
2201 | u16 tids, int num_frames, | ||
2202 | enum ieee80211_frame_release_type reason, | ||
2203 | bool more_data); | ||
2204 | void (*release_buffered_frames)(struct ieee80211_hw *hw, | ||
2205 | struct ieee80211_sta *sta, | ||
2206 | u16 tids, int num_frames, | ||
2207 | enum ieee80211_frame_release_type reason, | ||
2208 | bool more_data); | ||
2047 | }; | 2209 | }; |
2048 | 2210 | ||
2049 | /** | 2211 | /** |
@@ -2361,17 +2523,35 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta, | |||
2361 | #define IEEE80211_TX_STATUS_HEADROOM 13 | 2523 | #define IEEE80211_TX_STATUS_HEADROOM 13 |
2362 | 2524 | ||
2363 | /** | 2525 | /** |
2364 | * ieee80211_sta_set_tim - set the TIM bit for a sleeping station | 2526 | * ieee80211_sta_set_buffered - inform mac80211 about driver-buffered frames |
2365 | * @sta: &struct ieee80211_sta pointer for the sleeping station | 2527 | * @sta: &struct ieee80211_sta pointer for the sleeping station |
2528 | * @tid: the TID that has buffered frames | ||
2529 | * @buffered: indicates whether or not frames are buffered for this TID | ||
2366 | * | 2530 | * |
2367 | * If a driver buffers frames for a powersave station instead of passing | 2531 | * If a driver buffers frames for a powersave station instead of passing |
2368 | * them back to mac80211 for retransmission, the station needs to be told | 2532 | * them back to mac80211 for retransmission, the station may still need |
2369 | * to wake up using the TIM bitmap in the beacon. | 2533 | * to be told that there are buffered frames via the TIM bit. |
2370 | * | 2534 | * |
2371 | * This function sets the station's TIM bit - it will be cleared when the | 2535 | * This function informs mac80211 whether or not there are frames that are |
2372 | * station wakes up. | 2536 | * buffered in the driver for a given TID; mac80211 can then use this data |
2537 | * to set the TIM bit (NOTE: This may call back into the driver's set_tim | ||
2538 | * call! Beware of the locking!) | ||
2539 | * | ||
2540 | * If all frames are released to the station (due to PS-poll or uAPSD) | ||
2541 | * then the driver needs to inform mac80211 that there no longer are | ||
2542 | * frames buffered. However, when the station wakes up mac80211 assumes | ||
2543 | * that all buffered frames will be transmitted and clears this data, | ||
2544 | * drivers need to make sure they inform mac80211 about all buffered | ||
2545 | * frames on the sleep transition (sta_notify() with %STA_NOTIFY_SLEEP). | ||
2546 | * | ||
2547 | * Note that technically mac80211 only needs to know this per AC, not per | ||
2548 | * TID, but since driver buffering will inevitably happen per TID (since | ||
2549 | * it is related to aggregation) it is easier to make mac80211 map the | ||
2550 | * TID to the AC as required instead of keeping track in all drivers that | ||
2551 | * use this API. | ||
2373 | */ | 2552 | */ |
2374 | void ieee80211_sta_set_tim(struct ieee80211_sta *sta); | 2553 | void ieee80211_sta_set_buffered(struct ieee80211_sta *sta, |
2554 | u8 tid, bool buffered); | ||
2375 | 2555 | ||
2376 | /** | 2556 | /** |
2377 | * ieee80211_tx_status - transmit status callback | 2557 | * ieee80211_tx_status - transmit status callback |
@@ -3029,6 +3209,24 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | |||
3029 | struct ieee80211_sta *pubsta, bool block); | 3209 | struct ieee80211_sta *pubsta, bool block); |
3030 | 3210 | ||
3031 | /** | 3211 | /** |
3212 | * ieee80211_sta_eosp - notify mac80211 about end of SP | ||
3213 | * @pubsta: the station | ||
3214 | * | ||
3215 | * When a device transmits frames in a way that it can't tell | ||
3216 | * mac80211 in the TX status about the EOSP, it must clear the | ||
3217 | * %IEEE80211_TX_STATUS_EOSP bit and call this function instead. | ||
3218 | * This applies for PS-Poll as well as uAPSD. | ||
3219 | * | ||
3220 | * Note that there is no non-_irqsafe version right now as | ||
3221 | * it wasn't needed, but just like _tx_status() and _rx() | ||
3222 | * must not be mixed in irqsafe/non-irqsafe versions, this | ||
3223 | * function must not be mixed with those either. Use the | ||
3224 | * all irqsafe, or all non-irqsafe, don't mix! If you need | ||
3225 | * the non-irqsafe version of this, you need to add it. | ||
3226 | */ | ||
3227 | void ieee80211_sta_eosp_irqsafe(struct ieee80211_sta *pubsta); | ||
3228 | |||
3229 | /** | ||
3032 | * ieee80211_iter_keys - iterate keys programmed into the device | 3230 | * ieee80211_iter_keys - iterate keys programmed into the device |
3033 | * @hw: pointer obtained from ieee80211_alloc_hw() | 3231 | * @hw: pointer obtained from ieee80211_alloc_hw() |
3034 | * @vif: virtual interface to iterate, may be %NULL for all | 3232 | * @vif: virtual interface to iterate, may be %NULL for all |
@@ -3444,4 +3642,9 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif, | |||
3444 | int rssi_max_thold); | 3642 | int rssi_max_thold); |
3445 | 3643 | ||
3446 | void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); | 3644 | void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif); |
3645 | |||
3646 | int ieee80211_add_srates_ie(struct ieee80211_vif *vif, struct sk_buff *skb); | ||
3647 | |||
3648 | int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif, | ||
3649 | struct sk_buff *skb); | ||
3447 | #endif /* MAC80211_H */ | 3650 | #endif /* MAC80211_H */ |