netdev.c (62910554656cdcd6b6f84a5154c4155aae4ca231) netdev.c (aa395145165cb06a0d0885221bbe0ce4a564391d)
1/*
2 BNEP implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2001-2002 Inventel Systemes
4 Written 2001-2002 by
5 Clément Moreau <clement.moreau@inventel.fr>
6 David Libault <david.libault@inventel.fr>
7
8 Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>

--- 95 unchanged lines hidden (view full) ---

104 break;
105 memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
106 memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
107 }
108 r->len = htons(skb->len - len);
109 }
110
111 skb_queue_tail(&sk->sk_write_queue, skb);
1/*
2 BNEP implementation for Linux Bluetooth stack (BlueZ).
3 Copyright (C) 2001-2002 Inventel Systemes
4 Written 2001-2002 by
5 Clément Moreau <clement.moreau@inventel.fr>
6 David Libault <david.libault@inventel.fr>
7
8 Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com>

--- 95 unchanged lines hidden (view full) ---

104 break;
105 memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
106 memcpy(__skb_put(skb, ETH_ALEN), ha->addr, ETH_ALEN);
107 }
108 r->len = htons(skb->len - len);
109 }
110
111 skb_queue_tail(&sk->sk_write_queue, skb);
112 wake_up_interruptible(sk->sk_sleep);
112 wake_up_interruptible(sk_sleep(sk));
113#endif
114}
115
116static int bnep_net_set_mac_addr(struct net_device *dev, void *arg)
117{
118 BT_DBG("%s", dev->name);
119 return 0;
120}

--- 67 unchanged lines hidden (view full) ---

188 kfree_skb(skb);
189 return NETDEV_TX_OK;
190 }
191#endif
192
193 /*
194 * We cannot send L2CAP packets from here as we are potentially in a bh.
195 * So we have to queue them and wake up session thread which is sleeping
113#endif
114}
115
116static int bnep_net_set_mac_addr(struct net_device *dev, void *arg)
117{
118 BT_DBG("%s", dev->name);
119 return 0;
120}

--- 67 unchanged lines hidden (view full) ---

188 kfree_skb(skb);
189 return NETDEV_TX_OK;
190 }
191#endif
192
193 /*
194 * We cannot send L2CAP packets from here as we are potentially in a bh.
195 * So we have to queue them and wake up session thread which is sleeping
196 * on the sk->sk_sleep.
196 * on the sk_sleep(sk).
197 */
198 dev->trans_start = jiffies;
199 skb_queue_tail(&sk->sk_write_queue, skb);
197 */
198 dev->trans_start = jiffies;
199 skb_queue_tail(&sk->sk_write_queue, skb);
200 wake_up_interruptible(sk->sk_sleep);
200 wake_up_interruptible(sk_sleep(sk));
201
202 if (skb_queue_len(&sk->sk_write_queue) >= BNEP_TX_QUEUE_LEN) {
203 BT_DBG("tx queue is full");
204
205 /* Stop queuing.
206 * Session thread will do netif_wake_queue() */
207 netif_stop_queue(dev);
208 }

--- 27 unchanged lines hidden ---
201
202 if (skb_queue_len(&sk->sk_write_queue) >= BNEP_TX_QUEUE_LEN) {
203 BT_DBG("tx queue is full");
204
205 /* Stop queuing.
206 * Session thread will do netif_wake_queue() */
207 netif_stop_queue(dev);
208 }

--- 27 unchanged lines hidden ---