Skip to content

Commit

Permalink
[PATCH] hostap: Fix hostap_pci build with PRISM2_IO_DEBUG
Browse files Browse the repository at this point in the history
The debug version of I/O functions in hostap_pci had not survived the
change to start using hw_priv pointer, so let's fix them to actually
define the local hw_priv variable.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Jouni Malinen authored and Jeff Garzik committed Oct 4, 2005
1 parent bab7619 commit f7a7444
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/wireless/hostap/hostap_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ static struct pci_device_id prism2_pci_id_table[] __devinitdata = {
static inline void hfa384x_outb_debug(struct net_device *dev, int a, u8 v)
{
struct hostap_interface *iface;
struct hostap_pci_priv *hw_priv;
local_info_t *local;
unsigned long flags;

iface = netdev_priv(dev);
local = iface->local;
hw_priv = local->hw_priv;

spin_lock_irqsave(&local->lock, flags);
prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTB, a, v);
Expand All @@ -74,12 +76,14 @@ static inline void hfa384x_outb_debug(struct net_device *dev, int a, u8 v)
static inline u8 hfa384x_inb_debug(struct net_device *dev, int a)
{
struct hostap_interface *iface;
struct hostap_pci_priv *hw_priv;
local_info_t *local;
unsigned long flags;
u8 v;

iface = netdev_priv(dev);
local = iface->local;
hw_priv = local->hw_priv;

spin_lock_irqsave(&local->lock, flags);
v = readb(hw_priv->mem_start + a);
Expand All @@ -91,11 +95,13 @@ static inline u8 hfa384x_inb_debug(struct net_device *dev, int a)
static inline void hfa384x_outw_debug(struct net_device *dev, int a, u16 v)
{
struct hostap_interface *iface;
struct hostap_pci_priv *hw_priv;
local_info_t *local;
unsigned long flags;

iface = netdev_priv(dev);
local = iface->local;
hw_priv = local->hw_priv;

spin_lock_irqsave(&local->lock, flags);
prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_OUTW, a, v);
Expand All @@ -106,12 +112,14 @@ static inline void hfa384x_outw_debug(struct net_device *dev, int a, u16 v)
static inline u16 hfa384x_inw_debug(struct net_device *dev, int a)
{
struct hostap_interface *iface;
struct hostap_pci_priv *hw_priv;
local_info_t *local;
unsigned long flags;
u16 v;

iface = netdev_priv(dev);
local = iface->local;
hw_priv = local->hw_priv;

spin_lock_irqsave(&local->lock, flags);
v = readw(hw_priv->mem_start + a);
Expand Down

0 comments on commit f7a7444

Please sign in to comment.