aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/pcmcia/ipwireless/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/pcmcia/ipwireless/network.c')
-rw-r--r--drivers/char/pcmcia/ipwireless/network.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/char/pcmcia/ipwireless/network.c b/drivers/char/pcmcia/ipwireless/network.c
index cf12eb400f9..28d9fd727d8 100644
--- a/drivers/char/pcmcia/ipwireless/network.c
+++ b/drivers/char/pcmcia/ipwireless/network.c
@@ -45,7 +45,7 @@ struct ipw_network {
/* Number of packets queued up in hardware module. */
int outgoing_packets_queued;
/* Spinlock to avoid interrupts during shutdown */
- spinlock_t spinlock;
+ spinlock_t lock;
struct mutex close_lock;
/* PPP ioctl data, not actually used anywere */
@@ -67,20 +67,20 @@ static void notify_packet_sent(void *callback_data, unsigned int packet_length)
struct ipw_network *network = callback_data;
unsigned long flags;
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
network->outgoing_packets_queued--;
if (network->ppp_channel != NULL) {
if (network->ppp_blocked) {
network->ppp_blocked = 0;
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
ppp_output_wakeup(network->ppp_channel);
if (ipwireless_debug)
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": ppp unblocked\n");
} else
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
} else
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
}
/*
@@ -92,7 +92,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
struct ipw_network *network = ppp_channel->private;
unsigned long flags;
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
if (network->outgoing_packets_queued < ipwireless_out_queue) {
unsigned char *buf;
static unsigned char header[] = {
@@ -102,7 +102,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
int ret;
network->outgoing_packets_queued++;
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
/*
* If we have the requested amount of headroom in the skb we
@@ -143,7 +143,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
* needs to be unblocked once we are ready to send.
*/
network->ppp_blocked = 1;
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
return 0;
}
}
@@ -248,11 +248,11 @@ static void do_go_online(struct work_struct *work_go_online)
work_go_online);
unsigned long flags;
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
if (!network->ppp_channel) {
struct ppp_channel *channel;
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
channel = kzalloc(sizeof(struct ppp_channel), GFP_KERNEL);
if (!channel) {
printk(KERN_ERR IPWIRELESS_PCCARD_NAME
@@ -272,10 +272,10 @@ static void do_go_online(struct work_struct *work_go_online)
network->xaccm[3] = 0x60000000U;
network->raccm = ~0U;
ppp_register_channel(channel);
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
network->ppp_channel = channel;
}
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
}
static void do_go_offline(struct work_struct *work_go_offline)
@@ -286,16 +286,16 @@ static void do_go_offline(struct work_struct *work_go_offline)
unsigned long flags;
mutex_lock(&network->close_lock);
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
if (network->ppp_channel != NULL) {
struct ppp_channel *channel = network->ppp_channel;
network->ppp_channel = NULL;
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
mutex_unlock(&network->close_lock);
ppp_unregister_channel(channel);
} else {
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
mutex_unlock(&network->close_lock);
}
}
@@ -380,18 +380,18 @@ void ipwireless_network_packet_received(struct ipw_network *network,
* the PPP layer.
*/
mutex_lock(&network->close_lock);
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
if (network->ppp_channel != NULL) {
struct sk_buff *skb;
- spin_unlock_irqrestore(&network->spinlock,
+ spin_unlock_irqrestore(&network->lock,
flags);
/* Send the data to the ppp_generic module. */
skb = ipw_packet_received_skb(data, length);
ppp_input(network->ppp_channel, skb);
} else
- spin_unlock_irqrestore(&network->spinlock,
+ spin_unlock_irqrestore(&network->lock,
flags);
mutex_unlock(&network->close_lock);
}
@@ -409,7 +409,7 @@ struct ipw_network *ipwireless_network_create(struct ipw_hardware *hw)
if (!network)
return NULL;
- spin_lock_init(&network->spinlock);
+ spin_lock_init(&network->lock);
mutex_init(&network->close_lock);
network->hardware = hw;
@@ -477,10 +477,10 @@ int ipwireless_ppp_channel_index(struct ipw_network *network)
int ret = -1;
unsigned long flags;
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
if (network->ppp_channel != NULL)
ret = ppp_channel_index(network->ppp_channel);
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
return ret;
}
@@ -490,10 +490,10 @@ int ipwireless_ppp_unit_number(struct ipw_network *network)
int ret = -1;
unsigned long flags;
- spin_lock_irqsave(&network->spinlock, flags);
+ spin_lock_irqsave(&network->lock, flags);
if (network->ppp_channel != NULL)
ret = ppp_unit_number(network->ppp_channel);
- spin_unlock_irqrestore(&network->spinlock, flags);
+ spin_unlock_irqrestore(&network->lock, flags);
return ret;
}