diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 9 | ||||
-rw-r--r-- | include/net/cfg80211.h | 47 | ||||
-rw-r--r-- | include/net/mac80211.h | 28 |
3 files changed, 56 insertions, 28 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 05c29c01174c..34de8b21f6d4 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -493,6 +493,7 @@ struct ieee80211s_hdr { | |||
493 | /* Mesh flags */ | 493 | /* Mesh flags */ |
494 | #define MESH_FLAGS_AE_A4 0x1 | 494 | #define MESH_FLAGS_AE_A4 0x1 |
495 | #define MESH_FLAGS_AE_A5_A6 0x2 | 495 | #define MESH_FLAGS_AE_A5_A6 0x2 |
496 | #define MESH_FLAGS_AE 0x3 | ||
496 | #define MESH_FLAGS_PS_DEEP 0x4 | 497 | #define MESH_FLAGS_PS_DEEP 0x4 |
497 | 498 | ||
498 | /** | 499 | /** |
@@ -1085,6 +1086,14 @@ enum ieee80211_spectrum_mgmt_actioncode { | |||
1085 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, | 1086 | WLAN_ACTION_SPCT_CHL_SWITCH = 4, |
1086 | }; | 1087 | }; |
1087 | 1088 | ||
1089 | /* Security key length */ | ||
1090 | enum ieee80211_key_len { | ||
1091 | WLAN_KEY_LEN_WEP40 = 5, | ||
1092 | WLAN_KEY_LEN_WEP104 = 13, | ||
1093 | WLAN_KEY_LEN_CCMP = 16, | ||
1094 | WLAN_KEY_LEN_TKIP = 32, | ||
1095 | }; | ||
1096 | |||
1088 | /* | 1097 | /* |
1089 | * IEEE 802.11-2007 7.3.2.9 Country information element | 1098 | * IEEE 802.11-2007 7.3.2.9 Country information element |
1090 | * | 1099 | * |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 389f1d20adf4..f20da7d63b1e 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1244,6 +1244,53 @@ extern int ieee80211_radiotap_iterator_init( | |||
1244 | extern int ieee80211_radiotap_iterator_next( | 1244 | extern int ieee80211_radiotap_iterator_next( |
1245 | struct ieee80211_radiotap_iterator *iterator); | 1245 | struct ieee80211_radiotap_iterator *iterator); |
1246 | 1246 | ||
1247 | extern const unsigned char rfc1042_header[6]; | ||
1248 | extern const unsigned char bridge_tunnel_header[6]; | ||
1249 | |||
1250 | /** | ||
1251 | * ieee80211_get_hdrlen_from_skb - get header length from data | ||
1252 | * | ||
1253 | * Given an skb with a raw 802.11 header at the data pointer this function | ||
1254 | * returns the 802.11 header length in bytes (not including encryption | ||
1255 | * headers). If the data in the sk_buff is too short to contain a valid 802.11 | ||
1256 | * header the function returns 0. | ||
1257 | * | ||
1258 | * @skb: the frame | ||
1259 | */ | ||
1260 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | ||
1261 | |||
1262 | /** | ||
1263 | * ieee80211_hdrlen - get header length in bytes from frame control | ||
1264 | * @fc: frame control field in little-endian format | ||
1265 | */ | ||
1266 | unsigned int ieee80211_hdrlen(__le16 fc); | ||
1267 | |||
1268 | /** | ||
1269 | * ieee80211_data_to_8023 - convert an 802.11 data frame to 802.3 | ||
1270 | * @skb: the 802.11 data frame | ||
1271 | * @addr: the device MAC address | ||
1272 | * @iftype: the virtual interface type | ||
1273 | */ | ||
1274 | int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, | ||
1275 | enum nl80211_iftype iftype); | ||
1276 | |||
1277 | /** | ||
1278 | * ieee80211_data_from_8023 - convert an 802.3 frame to 802.11 | ||
1279 | * @skb: the 802.3 frame | ||
1280 | * @addr: the device MAC address | ||
1281 | * @iftype: the virtual interface type | ||
1282 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) | ||
1283 | * @qos: build 802.11 QoS data frame | ||
1284 | */ | ||
1285 | int ieee80211_data_from_8023(struct sk_buff *skb, u8 *addr, | ||
1286 | enum nl80211_iftype iftype, u8 *bssid, bool qos); | ||
1287 | |||
1288 | /** | ||
1289 | * cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame | ||
1290 | * @skb: the data frame | ||
1291 | */ | ||
1292 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); | ||
1293 | |||
1247 | /* | 1294 | /* |
1248 | * Regulatory helper functions for wiphys | 1295 | * Regulatory helper functions for wiphys |
1249 | */ | 1296 | */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 2d0610581efc..d72346ff3247 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -672,16 +672,6 @@ enum ieee80211_key_alg { | |||
672 | }; | 672 | }; |
673 | 673 | ||
674 | /** | 674 | /** |
675 | * enum ieee80211_key_len - key length | ||
676 | * @LEN_WEP40: WEP 5-byte long key | ||
677 | * @LEN_WEP104: WEP 13-byte long key | ||
678 | */ | ||
679 | enum ieee80211_key_len { | ||
680 | LEN_WEP40 = 5, | ||
681 | LEN_WEP104 = 13, | ||
682 | }; | ||
683 | |||
684 | /** | ||
685 | * enum ieee80211_key_flags - key flags | 675 | * enum ieee80211_key_flags - key flags |
686 | * | 676 | * |
687 | * These flags are used for communication about keys between the driver | 677 | * These flags are used for communication about keys between the driver |
@@ -1812,24 +1802,6 @@ struct sk_buff * | |||
1812 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | 1802 | ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); |
1813 | 1803 | ||
1814 | /** | 1804 | /** |
1815 | * ieee80211_get_hdrlen_from_skb - get header length from data | ||
1816 | * | ||
1817 | * Given an skb with a raw 802.11 header at the data pointer this function | ||
1818 | * returns the 802.11 header length in bytes (not including encryption | ||
1819 | * headers). If the data in the sk_buff is too short to contain a valid 802.11 | ||
1820 | * header the function returns 0. | ||
1821 | * | ||
1822 | * @skb: the frame | ||
1823 | */ | ||
1824 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | ||
1825 | |||
1826 | /** | ||
1827 | * ieee80211_hdrlen - get header length in bytes from frame control | ||
1828 | * @fc: frame control field in little-endian format | ||
1829 | */ | ||
1830 | unsigned int ieee80211_hdrlen(__le16 fc); | ||
1831 | |||
1832 | /** | ||
1833 | * ieee80211_get_tkip_key - get a TKIP rc4 for skb | 1805 | * ieee80211_get_tkip_key - get a TKIP rc4 for skb |
1834 | * | 1806 | * |
1835 | * This function computes a TKIP rc4 key for an skb. It computes | 1807 | * This function computes a TKIP rc4 key for an skb. It computes |