Changeset e71c023 in mainline
- Timestamp:
- 2018-08-03T16:56:31Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 02246b8
- Parents:
- 3767bdb
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-03 16:32:18)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-03 16:56:31)
- Location:
- uspace/lib/ieee80211
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ieee80211/include/ieee80211_private.h
r3767bdb re71c023 98 98 99 99 /** Special room in header reserved for encryption. */ 100 typedef enum { 101 IEEE80211_TKIP_HEADER_LENGTH = 8, 102 IEEE80211_CCMP_HEADER_LENGTH = 8 103 } ieee80211_encrypt_header_reserve_length_t; 100 #define IEEE80211_TKIP_HEADER_LENGTH 8 101 #define IEEE80211_CCMP_HEADER_LENGTH 8 104 102 105 103 /** IEEE 802.11 PTK key length. */ 106 typedef enum { 107 IEEE80211_PTK_CCMP_LENGTH = 48, 108 IEEE80211_PTK_TKIP_LENGTH = 64 109 } ieee80211_ptk_length_t; 104 #define IEEE80211_PTK_CCMP_LENGTH 48 105 #define IEEE80211_PTK_TKIP_LENGTH 64 110 106 111 107 /** IEEE 802.11 GTK key length. */ 112 typedef enum { 113 IEEE80211_GTK_CCMP_LENGTH = 16, 114 IEEE80211_GTK_TKIP_LENGTH = 32 115 } ieee80211_gtk_length_t; 108 #define IEEE80211_GTK_CCMP_LENGTH 16 109 #define IEEE80211_GTK_TKIP_LENGTH 32 116 110 117 111 /** IEEE 802.11 frame types. */ -
uspace/lib/ieee80211/src/ieee80211.c
r3767bdb re71c023 571 571 /* Init crypto data. */ 572 572 bool add_mic = false; 573 const size_t max_head_space = max(IEEE80211_TKIP_HEADER_LENGTH, 574 IEEE80211_CCMP_HEADER_LENGTH); 573 575 size_t head_space = 0, mic_space = 0; 574 576 uint16_t crypto = 0; 575 uint8_t head_data[ head_space];576 memset(head_data, 0, head_space);577 uint8_t head_data[max_head_space]; 578 memset(head_data, 0, max_head_space); 577 579 578 580 // TODO: Distinguish used key (pair/group) by dest address ?
Note:
See TracChangeset
for help on using the changeset viewer.