diff options
Diffstat (limited to 'include/linux/ieee80211.h')
-rw-r--r-- | include/linux/ieee80211.h | 156 |
1 files changed, 134 insertions, 22 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 54c878960872..48363c3c40f8 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -130,6 +130,8 @@ | |||
130 | #define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK 0x0060 | 130 | #define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK 0x0060 |
131 | /* A-MSDU 802.11n */ | 131 | /* A-MSDU 802.11n */ |
132 | #define IEEE80211_QOS_CTL_A_MSDU_PRESENT 0x0080 | 132 | #define IEEE80211_QOS_CTL_A_MSDU_PRESENT 0x0080 |
133 | /* Mesh Control 802.11s */ | ||
134 | #define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT 0x0100 | ||
133 | 135 | ||
134 | /* U-APSD queue for WMM IEs sent by AP */ | 136 | /* U-APSD queue for WMM IEs sent by AP */ |
135 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) | 137 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) |
@@ -629,9 +631,14 @@ struct ieee80211_rann_ie { | |||
629 | u8 rann_ttl; | 631 | u8 rann_ttl; |
630 | u8 rann_addr[6]; | 632 | u8 rann_addr[6]; |
631 | u32 rann_seq; | 633 | u32 rann_seq; |
634 | u32 rann_interval; | ||
632 | u32 rann_metric; | 635 | u32 rann_metric; |
633 | } __attribute__ ((packed)); | 636 | } __attribute__ ((packed)); |
634 | 637 | ||
638 | enum ieee80211_rann_flags { | ||
639 | RANN_FLAG_IS_GATE = 1 << 0, | ||
640 | }; | ||
641 | |||
635 | #define WLAN_SA_QUERY_TR_ID_LEN 2 | 642 | #define WLAN_SA_QUERY_TR_ID_LEN 2 |
636 | 643 | ||
637 | struct ieee80211_mgmt { | 644 | struct ieee80211_mgmt { |
@@ -736,19 +743,10 @@ struct ieee80211_mgmt { | |||
736 | __le16 params; | 743 | __le16 params; |
737 | __le16 reason_code; | 744 | __le16 reason_code; |
738 | } __attribute__((packed)) delba; | 745 | } __attribute__((packed)) delba; |
739 | struct{ | 746 | struct { |
740 | u8 action_code; | 747 | u8 action_code; |
741 | /* capab_info for open and confirm, | ||
742 | * reason for close | ||
743 | */ | ||
744 | __le16 aux; | ||
745 | /* Followed in plink_confirm by status | ||
746 | * code, AID and supported rates, | ||
747 | * and directly by supported rates in | ||
748 | * plink_open and plink_close | ||
749 | */ | ||
750 | u8 variable[0]; | 748 | u8 variable[0]; |
751 | } __attribute__((packed)) plink_action; | 749 | } __attribute__((packed)) self_prot; |
752 | struct{ | 750 | struct{ |
753 | u8 action_code; | 751 | u8 action_code; |
754 | u8 variable[0]; | 752 | u8 variable[0]; |
@@ -761,6 +759,12 @@ struct ieee80211_mgmt { | |||
761 | u8 action; | 759 | u8 action; |
762 | u8 smps_control; | 760 | u8 smps_control; |
763 | } __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; | ||
764 | } u; | 768 | } u; |
765 | } __attribute__ ((packed)) action; | 769 | } __attribute__ ((packed)) action; |
766 | } u; | 770 | } u; |
@@ -779,6 +783,13 @@ struct ieee80211_mmie { | |||
779 | u8 mic[8]; | 783 | u8 mic[8]; |
780 | } __attribute__ ((packed)); | 784 | } __attribute__ ((packed)); |
781 | 785 | ||
786 | struct ieee80211_vendor_ie { | ||
787 | u8 element_id; | ||
788 | u8 len; | ||
789 | u8 oui[3]; | ||
790 | u8 oui_type; | ||
791 | } __packed; | ||
792 | |||
782 | /* Control frames */ | 793 | /* Control frames */ |
783 | struct ieee80211_rts { | 794 | struct ieee80211_rts { |
784 | __le16 frame_control; | 795 | __le16 frame_control; |
@@ -800,6 +811,52 @@ struct ieee80211_pspoll { | |||
800 | u8 ta[6]; | 811 | u8 ta[6]; |
801 | } __attribute__ ((packed)); | 812 | } __attribute__ ((packed)); |
802 | 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 | |||
803 | /** | 860 | /** |
804 | * struct ieee80211_bar - HT Block Ack Request | 861 | * struct ieee80211_bar - HT Block Ack Request |
805 | * | 862 | * |
@@ -816,9 +873,11 @@ struct ieee80211_bar { | |||
816 | } __attribute__((packed)); | 873 | } __attribute__((packed)); |
817 | 874 | ||
818 | /* 802.11 BAR control masks */ | 875 | /* 802.11 BAR control masks */ |
819 | #define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 | 876 | #define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 |
820 | #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 | 877 | #define IEEE80211_BAR_CTRL_MULTI_TID 0x0002 |
821 | 878 | #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 | |
879 | #define IEEE80211_BAR_CTRL_TID_INFO_MASK 0xf000 | ||
880 | #define IEEE80211_BAR_CTRL_TID_INFO_SHIFT 12 | ||
822 | 881 | ||
823 | #define IEEE80211_HT_MCS_MASK_LEN 10 | 882 | #define IEEE80211_HT_MCS_MASK_LEN 10 |
824 | 883 | ||
@@ -1189,16 +1248,13 @@ enum ieee80211_eid { | |||
1189 | WLAN_EID_TS_DELAY = 43, | 1248 | WLAN_EID_TS_DELAY = 43, |
1190 | WLAN_EID_TCLAS_PROCESSING = 44, | 1249 | WLAN_EID_TCLAS_PROCESSING = 44, |
1191 | WLAN_EID_QOS_CAPA = 46, | 1250 | WLAN_EID_QOS_CAPA = 46, |
1251 | /* 802.11z */ | ||
1252 | WLAN_EID_LINK_ID = 101, | ||
1192 | /* 802.11s */ | 1253 | /* 802.11s */ |
1193 | WLAN_EID_MESH_CONFIG = 113, | 1254 | WLAN_EID_MESH_CONFIG = 113, |
1194 | WLAN_EID_MESH_ID = 114, | 1255 | WLAN_EID_MESH_ID = 114, |
1195 | WLAN_EID_LINK_METRIC_REPORT = 115, | 1256 | WLAN_EID_LINK_METRIC_REPORT = 115, |
1196 | WLAN_EID_CONGESTION_NOTIFICATION = 116, | 1257 | WLAN_EID_CONGESTION_NOTIFICATION = 116, |
1197 | /* Note that the Peer Link IE has been replaced with the similar | ||
1198 | * Peer Management IE. We will keep the former definition until mesh | ||
1199 | * code is changed to comply with latest 802.11s drafts. | ||
1200 | */ | ||
1201 | WLAN_EID_PEER_LINK = 55, /* no longer in 802.11s drafts */ | ||
1202 | WLAN_EID_PEER_MGMT = 117, | 1258 | WLAN_EID_PEER_MGMT = 117, |
1203 | WLAN_EID_CHAN_SWITCH_PARAM = 118, | 1259 | WLAN_EID_CHAN_SWITCH_PARAM = 118, |
1204 | WLAN_EID_MESH_AWAKE_WINDOW = 119, | 1260 | WLAN_EID_MESH_AWAKE_WINDOW = 119, |
@@ -1277,13 +1333,11 @@ enum ieee80211_category { | |||
1277 | WLAN_CATEGORY_HT = 7, | 1333 | WLAN_CATEGORY_HT = 7, |
1278 | WLAN_CATEGORY_SA_QUERY = 8, | 1334 | WLAN_CATEGORY_SA_QUERY = 8, |
1279 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, | 1335 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, |
1336 | WLAN_CATEGORY_TDLS = 12, | ||
1280 | WLAN_CATEGORY_MESH_ACTION = 13, | 1337 | WLAN_CATEGORY_MESH_ACTION = 13, |
1281 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1338 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
1282 | WLAN_CATEGORY_SELF_PROTECTED = 15, | 1339 | WLAN_CATEGORY_SELF_PROTECTED = 15, |
1283 | WLAN_CATEGORY_WMM = 17, | 1340 | WLAN_CATEGORY_WMM = 17, |
1284 | /* TODO: remove MESH_PATH_SEL after mesh is updated | ||
1285 | * to current 802.11s draft */ | ||
1286 | WLAN_CATEGORY_MESH_PATH_SEL = 32, | ||
1287 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1341 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
1288 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1342 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
1289 | }; | 1343 | }; |
@@ -1309,6 +1363,31 @@ enum ieee80211_ht_actioncode { | |||
1309 | WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7, | 1363 | WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7, |
1310 | }; | 1364 | }; |
1311 | 1365 | ||
1366 | /* Self Protected Action codes */ | ||
1367 | enum ieee80211_self_protected_actioncode { | ||
1368 | WLAN_SP_RESERVED = 0, | ||
1369 | WLAN_SP_MESH_PEERING_OPEN = 1, | ||
1370 | WLAN_SP_MESH_PEERING_CONFIRM = 2, | ||
1371 | WLAN_SP_MESH_PEERING_CLOSE = 3, | ||
1372 | WLAN_SP_MGK_INFORM = 4, | ||
1373 | WLAN_SP_MGK_ACK = 5, | ||
1374 | }; | ||
1375 | |||
1376 | /* Mesh action codes */ | ||
1377 | enum ieee80211_mesh_actioncode { | ||
1378 | WLAN_MESH_ACTION_LINK_METRIC_REPORT, | ||
1379 | WLAN_MESH_ACTION_HWMP_PATH_SELECTION, | ||
1380 | WLAN_MESH_ACTION_GATE_ANNOUNCEMENT, | ||
1381 | WLAN_MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION, | ||
1382 | WLAN_MESH_ACTION_MCCA_SETUP_REQUEST, | ||
1383 | WLAN_MESH_ACTION_MCCA_SETUP_REPLY, | ||
1384 | WLAN_MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST, | ||
1385 | WLAN_MESH_ACTION_MCCA_ADVERTISEMENT, | ||
1386 | WLAN_MESH_ACTION_MCCA_TEARDOWN, | ||
1387 | WLAN_MESH_ACTION_TBTT_ADJUSTMENT_REQUEST, | ||
1388 | WLAN_MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE, | ||
1389 | }; | ||
1390 | |||
1312 | /* Security key length */ | 1391 | /* Security key length */ |
1313 | enum ieee80211_key_len { | 1392 | enum ieee80211_key_len { |
1314 | WLAN_KEY_LEN_WEP40 = 5, | 1393 | WLAN_KEY_LEN_WEP40 = 5, |
@@ -1318,6 +1397,36 @@ enum ieee80211_key_len { | |||
1318 | WLAN_KEY_LEN_AES_CMAC = 16, | 1397 | WLAN_KEY_LEN_AES_CMAC = 16, |
1319 | }; | 1398 | }; |
1320 | 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 | |||
1321 | /** | 1430 | /** |
1322 | * enum - mesh path selection protocol identifier | 1431 | * enum - mesh path selection protocol identifier |
1323 | * | 1432 | * |
@@ -1453,6 +1562,9 @@ enum ieee80211_sa_query_action { | |||
1453 | 1562 | ||
1454 | #define WLAN_PMKID_LEN 16 | 1563 | #define WLAN_PMKID_LEN 16 |
1455 | 1564 | ||
1565 | #define WLAN_OUI_WFA 0x506f9a | ||
1566 | #define WLAN_OUI_TYPE_WFA_P2P 9 | ||
1567 | |||
1456 | /* | 1568 | /* |
1457 | * WMM/802.11e Tspec Element | 1569 | * WMM/802.11e Tspec Element |
1458 | */ | 1570 | */ |