Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09505184 authored by Larry Finger's avatar Larry Finger
Browse files

staging: rtl8192e: Remove files that are not used



For the most part, these extra files came from the previous version
of the RTL8192E driver.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent 9de9f962
Loading
Loading
Loading
Loading
+0 −93
Original line number Diff line number Diff line
/*
 * Cryptographic API.
 *
 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 */
#ifndef _CRYPTO_INTERNAL_H
#define _CRYPTO_INTERNAL_H


#include <linux/version.h>
#include "rtl_crypto.h"
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/init.h>

#include <linux/hardirq.h>
#include <linux/sched.h>
#include <asm/kmap_types.h>

extern enum km_type crypto_km_types[];

static inline enum km_type crypto_kmap_type(int out)
{
	return crypto_km_types[(in_softirq() ? 2 : 0) + out];
}

static inline void *crypto_kmap(struct page *page, int out)
{
	return kmap_atomic(page, crypto_kmap_type(out));
}

static inline void crypto_kunmap(void *vaddr, int out)
{
	kunmap_atomic(vaddr, crypto_kmap_type(out));
}

static inline void crypto_yield(struct crypto_tfm *tfm)
{
	if (!in_softirq())
		cond_resched();
}

static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm)
{
	return (void *)&tfm[1];
}

struct crypto_alg *crypto_alg_lookup(const char *name);

#ifdef CONFIG_KMOD
void crypto_alg_autoload(const char *name);
struct crypto_alg *crypto_alg_mod_lookup(const char *name);
#else
static inline struct crypto_alg *crypto_alg_mod_lookup(const char *name)
{
	return crypto_alg_lookup(name);
}
#endif

static inline int crypto_alloc_hmac_block(struct crypto_tfm *tfm)
{
	return 0;
}

static inline void crypto_free_hmac_block(struct crypto_tfm *tfm)
{ }

#ifdef CONFIG_PROC_FS
void __init crypto_init_proc(void);
#else
static inline void crypto_init_proc(void)
{ }
#endif

int crypto_init_digest_flags(struct crypto_tfm *tfm, u32 flags);
int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags);
int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags);

int crypto_init_digest_ops(struct crypto_tfm *tfm);
int crypto_init_cipher_ops(struct crypto_tfm *tfm);
int crypto_init_compress_ops(struct crypto_tfm *tfm);

void crypto_exit_digest_ops(struct crypto_tfm *tfm);
void crypto_exit_cipher_ops(struct crypto_tfm *tfm);
void crypto_exit_compress_ops(struct crypto_tfm *tfm);

#endif	/* _CRYPTO_INTERNAL_H */
+0 −20
Original line number Diff line number Diff line
#ifndef __KMAP_TYPES_H

#define __KMAP_TYPES_H


enum km_type {
	KM_BOUNCE_READ,
	KM_SKB_SUNRPC_DATA,
	KM_SKB_DATA_SOFTIRQ,
	KM_USER0,
	KM_USER1,
	KM_BH_IRQ,
	KM_SOFTIRQ0,
	KM_SOFTIRQ1,
	KM_TYPE_NR
};

#define _ASM_KMAP_TYPES_H

#endif
+0 −141
Original line number Diff line number Diff line
/*
   This files contains card eeprom (93c46 or 93c56) programming routines,
   memory is addressed by 16 bits words.

   This is part of rtl8180 OpenSource driver.
   Copyright (C) Andrea Merello 2004  <andreamrl@tiscali.it>
   Released under the terms of GPL (General Public Licence)

   Parts of this driver are based on the GPL part of the
   official realtek driver.

   Parts of this driver are based on the rtl8180 driver skeleton
   from Patric Schenke & Andres Salomon.

   Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver.

   We want to tanks the Authors of those projects and the Ndiswrapper
   project Authors.
*/

#include "r8180_93cx6.h"

static void eprom_cs(struct r8192_priv *priv, short bit)
{
	if (bit)
		write_nic_byte(priv, EPROM_CMD,
			       (1<<EPROM_CS_SHIFT) |
			       read_nic_byte(priv, EPROM_CMD)); //enable EPROM
	else
		write_nic_byte(priv, EPROM_CMD, read_nic_byte(priv, EPROM_CMD)
			       &~(1<<EPROM_CS_SHIFT)); //disable EPROM

	udelay(EPROM_DELAY);
}


static void eprom_ck_cycle(struct r8192_priv *priv)
{
	write_nic_byte(priv, EPROM_CMD,
		       (1<<EPROM_CK_SHIFT) | read_nic_byte(priv, EPROM_CMD));
	udelay(EPROM_DELAY);
	write_nic_byte(priv, EPROM_CMD,
		       read_nic_byte(priv, EPROM_CMD) & ~(1<<EPROM_CK_SHIFT));
	udelay(EPROM_DELAY);
}


static void eprom_w(struct r8192_priv *priv, short bit)
{
	if (bit)
		write_nic_byte(priv, EPROM_CMD, (1<<EPROM_W_SHIFT) |
			       read_nic_byte(priv, EPROM_CMD));
	else
		write_nic_byte(priv, EPROM_CMD, read_nic_byte(priv, EPROM_CMD)
			       &~(1<<EPROM_W_SHIFT));

	udelay(EPROM_DELAY);
}


static short eprom_r(struct r8192_priv *priv)
{
	short bit;

	bit = (read_nic_byte(priv, EPROM_CMD) & (1<<EPROM_R_SHIFT));
	udelay(EPROM_DELAY);

	if (bit)
		return 1;
	return 0;
}


static void eprom_send_bits_string(struct r8192_priv *priv, short b[], int len)
{
	int i;

	for (i = 0; i < len; i++) {
		eprom_w(priv, b[i]);
		eprom_ck_cycle(priv);
	}
}


u32 eprom_read(struct r8192_priv *priv, u32 addr)
{
	short read_cmd[] = {1, 1, 0};
	short addr_str[8];
	int i;
	int addr_len;
	u32 ret;

	ret = 0;
        //enable EPROM programming
	write_nic_byte(priv, EPROM_CMD,
		       (EPROM_CMD_PROGRAM<<EPROM_CMD_OPERATING_MODE_SHIFT));
	udelay(EPROM_DELAY);

	if (priv->epromtype == EPROM_93c56) {
		addr_str[7] = addr & 1;
		addr_str[6] = addr & (1<<1);
		addr_str[5] = addr & (1<<2);
		addr_str[4] = addr & (1<<3);
		addr_str[3] = addr & (1<<4);
		addr_str[2] = addr & (1<<5);
		addr_str[1] = addr & (1<<6);
		addr_str[0] = addr & (1<<7);
		addr_len = 8;
	} else {
		addr_str[5] = addr & 1;
		addr_str[4] = addr & (1<<1);
		addr_str[3] = addr & (1<<2);
		addr_str[2] = addr & (1<<3);
		addr_str[1] = addr & (1<<4);
		addr_str[0] = addr & (1<<5);
		addr_len = 6;
	}
	eprom_cs(priv, 1);
	eprom_ck_cycle(priv);
	eprom_send_bits_string(priv, read_cmd, 3);
	eprom_send_bits_string(priv, addr_str, addr_len);

	//keep chip pin D to low state while reading.
	//I'm unsure if it is necessary, but anyway shouldn't hurt
	eprom_w(priv, 0);

	for (i = 0; i < 16; i++) {
		//eeprom needs a clk cycle between writing opcode&adr
		//and reading data. (eeprom outs a dummy 0)
		eprom_ck_cycle(priv);
		ret |= (eprom_r(priv)<<(15-i));
	}

	eprom_cs(priv, 0);
	eprom_ck_cycle(priv);

	//disable EPROM programming
	write_nic_byte(priv, EPROM_CMD,
		       (EPROM_CMD_NORMAL<<EPROM_CMD_OPERATING_MODE_SHIFT));
	return ret;
}
+0 −41
Original line number Diff line number Diff line
/* r8180_93cx6.h - 93c46 or 93c56 eeprom card programming routines
 *
 * This is part of rtl8187 OpenSource driver
 * Copyright (C) Andrea Merello 2004-2005  <andreamrl@tiscali.it>
 * Released under the terms of GPL (General Public Licence)
 * Parts of this driver are based on the GPL part of the official realtek driver
 *
 * Parts of this driver are based on the rtl8180 driver skeleton from
 * Patric Schenke & Andres Salomon.
 *
 * Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver
 *
 * We want to thank the authors of the above mentioned projects and to
 * the authors of the Ndiswrapper project.
 */

#include "r8192E.h"
#include "r8192E_hw.h"

#define EPROM_DELAY 10

#define EPROM_ANAPARAM_ADDRLWORD 0xd
#define EPROM_ANAPARAM_ADDRHWORD 0xe

#define EPROM_RFCHIPID 0x6
#define EPROM_TXPW_BASE 0x05
#define EPROM_RFCHIPID_RTL8225U 5
#define EPROM_RF_PARAM 0x4
#define EPROM_CONFIG2 0xc

#define EPROM_VERSION 0x1E
#define MAC_ADR 0x7

#define CIS 0x18

#define EPROM_TXPW0 0x16
#define EPROM_TXPW2 0x1b
#define EPROM_TXPW1 0x3d

/* Reads a 16 bits word. */
u32 eprom_read(struct r8192_priv *priv, u32 addr);
+0 −4538

File deleted.

Preview size limit exceeded, changes collapsed.

Loading