Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (237 commits)
  Staging: android: binder: fix build errors
  Staging: android: add lowmemorykiller driver
  Staging: android: remove dummy android.c driver
  Staging: android: timed_gpio: Rename android_timed_gpio to timed_gpio
  Staging: android: add timed_gpio driver
  Staging: android: add ram_console driver
  Staging: android: add logging driver
  staging: android: binder: Fix use of euid
  Staging: android: binder: Fix gcc warnings about improper format specifiers for size_t in printk
  Staging: android: add binder driver
  Staging: add android framework
  Staging: epl: fix netdev->priv b0rkage
  Staging: epl: hr timers all run in hard irq context now
  Staging: epl: run Lindent on *.c files
  Staging: epl: run Lindent on *.h files
  Staging: epl: run Lindent on all user/*.h files
  Staging: epl: run Lindent on all kernel/*.h files
  Staging: add epl stack
  Staging: frontier: fix compiler warnings
  Staging: frontier: remove unused alphatrack_sysfs.c file
  ...
  • Loading branch information
Linus Torvalds committed Jan 7, 2009
2 parents 40d7ee5 + 7a9c67a commit ce519e2
Show file tree
Hide file tree
Showing 778 changed files with 473,145 additions and 26,929 deletions.
2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,8 @@ source "drivers/regulator/Kconfig"

source "drivers/uio/Kconfig"

source "drivers/staging/Kconfig"

endmenu

source "fs/Kconfig"
Expand Down
2 changes: 2 additions & 0 deletions arch/cris/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,8 @@ source "drivers/usb/Kconfig"

source "drivers/uwb/Kconfig"

source "drivers/staging/Kconfig"

source "arch/cris/Kconfig.debug"

source "security/Kconfig"
Expand Down
2 changes: 2 additions & 0 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ source "drivers/uwb/Kconfig"

endmenu

source "drivers/staging/Kconfig"

source "fs/Kconfig"

source "arch/h8300/Kconfig.debug"
Expand Down
32 changes: 32 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ source "drivers/staging/sxg/Kconfig"

source "drivers/staging/me4000/Kconfig"

source "drivers/staging/meilhaus/Kconfig"

source "drivers/staging/go7007/Kconfig"

source "drivers/staging/usbip/Kconfig"
Expand All @@ -63,5 +65,35 @@ source "drivers/staging/at76_usb/Kconfig"

source "drivers/staging/poch/Kconfig"

source "drivers/staging/agnx/Kconfig"

source "drivers/staging/otus/Kconfig"

source "drivers/staging/rt2860/Kconfig"

source "drivers/staging/rt2870/Kconfig"

source "drivers/staging/benet/Kconfig"

source "drivers/staging/comedi/Kconfig"

source "drivers/staging/asus_oled/Kconfig"

source "drivers/staging/panel/Kconfig"

source "drivers/staging/altpciechdma/Kconfig"

source "drivers/staging/rtl8187se/Kconfig"

source "drivers/staging/rspiusb/Kconfig"

source "drivers/staging/mimio/Kconfig"

source "drivers/staging/frontier/Kconfig"

source "drivers/staging/epl/Kconfig"

source "drivers/staging/android/Kconfig"

endif # !STAGING_EXCLUDE_BUILD
endif # STAGING
16 changes: 16 additions & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,26 @@ obj-$(CONFIG_ET131X) += et131x/
obj-$(CONFIG_SLICOSS) += slicoss/
obj-$(CONFIG_SXG) += sxg/
obj-$(CONFIG_ME4000) += me4000/
obj-$(CONFIG_MEILHAUS) += meilhaus/
obj-$(CONFIG_VIDEO_GO7007) += go7007/
obj-$(CONFIG_USB_IP_COMMON) += usbip/
obj-$(CONFIG_W35UND) += winbond/
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_USB_ATMEL) += at76_usb/
obj-$(CONFIG_POCH) += poch/
obj-$(CONFIG_AGNX) += agnx/
obj-$(CONFIG_OTUS) += otus/
obj-$(CONFIG_RT2860) += rt2860/
obj-$(CONFIG_RT2870) += rt2870/
obj-$(CONFIG_BENET) += benet/
obj-$(CONFIG_COMEDI) += comedi/
obj-$(CONFIG_ASUS_OLED) += asus_oled/
obj-$(CONFIG_PANEL) += panel/
obj-$(CONFIG_ALTERA_PCIE_CHDMA) += altpciechdma/
obj-$(CONFIG_RTL8187SE) += rtl8187se/
obj-$(CONFIG_USB_RSPI) += rspiusb/
obj-$(CONFIG_INPUT_MIMIO) += mimio/
obj-$(CONFIG_TRANZPORT) += frontier/
obj-$(CONFIG_EPL) += epl/
obj-$(CONFIG_ANDROID) += android/
5 changes: 5 additions & 0 deletions drivers/staging/agnx/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config AGNX
tristate "Wireless Airgo AGNX support"
depends on WLAN_80211 && MAC80211
---help---
This is an experimental driver for Airgo AGNX00 wireless chip.
8 changes: 8 additions & 0 deletions drivers/staging/agnx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
obj-$(CONFIG_AGNX) += agnx.o

agnx-objs := rf.o \
pci.o \
xmit.o \
table.o \
sta.o \
phy.o
22 changes: 22 additions & 0 deletions drivers/staging/agnx/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
2008 7/18

The RX has can't receive OFDM packet correctly,
Guess it need be do RX calibrate.


before 2008 3/1

1: The RX get too much "CRC failed" pakets, it make the card work very unstable,
2: After running a while, the card will get infinity "RX Frame" and "Error"
interrupt, not know the root reason so far, try to fix it
3: Using two tx queue txd and txm but not only txm.
4: Set the hdr correctly.
5: Try to do recalibrate correvtly
6: To support G mode in future
7: Fix the mac address can't be readed and set correctly in BE machine.
8: Fix include and exclude FCS in promisous mode and manage mode
9: Using sta_notify to notice sta change
10: Turn on frame reception at the end of start
11: Guess the card support HW_MULTICAST_FILTER
12: The tx process should be implment atomic?
13: Using mac80211 function to control the TX&RX LED.
154 changes: 154 additions & 0 deletions drivers/staging/agnx/agnx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
#ifndef AGNX_H_
#define AGNX_H_

#include "xmit.h"

#define PFX KBUILD_MODNAME ": "

static inline u32 agnx_read32(void __iomem *mem_region, u32 offset)
{
return ioread32(mem_region + offset);
}

static inline void agnx_write32(void __iomem *mem_region, u32 offset, u32 val)
{
iowrite32(val, mem_region + offset);
}

/* static const struct ieee80211_rate agnx_rates_80211b[] = { */
/* { .rate = 10, */
/* .val = 0xa, */
/* .flags = IEEE80211_RATE_CCK }, */
/* { .rate = 20, */
/* .val = 0x14, */
/* .hw_value = -0x14, */
/* .flags = IEEE80211_RATE_CCK_2 }, */
/* { .rate = 55, */
/* .val = 0x37, */
/* .val2 = -0x37, */
/* .flags = IEEE80211_RATE_CCK_2 }, */
/* { .rate = 110, */
/* .val = 0x6e, */
/* .val2 = -0x6e, */
/* .flags = IEEE80211_RATE_CCK_2 } */
/* }; */


static const struct ieee80211_rate agnx_rates_80211g[] = {
/* { .bitrate = 10, .hw_value = 1, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, */
/* { .bitrate = 20, .hw_value = 2, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, */
/* { .bitrate = 55, .hw_value = 3, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, */
/* { .bitrate = 110, .hw_value = 4, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, */
{ .bitrate = 10, .hw_value = 1, },
{ .bitrate = 20, .hw_value = 2, },
{ .bitrate = 55, .hw_value = 3, },
{ .bitrate = 110, .hw_value = 4,},

{ .bitrate = 60, .hw_value = 0xB, },
{ .bitrate = 90, .hw_value = 0xF, },
{ .bitrate = 120, .hw_value = 0xA },
{ .bitrate = 180, .hw_value = 0xE, },
// { .bitrate = 240, .hw_value = 0xd, },
{ .bitrate = 360, .hw_value = 0xD, },
{ .bitrate = 480, .hw_value = 0x8, },
{ .bitrate = 540, .hw_value = 0xC, },
};

static const struct ieee80211_channel agnx_channels[] = {
{ .center_freq = 2412, .hw_value = 1, },
{ .center_freq = 2417, .hw_value = 2, },
{ .center_freq = 2422, .hw_value = 3, },
{ .center_freq = 2427, .hw_value = 4, },
{ .center_freq = 2432, .hw_value = 5, },
{ .center_freq = 2437, .hw_value = 6, },
{ .center_freq = 2442, .hw_value = 7, },
{ .center_freq = 2447, .hw_value = 8, },
{ .center_freq = 2452, .hw_value = 9, },
{ .center_freq = 2457, .hw_value = 10, },
{ .center_freq = 2462, .hw_value = 11, },
{ .center_freq = 2467, .hw_value = 12, },
{ .center_freq = 2472, .hw_value = 13, },
{ .center_freq = 2484, .hw_value = 14, },
};

#define NUM_DRIVE_MODES 2
/* Agnx operate mode */
enum {
AGNX_MODE_80211A,
AGNX_MODE_80211A_OOB,
AGNX_MODE_80211A_MIMO,
AGNX_MODE_80211B_SHORT,
AGNX_MODE_80211B_LONG,
AGNX_MODE_80211G,
AGNX_MODE_80211G_OOB,
AGNX_MODE_80211G_MIMO,
};

enum {
AGNX_UNINIT,
AGNX_START,
AGNX_STOP,
};

struct agnx_priv {
struct pci_dev *pdev;
struct ieee80211_hw *hw;

spinlock_t lock;
struct mutex mutex;
unsigned int init_status;

void __iomem *ctl; /* pointer to base ram address */
void __iomem *data; /* pointer to mem region #2 */

struct agnx_ring rx;
struct agnx_ring txm;
struct agnx_ring txd;

/* Need volatile? */
u32 irq_status;

struct delayed_work periodic_work; /* Periodic tasks like recalibrate*/
struct ieee80211_low_level_stats stats;

// unsigned int phymode;
int mode;
int channel;
u8 bssid[ETH_ALEN];

u8 mac_addr[ETH_ALEN];
u8 revid;

struct ieee80211_supported_band band;
};


#define AGNX_CHAINS_MAX 6
#define AGNX_PERIODIC_DELAY 60000 /* unit: ms */
#define LOCAL_STAID 0 /* the station entry for the card itself */
#define BSSID_STAID 1 /* the station entry for the bsssid AP */
#define spi_delay() udelay(40)
#define eeprom_delay() udelay(40)
#define routing_table_delay() udelay(50)

/* PDU pool MEM region #2 */
#define AGNX_PDUPOOL 0x40000 /* PDU pool */
#define AGNX_PDUPOOL_SIZE 0x8000 /* PDU pool size*/
#define AGNX_PDU_TX_WQ 0x41000 /* PDU list TX workqueue */
#define AGNX_PDU_FREE 0x41800 /* Free Pool */
#define PDU_SIZE 0x80 /* Free Pool node size */
#define PDU_FREE_CNT 0xd0 /* Free pool node count */


/* RF stuffs */
extern void rf_chips_init(struct agnx_priv *priv);
extern void spi_rc_write(void __iomem *mem_region, u32 chip_ids, u32 sw);
extern void calibrate_oscillator(struct agnx_priv *priv);
extern void do_calibration(struct agnx_priv *priv);
extern void antenna_calibrate(struct agnx_priv *priv);
extern void __antenna_calibrate(struct agnx_priv *priv);
extern void print_offsets(struct agnx_priv *priv);
extern int agnx_set_channel(struct agnx_priv *priv, unsigned int channel);


#endif /* AGNX_H_ */
Loading

0 comments on commit ce519e2

Please sign in to comment.