Skip to contentSkip to conversation

atheros driver (2/8)

PATCH Mateusz Berezecki 1 participant 1 message Aug 5, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw
drivers/net/wireless/atheros/atheros5212/atheros.h +180 -0
diff -uprN -X 'netdev-2.6.git#ieee80211/Documentation/dontdiff' netdev-2.6.git#ieee80211/drivers/net/wireless/atheros/atheros5212/atheros.h netdev-atheros/drivers/net/wireless/atheros/atheros5212/atheros.h
@@ -0,0 +1,180 @@
+/*
+ * All the work was created by reverse engineering and porting
+ * for interoperability. The creator is Mateusz Berezecki,
+ * unless explicitly marked ( some parts are derived
+ * from GPL'ed parts of madwifi project located at http://madwifi.sf.net)
+ *
+ * derived or copied parts of code licensed under
+ * dual GPL/BSD license
+ * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
+ * All rights reserved.
+ * 
+ * rest of the code has been reversed by me and is under copyright too
+ * Copyright (C) 2005  Mateusz Berezecki
+ * 
+ * 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.
+ * 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.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ */
+
+#ifndef _ATHEROS_H
+#define _ATHEROS_H
+
+#include "atheros_dev.h"
+
+typedef enum {
+	PMODE_UNDEFINED        = 0,
+	PMODE_AUTO             = 1,
+	PMODE_AWAKE            = 2,
+	PMODE_FULL_SLEEP       = 3,
+	PMODE_NETWORK_SLEEP    = 4
+} POWER_MODE;
+
+#define IEEE80211_CHAN_2GHZ     0x0080  /* 2 GHz spectrum channel. */
+#define IEEE80211_CHAN_5GHZ     0x0100  /* 5 GHz spectrum channel */
+
+typedef enum {
+	CAP_REG_DMN         = 0,    /* current regulatory domain */
+	CAP_CIPHER          = 1,    /* hardware supports cipher */
+	CAP_TKIP_MIC        = 2,    /* handle TKIP MIC in hardware */
+	CAP_TKIP_SPLIT      = 3,    /* hardware TKIP uses split keys */
+	CAP_PHYCOUNTERS     = 4,    /* hardware PHY error counters */
+	CAP_DIVERSITY       = 5,    /* hardware supports fast diversity */
+	CAP_KEYCACHE_SIZE   = 6,    /* number of entries in key cache */
+	CAP_NUM_TXQUEUES    = 7,    /* number of hardware xmit queues */
+	CAP_VEOL            = 9,    /* hardware supports virtual EOL */
+	CAP_PSPOLL          = 10,   /* hardware has working PS-Poll support */
+	CAP_DIAG            = 11,   /* hardware diagnostic support */
+	CAP_COMPRESSION     = 12,   /* hardware supports compression */
+	CAP_BURST           = 13,   /* hardware supports packet bursting */
+	CAP_FASTFRAME       = 14,   /* hardware supoprts fast frames */
+	CAP_TXPOW           = 15,   /* global tx power limit  */
+	CAP_TPC             = 16    /* per-packet tx power control  */
+} CAPABILITY_TYPE;
+
+typedef enum {
+	CIPHER_WEP 		= 0,
+	CIPHER_AES_OCB 		= 1,
+	CIPHER_AES_CCM		= 2,
+	CIPHER_CKIP		= 3,
+	CIPHER_TKIP		= 4,
+	CIPHER_CLR		= 5,
+	CIPHER_MIC		= 127
+} CIPHER;
+
+typedef enum {
+	CHIP_5GHZ = IEEE80211_CHAN_5GHZ,
+	CHIP_2GHZ = IEEE80211_CHAN_2GHZ,
+} CHIP;
+
+enum version {
+	AR5210  = 0,
+	AR5211  = 1,
+	AR5212  = 2,
+};
+
+enum radio {
+	AR5110  = 0,
+	AR5111  = 1,
+	AR5112  = 2,
+};
+
+/* from madwifi source */
+enum opmode {
+	IEEE80211_M_STA         = 1,    /* infrastructure station */
+	IEEE80211_M_IBSS        = 0,    /* IBSS (adhoc) station */
+	IEEE80211_M_AHDEMO      = 3,    /* Old lucent compatible adhoc demo */
+	IEEE80211_M_HOSTAP      = 6,    /* Software Access Point */
+	IEEE80211_M_MONITOR     = 8     /* Monitor mode */
+};
+
+typedef enum {
+	INT_RX      = 0x00000001,   /* Non-common mapping */
+	INT_RXDESC  = 0x00000002,
+	INT_RXNOFRM = 0x00000008,
+	INT_RXEOL   = 0x00000010,
+	INT_RXORN   = 0x00000020,
+	INT_TX      = 0x00000040,   /* Non-common mapping */
+	INT_TXDESC  = 0x00000080,
+	INT_TXURN   = 0x00000800,
+	INT_MIB     = 0x00001000,
+	INT_RXPHY   = 0x00004000,
+	INT_RXKCM   = 0x00008000,
+	INT_SWBA    = 0x00010000,
+	INT_BMISS   = 0x00040000,
+	INT_BNR     = 0x00100000,   /* Non-common mapping */
+	INT_GPIO    = 0x01000000,
+	INT_FATAL   = 0x40000000,   /* Non-common mapping */
+	INT_GLOBAL  = 0x80000000,   /* Set/clear IER */
+	
+	/* Interrupt bits that map directly to ISR/IMR bits */
+	INT_COMMON  = 	  INT_RXNOFRM
+			| INT_RXDESC
+			| INT_RXEOL
+			| INT_RXORN
+			| INT_TXURN
+			| INT_TXDESC
+			| INT_MIB
+			| INT_RXPHY
+			| INT_RXKCM
+			| INT_SWBA
+			| INT_BMISS
+			| INT_GPIO,
+	
+	INT_NOCARD  = 0xffffffff    /* To signal the card was removed */
+} INT;
+
+
+
+/* declarations and prototypes */
+extern struct iw_handler_def ath_iw_handler_def;
+extern const struct iw_priv_args ieee80211_priv_args[];
+
+/* reg read and write */
+unsigned int ath_reg_read(struct net_device *, unsigned int);
+void ath_reg_write(struct net_device *, unsigned int, unsigned int);
+void ath_reg_disable(struct net_device *, unsigned int, unsigned int);
+void ath_reg_enable(struct net_device *, unsigned int, unsigned int);
+
+/* caps */
+unsigned int ath_get_cap(struct net_device *, CAPABILITY_TYPE,
+		unsigned int, unsigned int *);
+
+/* key */
+unsigned int ath_get_keycache_size(struct net_device *);
+unsigned int ath_reset_keycache(struct net_device *, unsigned short);
+
+/* chans */
+unsigned int ath_get_channels(struct net_device *,
+		unsigned int, unsigned int, unsigned int);
+
+/* beacons */
+unsigned int ath_beacon_queue_setup(struct net_device *);
+
+/* TX/RX */
+struct tx_queue *ath_txq_setup(struct net_device *, int, int);
+unsigned int ath_setup_tx_queue(struct net_device *, unsigned int, 
+		struct tx_queue_info *);
+int ath_startrecv(struct net_device *);
+void ath_draintxq(struct net_device *);
+void ath_stoprecv(struct net_device *);
+
+
+/* init */
+int ath_stop_locked(struct net_device *);
+
+/* interrupts */
+unsigned int ath_set_interruptmask(struct net_device *, unsigned int);
+
+
+#endif
drivers/net/wireless/atheros/atheros5212/atheros_defs.h +82 -0

82 lines not on this page · raw message

drivers/net/wireless/atheros/atheros5212/atheros_dev.h +305 -0

305 lines not on this page · raw message

drivers/net/wireless/atheros/atheros5212/atheros_id.h +59 -0

59 lines not on this page · raw message

drivers/net/wireless/atheros/atheros5212/atheros_registers.h +1341 -0

1,341 lines not on this page · raw message

_______________________________________________
Kernel-mentors mailing list
[email protected]
http://selenic.com/mailman/listinfo/kernel-mentors