19 #include <linux/kernel.h>
21 #include <linux/netdevice.h>
23 #include <linux/ppp_defs.h>
24 #include <linux/slab.h>
33 #define MAX_ASSOCIATED_TTYS 2
35 #define SC_RCV_BITS (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
66 static void notify_packet_sent(
void *callback_data,
unsigned int packet_length)
76 spin_unlock_irqrestore(&network->
lock, flags);
82 spin_unlock_irqrestore(&network->
lock, flags);
84 spin_unlock_irqrestore(&network->
lock, flags);
99 static unsigned char header[] = {
106 spin_unlock_irqrestore(&network->
lock, flags);
112 if (skb_headroom(skb) >= 2) {
147 spin_unlock_irqrestore(&network->
lock, flags);
155 static int ipwireless_ppp_ioctl(
struct ppp_channel *ppp_channel,
156 unsigned int cmd,
unsigned long arg)
206 sizeof(network->
xaccm)))
214 accm[2] &= ~0x40000000
U;
215 accm[3] |= 0x60000000
U;
243 .start_xmit = ipwireless_ppp_start_xmit,
244 .ioctl = ipwireless_ppp_ioctl
247 static void do_go_online(
struct work_struct *work_go_online)
258 spin_unlock_irqrestore(&network->
lock, flags);
259 channel = kzalloc(
sizeof(
struct ppp_channel),
GFP_KERNEL);
262 ": unable to allocate PPP channel\n");
266 channel->
mtu = 16384;
268 channel->
ops = &ipwireless_ppp_channel_ops;
275 network->
xaccm[3] = 0x60000000
U;
279 ": unable to register PPP channel\n");
286 spin_unlock_irqrestore(&network->
lock, flags);
289 static void do_go_offline(
struct work_struct *work_go_offline)
299 struct ppp_channel *channel = network->
ppp_channel;
302 spin_unlock_irqrestore(&network->
lock, flags);
306 spin_unlock_irqrestore(&network->
lock, flags);
312 unsigned int channel_idx,
313 unsigned int control_lines,
314 unsigned int changed_mask)
344 static struct sk_buff *ipw_packet_received_skb(
unsigned char *
data,
354 skb = dev_alloc_skb(length + 4);
362 unsigned int channel_idx,
395 spin_unlock_irqrestore(&network->
lock,
399 skb = ipw_packet_received_skb(data, length);
402 spin_unlock_irqrestore(&network->
lock,
448 unsigned int channel_idx,
461 unsigned int channel_idx)
492 spin_unlock_irqrestore(&network->
lock, flags);
505 spin_unlock_irqrestore(&network->
lock, flags);