diff options
Diffstat (limited to 'include/net/ieee802154_netdev.h')
-rw-r--r-- | include/net/ieee802154_netdev.h | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h index 2c10a9f0c6d9..a62a051a3a2f 100644 --- a/include/net/ieee802154_netdev.h +++ b/include/net/ieee802154_netdev.h | |||
@@ -50,15 +50,6 @@ struct ieee802154_sechdr { | |||
50 | }; | 50 | }; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | struct ieee802154_addr { | ||
54 | u8 mode; | ||
55 | __le16 pan_id; | ||
56 | union { | ||
57 | __le16 short_addr; | ||
58 | __le64 extended_addr; | ||
59 | }; | ||
60 | }; | ||
61 | |||
62 | struct ieee802154_hdr_fc { | 53 | struct ieee802154_hdr_fc { |
63 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 54 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
64 | u16 type:3, | 55 | u16 type:3, |
@@ -99,7 +90,7 @@ struct ieee802154_hdr { | |||
99 | * hdr->fc will be ignored. this includes the INTRA_PAN bit and the frame | 90 | * hdr->fc will be ignored. this includes the INTRA_PAN bit and the frame |
100 | * version, if SECEN is set. | 91 | * version, if SECEN is set. |
101 | */ | 92 | */ |
102 | int ieee802154_hdr_push(struct sk_buff *skb, const struct ieee802154_hdr *hdr); | 93 | int ieee802154_hdr_push(struct sk_buff *skb, struct ieee802154_hdr *hdr); |
103 | 94 | ||
104 | /* pulls the entire 802.15.4 header off of the skb, including the security | 95 | /* pulls the entire 802.15.4 header off of the skb, including the security |
105 | * header, and performs pan id decompression | 96 | * header, and performs pan id decompression |
@@ -243,38 +234,6 @@ static inline struct ieee802154_mac_cb *mac_cb_init(struct sk_buff *skb) | |||
243 | return mac_cb(skb); | 234 | return mac_cb(skb); |
244 | } | 235 | } |
245 | 236 | ||
246 | #define IEEE802154_LLSEC_KEY_SIZE 16 | ||
247 | |||
248 | struct ieee802154_llsec_key_id { | ||
249 | u8 mode; | ||
250 | u8 id; | ||
251 | union { | ||
252 | struct ieee802154_addr device_addr; | ||
253 | __le32 short_source; | ||
254 | __le64 extended_source; | ||
255 | }; | ||
256 | }; | ||
257 | |||
258 | struct ieee802154_llsec_key { | ||
259 | u8 frame_types; | ||
260 | u32 cmd_frame_ids; | ||
261 | u8 key[IEEE802154_LLSEC_KEY_SIZE]; | ||
262 | }; | ||
263 | |||
264 | struct ieee802154_llsec_key_entry { | ||
265 | struct list_head list; | ||
266 | |||
267 | struct ieee802154_llsec_key_id id; | ||
268 | struct ieee802154_llsec_key *key; | ||
269 | }; | ||
270 | |||
271 | struct ieee802154_llsec_device_key { | ||
272 | struct list_head list; | ||
273 | |||
274 | struct ieee802154_llsec_key_id key_id; | ||
275 | u32 frame_counter; | ||
276 | }; | ||
277 | |||
278 | enum { | 237 | enum { |
279 | IEEE802154_LLSEC_DEVKEY_IGNORE, | 238 | IEEE802154_LLSEC_DEVKEY_IGNORE, |
280 | IEEE802154_LLSEC_DEVKEY_RESTRICT, | 239 | IEEE802154_LLSEC_DEVKEY_RESTRICT, |
@@ -283,49 +242,6 @@ enum { | |||
283 | __IEEE802154_LLSEC_DEVKEY_MAX, | 242 | __IEEE802154_LLSEC_DEVKEY_MAX, |
284 | }; | 243 | }; |
285 | 244 | ||
286 | struct ieee802154_llsec_device { | ||
287 | struct list_head list; | ||
288 | |||
289 | __le16 pan_id; | ||
290 | __le16 short_addr; | ||
291 | __le64 hwaddr; | ||
292 | u32 frame_counter; | ||
293 | bool seclevel_exempt; | ||
294 | |||
295 | u8 key_mode; | ||
296 | struct list_head keys; | ||
297 | }; | ||
298 | |||
299 | struct ieee802154_llsec_seclevel { | ||
300 | struct list_head list; | ||
301 | |||
302 | u8 frame_type; | ||
303 | u8 cmd_frame_id; | ||
304 | bool device_override; | ||
305 | u32 sec_levels; | ||
306 | }; | ||
307 | |||
308 | struct ieee802154_llsec_params { | ||
309 | bool enabled; | ||
310 | |||
311 | __be32 frame_counter; | ||
312 | u8 out_level; | ||
313 | struct ieee802154_llsec_key_id out_key; | ||
314 | |||
315 | __le64 default_key_source; | ||
316 | |||
317 | __le16 pan_id; | ||
318 | __le64 hwaddr; | ||
319 | __le64 coord_hwaddr; | ||
320 | __le16 coord_shortaddr; | ||
321 | }; | ||
322 | |||
323 | struct ieee802154_llsec_table { | ||
324 | struct list_head keys; | ||
325 | struct list_head devices; | ||
326 | struct list_head security_levels; | ||
327 | }; | ||
328 | |||
329 | #define IEEE802154_MAC_SCAN_ED 0 | 245 | #define IEEE802154_MAC_SCAN_ED 0 |
330 | #define IEEE802154_MAC_SCAN_ACTIVE 1 | 246 | #define IEEE802154_MAC_SCAN_ACTIVE 1 |
331 | #define IEEE802154_MAC_SCAN_PASSIVE 2 | 247 | #define IEEE802154_MAC_SCAN_PASSIVE 2 |