/* * Copyright (C) 2014 Fraunhofer ITWM * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Written by: * Phoebe Buckheister */ #ifndef MAC802154_LLSEC_H #define MAC802154_LLSEC_H #include #include #include #include #include #include struct mac802154_llsec_key { struct ieee802154_llsec_key key; /* one tfm for each authsize (4/8/16) */ struct crypto_aead *tfm[3]; struct crypto_skcipher *tfm0; struct kref ref; }; struct mac802154_llsec_device_key { struct ieee802154_llsec_device_key devkey; struct rcu_head rcu; }; struct mac802154_llsec_device { struct ieee802154_llsec_device dev; struct hlist_node bucket_s; struct hlist_node bucket_hw; /* protects dev.frame_counter and the elements of dev.keys */ spinlock_t lock; struct rcu_head rcu; }; struct mac802154_llsec_seclevel { struct ieee802154_llsec_seclevel level; struct rcu_head rcu; }; struct mac802154_llsec { struct ieee802154_llsec_params params; struct ieee802154_llsec_table table; DECLARE_HASHTABLE(devices_short, 6); DECLARE_HASHTABLE(devices_hw, 6); /* protects params, all other fields are fine with RCU */ rwlock_t lock; }; void mac802154_llsec_init(struct mac802154_llsec *sec); void mac802154_llsec_destroy(struct mac802154_llsec *sec); int mac802154_llsec_get_params(struct mac802154_llsec *sec, struct ieee802154_llsec_params *params); int mac802154_llsec_set_params(struct mac802154_llsec *sec, const struct ieee802154_llsec_params *params, int changed); int mac802154_llsec_key_add(struct mac802154_llsec *sec, const struct ieee802154_llsec_key_id *id, const struct ieee802154_llsec_key *key); int mac802154_llsec_key_del(struct mac802154_llsec *sec, const struct ieee802154_llsec_key_id *key); int mac802154_llsec_dev_add(struct mac802154_llsec *sec, const struct ieee802154_llsec_device *dev); int mac802154_llsec_dev_del(struct mac802154_llsec *sec, __le64 device_addr); int mac802154_llsec_devkey_add(struct mac802154_llsec *sec, __le64 dev_addr, const struct ieee802154_llsec_device_key *key); int mac802154_llsec_devkey_del(struct mac802154_llsec *sec, __le64 dev_addr, const struct ieee802154_llsec_device_key *key); int mac802154_llsec_seclevel_add(struct mac802154_llsec *sec, const struct ieee802154_llsec_seclevel *sl); int mac802154_llsec_seclevel_del(struct mac802154_llsec *sec, const struct ieee802154_llsec_seclevel *sl); int mac802154_llsec_encrypt(struct mac802154_llsec *sec, struct sk_buff *skb); int mac802154_llsec_decrypt(struct mac802154_llsec *sec, struct sk_buff *skb); #endif /* MAC802154_LLSEC_H */ ='2'/>context:space:mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-02-05 14:57:47 -0600
committerBjorn Helgaas <bhelgaas@google.com>2016-02-05 16:28:11 -0600
commit5bbe029ff7bc8ff82ef31d3480d68c95642a3c7a (patch)
treec84de09e2bf7af2691b13ac15ab3a21684c608b4 /include/asm-generic
parent41ccebaecef50e56f822791a52b7bd9e9608e5e6 (diff)
PCI: Move pci_set_flags() from asm-generic/pci-bridge.h to linux/pci.h
The PCI flag management constants and functions were previously declared in include/asm-generic/pci-bridge.h. But they are not specific to bridges, and arches did not include pci-bridge.h consistently. Move the following interfaces and related constants to include/linux/pci.h and remove pci-bridge.h: pci_set_flags() pci_add_flags() pci_clear_flags() pci_has_flag() This fixes these warnings when building for some arches: drivers/pci/host/pcie-designware.c:562:20: error: 'PCI_PROBE_ONLY' undeclared (first use in this function) drivers/pci/host/pcie-designware.c:562:7: error: implicit declaration of function 'pci_has_flag' [-Werror=implicit-function-declaration] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/asm-generic')