Main Page | Data Structures | Directories | File List | Data Fields | Globals

regdomain.c File Reference

#include <sys/mman.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

Include dependency graph for regdomain.c:

Go to the source code of this file.

Defines

#define AR5K_PCICFG   0x4010
#define AR5K_PCICFG_EEAE   0x00000001
#define AR5K_PCICFG_CLKRUNEN   0x00000004
#define AR5K_PCICFG_LED_PEND   0x00000020
#define AR5K_PCICFG_LED_ACT   0x00000040
#define AR5K_PCICFG_SL_INTEN   0x00000800
#define AR5K_PCICFG_BCTL   0x00001000
#define AR5K_PCICFG_SPWR_DN   0x00010000
#define AR5211_EEPROM_ADDR   0x6000
#define AR5211_EEPROM_DATA   0x6004
#define AR5211_EEPROM_COMD   0x6008
#define AR5211_EEPROM_COMD_READ   0x0001
#define AR5211_EEPROM_COMD_WRITE   0x0002
#define AR5211_EEPROM_COMD_RESET   0x0003
#define AR5211_EEPROM_STATUS   0x600C
#define AR5211_EEPROM_STAT_RDERR   0x0001
#define AR5211_EEPROM_STAT_RDDONE   0x0002
#define AR5211_EEPROM_STAT_WRERR   0x0003
#define AR5211_EEPROM_STAT_WRDONE   0x0004
#define AR5211_EEPROM_CONF   0x6010
#define VT_WLAN_IN32(a)   (*((volatile unsigned long int *)(mem + (a))))
#define VT_WLAN_OUT32(v, a)   (*((volatile unsigned long int *)(mem + (a))) = (v))
#define ATHEROS_PCI_MEM_SIZE   0x10000

Functions

int vt_ar5211_eeprom_read (unsigned char *mem, unsigned long int offset, unsigned short int *data)
int vt_ar5211_eeprom_write (unsigned char *mem, unsigned int offset, unsigned short int new_data)
static void Usage (char *progname)
int main (int argc, char **argv)


Define Documentation

#define AR5211_EEPROM_ADDR   0x6000
 

Definition at line 43 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

#define AR5211_EEPROM_COMD   0x6008
 

Definition at line 45 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

#define AR5211_EEPROM_COMD_READ   0x0001
 

Definition at line 46 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read().

#define AR5211_EEPROM_COMD_RESET   0x0003
 

Definition at line 48 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

#define AR5211_EEPROM_COMD_WRITE   0x0002
 

Definition at line 47 of file regdomain.c.

Referenced by vt_ar5211_eeprom_write().

#define AR5211_EEPROM_CONF   0x6010
 

Definition at line 54 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

#define AR5211_EEPROM_DATA   0x6004
 

Definition at line 44 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

#define AR5211_EEPROM_STAT_RDDONE   0x0002
 

Definition at line 51 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read().

#define AR5211_EEPROM_STAT_RDERR   0x0001
 

Definition at line 50 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read().

#define AR5211_EEPROM_STAT_WRDONE   0x0004
 

Definition at line 53 of file regdomain.c.

#define AR5211_EEPROM_STAT_WRERR   0x0003
 

Definition at line 52 of file regdomain.c.

Referenced by vt_ar5211_eeprom_write().

#define AR5211_EEPROM_STATUS   0x600C
 

Definition at line 49 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

#define AR5K_PCICFG   0x4010
 

Definition at line 33 of file regdomain.c.

Referenced by vt_ar5211_eeprom_write().

#define AR5K_PCICFG_BCTL   0x00001000
 

Definition at line 39 of file regdomain.c.

#define AR5K_PCICFG_CLKRUNEN   0x00000004
 

Definition at line 35 of file regdomain.c.

#define AR5K_PCICFG_EEAE   0x00000001
 

Definition at line 34 of file regdomain.c.

Referenced by vt_ar5211_eeprom_write().

#define AR5K_PCICFG_LED_ACT   0x00000040
 

Definition at line 37 of file regdomain.c.

#define AR5K_PCICFG_LED_PEND   0x00000020
 

Definition at line 36 of file regdomain.c.

#define AR5K_PCICFG_SL_INTEN   0x00000800
 

Definition at line 38 of file regdomain.c.

#define AR5K_PCICFG_SPWR_DN   0x00010000
 

Definition at line 40 of file regdomain.c.

Referenced by vt_ar5211_eeprom_write().

#define ATHEROS_PCI_MEM_SIZE   0x10000
 

Referenced by main().

#define VT_WLAN_IN32  )    (*((volatile unsigned long int *)(mem + (a))))
 

Definition at line 56 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

#define VT_WLAN_OUT32 v,
 )    (*((volatile unsigned long int *)(mem + (a))) = (v))
 

Definition at line 57 of file regdomain.c.

Referenced by vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().


Function Documentation

int main int argc,
char ** argv
 

Definition at line 180 of file regdomain.c.

References ATHEROS_PCI_MEM_SIZE, printf, Usage(), vt_ar5211_eeprom_read(), and vt_ar5211_eeprom_write().

Here is the call graph for this function:

static void Usage char * progname  ) [static]
 

Definition at line 171 of file regdomain.c.

Referenced by main().

int vt_ar5211_eeprom_read unsigned char * mem,
unsigned long int offset,
unsigned short int * data
 

enable eeprom read access

set address

Definition at line 60 of file regdomain.c.

References AR5211_EEPROM_ADDR, AR5211_EEPROM_COMD, AR5211_EEPROM_COMD_READ, AR5211_EEPROM_COMD_RESET, AR5211_EEPROM_CONF, AR5211_EEPROM_DATA, AR5211_EEPROM_STAT_RDDONE, AR5211_EEPROM_STAT_RDERR, AR5211_EEPROM_STATUS, VT_WLAN_IN32, and VT_WLAN_OUT32.

Referenced by main(), and vt_ar5211_eeprom_write().

int vt_ar5211_eeprom_write unsigned char * mem,
unsigned int offset,
unsigned short int new_data
 

enable eeprom access

enable eeprom write access

set address

Definition at line 104 of file regdomain.c.

References AR5211_EEPROM_ADDR, AR5211_EEPROM_COMD, AR5211_EEPROM_COMD_RESET, AR5211_EEPROM_COMD_WRITE, AR5211_EEPROM_CONF, AR5211_EEPROM_DATA, AR5211_EEPROM_STAT_WRERR, AR5211_EEPROM_STATUS, AR5K_PCICFG, AR5K_PCICFG_EEAE, AR5K_PCICFG_SPWR_DN, vt_ar5211_eeprom_read(), VT_WLAN_IN32, and VT_WLAN_OUT32.

Referenced by main().

Here is the call graph for this function:


Generated on Mon Nov 21 16:04:37 2005 for openwifi by  doxygen 1.4.1