diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-10-23 15:19:48 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-10-30 19:29:52 +0200 |
commit | 1535d5962d79b8f4bddfd480399828b8db9d7a1c (patch) | |
tree | 806be2995bfd46e2215f0412ea928c0899cb2a89 /drivers/net/wireless/intersil/orinoco/mic.c | |
parent | 757a46c2a7a99a4e12f6a267e945c98324c41702 (diff) |
wifi: remove orphaned orinoco driver
Orinoco is a PIO-only ISA/PCMCIA 802.11b device with extra bus interface
connections for PCI/Cardbus/mini-PCI and a few pre-2002 Apple PowerMac
variants. It supports both wireless extensions and CFG80211, but I could
not tell if it requires using both.
This device used to be one of the most common ones 20 years ago, but
has been orphaned for most of the time since then, and the conversion
to cfg80211 has stalled in 2010.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Diffstat (limited to 'drivers/net/wireless/intersil/orinoco/mic.c')
-rw-r--r-- | drivers/net/wireless/intersil/orinoco/mic.c | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/drivers/net/wireless/intersil/orinoco/mic.c b/drivers/net/wireless/intersil/orinoco/mic.c deleted file mode 100644 index a324bc4b7938..000000000000 --- a/drivers/net/wireless/intersil/orinoco/mic.c +++ /dev/null @@ -1,89 +0,0 @@ -/* Orinoco MIC helpers - * - * See copyright notice in main.c - */ -#include <linux/kernel.h> -#include <linux/string.h> -#include <linux/if_ether.h> -#include <linux/scatterlist.h> -#include <crypto/hash.h> - -#include "orinoco.h" -#include "mic.h" - -/********************************************************************/ -/* Michael MIC crypto setup */ -/********************************************************************/ -int orinoco_mic_init(struct orinoco_private *priv) -{ - priv->tx_tfm_mic = crypto_alloc_shash("michael_mic", 0, 0); - if (IS_ERR(priv->tx_tfm_mic)) { - printk(KERN_DEBUG "%s: could not allocate " - "crypto API michael_mic\n", __func__); - priv->tx_tfm_mic = NULL; - return -ENOMEM; - } - - priv->rx_tfm_mic = crypto_alloc_shash("michael_mic", 0, 0); - if (IS_ERR(priv->rx_tfm_mic)) { - printk(KERN_DEBUG "%s: could not allocate " - "crypto API michael_mic\n", __func__); - priv->rx_tfm_mic = NULL; - return -ENOMEM; - } - - return 0; -} - -void orinoco_mic_free(struct orinoco_private *priv) -{ - if (priv->tx_tfm_mic) - crypto_free_shash(priv->tx_tfm_mic); - if (priv->rx_tfm_mic) - crypto_free_shash(priv->rx_tfm_mic); -} - -int orinoco_mic(struct crypto_shash *tfm_michael, u8 *key, - u8 *da, u8 *sa, u8 priority, - u8 *data, size_t data_len, u8 *mic) -{ - SHASH_DESC_ON_STACK(desc, tfm_michael); - u8 hdr[ETH_HLEN + 2]; /* size of header + padding */ - int err; - - if (tfm_michael == NULL) { - printk(KERN_WARNING "%s: tfm_michael == NULL\n", __func__); - return -1; - } - - /* Copy header into buffer. We need the padding on the end zeroed */ - memcpy(&hdr[0], da, ETH_ALEN); - memcpy(&hdr[ETH_ALEN], sa, ETH_ALEN); - hdr[ETH_ALEN * 2] = priority; - hdr[ETH_ALEN * 2 + 1] = 0; - hdr[ETH_ALEN * 2 + 2] = 0; - hdr[ETH_ALEN * 2 + 3] = 0; - - desc->tfm = tfm_michael; - - err = crypto_shash_setkey(tfm_michael, key, MIC_KEYLEN); - if (err) - return err; - - err = crypto_shash_init(desc); - if (err) - return err; - - err = crypto_shash_update(desc, hdr, sizeof(hdr)); - if (err) - return err; - - err = crypto_shash_update(desc, data, data_len); - if (err) - return err; - - err = crypto_shash_final(desc, mic); - shash_desc_zero(desc); - - return err; -} |