diff options
author | Jouni Malinen <j@w1.fi> | 2009-01-08 06:32:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:01 -0500 |
commit | fb7333367632c67d8b6b06fb8d906cdabb11b02a (patch) | |
tree | 337d89f2c8c033b00dfcefbbcbded3f914d51661 /include | |
parent | 5394af4d86ae51b369ff243c3f75b6f9a74e164b (diff) |
mac80211: 802.11w - CCMP for management frames
Extend CCMP to support encryption and decryption of unicast management
frames.
Signed-off-by: Jouni Malinen <j@w1.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index cade2556af0e..d5165895f316 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -1030,6 +1030,7 @@ enum ieee80211_category { | |||
1030 | WLAN_CATEGORY_QOS = 1, | 1030 | WLAN_CATEGORY_QOS = 1, |
1031 | WLAN_CATEGORY_DLS = 2, | 1031 | WLAN_CATEGORY_DLS = 2, |
1032 | WLAN_CATEGORY_BACK = 3, | 1032 | WLAN_CATEGORY_BACK = 3, |
1033 | WLAN_CATEGORY_PUBLIC = 4, | ||
1033 | WLAN_CATEGORY_WMM = 17, | 1034 | WLAN_CATEGORY_WMM = 17, |
1034 | }; | 1035 | }; |
1035 | 1036 | ||
@@ -1186,6 +1187,35 @@ static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) | |||
1186 | } | 1187 | } |
1187 | 1188 | ||
1188 | /** | 1189 | /** |
1190 | * ieee80211_is_robust_mgmt_frame - check if frame is a robust management frame | ||
1191 | * @hdr: the frame (buffer must include at least the first octet of payload) | ||
1192 | */ | ||
1193 | static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | ||
1194 | { | ||
1195 | if (ieee80211_is_disassoc(hdr->frame_control) || | ||
1196 | ieee80211_is_deauth(hdr->frame_control)) | ||
1197 | return true; | ||
1198 | |||
1199 | if (ieee80211_is_action(hdr->frame_control)) { | ||
1200 | u8 *category; | ||
1201 | |||
1202 | /* | ||
1203 | * Action frames, excluding Public Action frames, are Robust | ||
1204 | * Management Frames. However, if we are looking at a Protected | ||
1205 | * frame, skip the check since the data may be encrypted and | ||
1206 | * the frame has already been found to be a Robust Management | ||
1207 | * Frame (by the other end). | ||
1208 | */ | ||
1209 | if (ieee80211_has_protected(hdr->frame_control)) | ||
1210 | return true; | ||
1211 | category = ((u8 *) hdr) + 24; | ||
1212 | return *category != WLAN_CATEGORY_PUBLIC; | ||
1213 | } | ||
1214 | |||
1215 | return false; | ||
1216 | } | ||
1217 | |||
1218 | /** | ||
1189 | * ieee80211_fhss_chan_to_freq - get channel frequency | 1219 | * ieee80211_fhss_chan_to_freq - get channel frequency |
1190 | * @channel: the FHSS channel | 1220 | * @channel: the FHSS channel |
1191 | * | 1221 | * |