/* * This file is based on code from OCTEON SDK by Cavium Networks. * * Copyright (c) 2003-2010 Cavium Networks * * This file 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. */ /* * External interface for the Cavium Octeon ethernet driver. */ #ifndef OCTEON_ETHERNET_H #define OCTEON_ETHERNET_H #include #include /** * This is the definition of the Ethernet driver's private * driver state stored in netdev_priv(dev). */ struct octeon_ethernet { /* PKO hardware output port */ int port; /* PKO hardware queue for the port */ int queue; /* Hardware fetch and add to count outstanding tx buffers */ int fau; /* My netdev. */ struct net_device *netdev; /* * Type of port. This is one of the enums in * cvmx_helper_interface_mode_t */ int imode; /* List of outstanding tx buffers per queue */ struct sk_buff_head tx_free_list[16]; /* Device statistics */ struct net_device_stats stats; unsigned int last_speed; unsigned int last_link; /* Last negotiated link state */ u64 link_info; /* Called periodically to check link status */ void (*poll)(struct net_device *dev); struct delayed_work port_periodic_work; struct device_node *of_node; }; int cvm_oct_free_work(void *work_queue_entry); int cvm_oct_rgmii_open(struct net_device *dev); int cvm_oct_sgmii_init(struct net_device *dev); int cvm_oct_sgmii_open(struct net_device *dev); int cvm_oct_spi_init(struct net_device *dev); void cvm_oct_spi_uninit(struct net_device *dev); int cvm_oct_common_init(struct net_device *dev); void cvm_oct_common_uninit(struct net_device *dev); void cvm_oct_adjust_link(struct net_device *dev); int cvm_oct_common_stop(struct net_device *dev); int cvm_oct_common_open(struct net_device *dev, void (*link_poll)(struct net_device *)); void cvm_oct_note_carrier(struct octeon_ethernet *priv, cvmx_helper_link_info_t li); void cvm_oct_link_poll(struct net_device *dev); extern int always_use_pow; extern int pow_send_group; extern int pow_receive_groups; extern char pow_send_list[]; extern struct net_device *cvm_oct_device[]; extern atomic_t cvm_oct_poll_queue_stopping; extern u64 cvm_oct_tx_poll_interval; extern int rx_napi_weight; #endif get' action='/cgit.cgi/linux/net-next.git/log/net/mac80211/fils_aead.c'>
AgeCommit message (Collapse)AuthorFilesLines
2017-02-06mac80211: Allocate a sync skcipher explicitly for FILS AEADJouni Malinen1-2/+2
The skcipher could have been of the async variant which may return from skcipher_encrypt() with -EINPROGRESS after having queued the request. The FILS AEAD implementation here does not have code for dealing with that possibility, so allocate a sync cipher explicitly to avoid potential issues with hardware accelerators. This is based on the patch sent out by Ard. Fixes: 39404feee691 ("mac80211: FILS AEAD protection for station mode association frames") Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06mac80211: Fix FILS AEAD protection in Association Request frameJouni Malinen1-1/+1
Incorrect num_elem parameter value (1 vs. 5) was used in the aes_siv_encrypt() call. This resulted in only the first one of the five AAD vectors to SIV getting included in calculation. This does not protect all the contents correctly and would not interoperate with a standard compliant implementation. Fix this by using the correct number. A matching fix is needed in the AP side (hostapd) to get FILS authentication working properly. Fixes: 39404feee691 ("mac80211: FILS AEAD protection for station mode association frames") Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>