patch-2.4.0-test11 linux/net/irda/wrapper.c
Next file: linux/net/khttpd/README
Previous file: linux/net/irda/timer.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Sat Nov 11 18:11:23 2000
- Orig file:
v2.4.0-test10/linux/net/irda/wrapper.c
- Orig date:
Fri Jan 28 19:36:22 2000
diff -u --recursive --new-file v2.4.0-test10/linux/net/irda/wrapper.c linux/net/irda/wrapper.c
@@ -69,6 +69,7 @@
*/
int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize)
{
+ struct irda_skb_cb *cb = (struct irda_skb_cb *) skb->cb;
int xbofs;
int i;
int n;
@@ -85,7 +86,8 @@
* Send XBOF's for required min. turn time and for the negotiated
* additional XBOFS
*/
- if (((struct irda_skb_cb *)(skb->cb))->magic != LAP_MAGIC) {
+
+ if (cb->magic != LAP_MAGIC) {
/*
* This will happen for all frames sent from user-space.
* Nothing to worry about, but we set the default number of
@@ -94,7 +96,7 @@
IRDA_DEBUG(1, __FUNCTION__ "(), wrong magic in skb!\n");
xbofs = 10;
} else
- xbofs = ((struct irda_skb_cb *)(skb->cb))->xbofs;
+ xbofs = cb->xbofs + cb->xbofs_delay;
IRDA_DEBUG(4, __FUNCTION__ "(), xbofs=%d\n", xbofs);
@@ -287,6 +289,8 @@
{
switch (byte) {
case BOF: /* New frame? */
+ IRDA_DEBUG(1, __FUNCTION__
+ "(), Discarding incomplete frame\n");
rx_buff->state = BEGIN_FRAME;
irda_device_set_media_busy(dev, TRUE);
break;
@@ -328,6 +332,8 @@
switch (byte) {
case BOF: /* New frame? */
+ IRDA_DEBUG(1, __FUNCTION__
+ "(), Discarding incomplete frame\n");
rx_buff->state = BEGIN_FRAME;
irda_device_set_media_busy(dev, TRUE);
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)