Commit 9afac70a authored by David Kilroy's avatar David Kilroy Committed by John W. Linville

orinoco: add orinoco_usb driver

This driver uses the core orinoco modules for the bulk of
the functionality. The low level hermes routines (for local bus
cards) are replaced, the driver supplies its own ndo_xmit_start
function, and locking is done with the _bh variant.

Some recent functionality is not available to the USB cards yet
(firmware loading and WPA).

Out-of-tree driver originally written by Manuel Estrada Sainz.

Thanks to Mark Davis for supplying hardware to test the updates.
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bcad6e80
...@@ -132,3 +132,10 @@ config PCMCIA_SPECTRUM ...@@ -132,3 +132,10 @@ config PCMCIA_SPECTRUM
This driver requires firmware download on startup. Utilities This driver requires firmware download on startup. Utilities
for downloading Symbol firmware are available at for downloading Symbol firmware are available at
<http://sourceforge.net/projects/orinoco/> <http://sourceforge.net/projects/orinoco/>
config ORINOCO_USB
tristate "Agere Orinoco USB support"
depends on USB && HERMES
select FW_LOADER
---help---
This driver is for USB versions of the Agere Orinoco card.
...@@ -11,6 +11,7 @@ obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o ...@@ -11,6 +11,7 @@ obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o
obj-$(CONFIG_TMD_HERMES) += orinoco_tmd.o obj-$(CONFIG_TMD_HERMES) += orinoco_tmd.o
obj-$(CONFIG_NORTEL_HERMES) += orinoco_nortel.o obj-$(CONFIG_NORTEL_HERMES) += orinoco_nortel.o
obj-$(CONFIG_PCMCIA_SPECTRUM) += spectrum_cs.o obj-$(CONFIG_PCMCIA_SPECTRUM) += spectrum_cs.o
obj-$(CONFIG_ORINOCO_USB) += orinoco_usb.o
# Orinoco should be endian clean. # Orinoco should be endian clean.
ccflags-y += -D__CHECK_ENDIAN__ ccflags-y += -D__CHECK_ENDIAN__
...@@ -407,6 +407,7 @@ typedef struct hermes { ...@@ -407,6 +407,7 @@ typedef struct hermes {
#define HERMES_32BIT_REGSPACING 1 #define HERMES_32BIT_REGSPACING 1
u16 inten; /* Which interrupts should be enabled? */ u16 inten; /* Which interrupts should be enabled? */
const struct hermes_ops *ops; const struct hermes_ops *ops;
void *priv;
} hermes_t; } hermes_t;
/* Register access convenience macros */ /* Register access convenience macros */
......
...@@ -797,7 +797,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, ...@@ -797,7 +797,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid,
stats->rx_dropped++; stats->rx_dropped++;
} }
static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw)
{ {
struct orinoco_private *priv = ndev_priv(dev); struct orinoco_private *priv = ndev_priv(dev);
struct net_device_stats *stats = &priv->stats; struct net_device_stats *stats = &priv->stats;
...@@ -918,6 +918,7 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) ...@@ -918,6 +918,7 @@ static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw)
out: out:
kfree(desc); kfree(desc);
} }
EXPORT_SYMBOL(__orinoco_ev_rx);
static void orinoco_rx(struct net_device *dev, static void orinoco_rx(struct net_device *dev,
struct hermes_rx_descriptor *desc, struct hermes_rx_descriptor *desc,
...@@ -1359,7 +1360,7 @@ static void orinoco_process_scan_results(struct work_struct *work) ...@@ -1359,7 +1360,7 @@ static void orinoco_process_scan_results(struct work_struct *work)
spin_unlock_irqrestore(&priv->scan_lock, flags); spin_unlock_irqrestore(&priv->scan_lock, flags);
} }
static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) void __orinoco_ev_info(struct net_device *dev, hermes_t *hw)
{ {
struct orinoco_private *priv = ndev_priv(dev); struct orinoco_private *priv = ndev_priv(dev);
u16 infofid; u16 infofid;
...@@ -1577,6 +1578,7 @@ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) ...@@ -1577,6 +1578,7 @@ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw)
return; return;
} }
EXPORT_SYMBOL(__orinoco_ev_info);
static void __orinoco_ev_infdrop(struct net_device *dev, hermes_t *hw) static void __orinoco_ev_infdrop(struct net_device *dev, hermes_t *hw)
{ {
......
...@@ -197,6 +197,9 @@ extern int orinoco_up(struct orinoco_private *priv); ...@@ -197,6 +197,9 @@ extern int orinoco_up(struct orinoco_private *priv);
extern void orinoco_down(struct orinoco_private *priv); extern void orinoco_down(struct orinoco_private *priv);
extern irqreturn_t orinoco_interrupt(int irq, void *dev_id); extern irqreturn_t orinoco_interrupt(int irq, void *dev_id);
extern void __orinoco_ev_info(struct net_device *dev, hermes_t *hw);
extern void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw);
/* Common ndo functions exported for reuse by orinoco_usb */ /* Common ndo functions exported for reuse by orinoco_usb */
int orinoco_open(struct net_device *dev); int orinoco_open(struct net_device *dev);
int orinoco_stop(struct net_device *dev); int orinoco_stop(struct net_device *dev);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment