speedtch usb_atm.c,1.9,1.10 usb_atm.h,1.2,1.3
David Woodhouse
dwmw2 at infradead.org
Thu Oct 14 07:17:37 EDT 2004
- Previous message: speedtch speedtch.c,1.31,1.32
- Next message: speedtch crc.c, NONE, 1.1 crc.h, NONE, 1.1 firmware.c, NONE,
1.1 firmware.h, NONE, 1.1 Makefile, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv8714
Modified Files:
usb_atm.c usb_atm.h
Log Message:
Remove cell_header from struct usdl_control to make 64-bit hosts work
Index: usb_atm.c
===================================================================
RCS file: /home/cvs/speedtch/usb_atm.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- usb_atm.c 7 Oct 2004 03:11:24 -0000 1.9
+++ usb_atm.c 14 Oct 2004 11:17:34 -0000 1.10
@@ -311,6 +311,15 @@
** encode **
*************/
+static inline void udsl_fill_cell_header(unsigned char *target, struct atm_vcc *vcc)
+{
+ target[0] = vcc->vpi >> 4;
+ target[1] = (vcc->vpi << 4) | (vcc->vci >> 12);
+ target[2] = vcc->vci >> 4;
+ target[3] = vcc->vci << 4;
+ target[4] = 0xec;
+}
+
static const unsigned char zeros[ATM_CELL_PAYLOAD];
static void udsl_groom_skb(struct atm_vcc *vcc, struct sk_buff *skb)
@@ -320,11 +329,6 @@
u32 crc;
ctrl->atm_data.vcc = vcc;
- ctrl->cell_header[0] = vcc->vpi >> 4;
- ctrl->cell_header[1] = (vcc->vpi << 4) | (vcc->vci >> 12);
- ctrl->cell_header[2] = vcc->vci >> 4;
- ctrl->cell_header[3] = vcc->vci << 4;
- ctrl->cell_header[4] = 0xec;
ctrl->num_cells = UDSL_NUM_CELLS(skb->len);
ctrl->num_entire = skb->len / ATM_CELL_PAYLOAD;
@@ -366,7 +370,7 @@
ne = min(howmany, ctrl->num_entire);
for (i = 0; i < ne; i++) {
- memcpy(target, ctrl->cell_header, ATM_CELL_HEADER);
+ udsl_fill_cell_header(target, ctrl->atm_data.vcc);
target += ATM_CELL_HEADER;
memcpy(target, skb->data, ATM_CELL_PAYLOAD);
target += ATM_CELL_PAYLOAD;
@@ -386,7 +390,7 @@
memset(target, 0, instance->snd_padding);
target += instance->snd_padding;
}
- memcpy(target, ctrl->cell_header, ATM_CELL_HEADER);
+ udsl_fill_cell_header(target, ctrl->atm_data.vcc);
target += ATM_CELL_HEADER;
memcpy(target, skb->data, skb->len);
target += skb->len;
@@ -400,7 +404,7 @@
goto out;
}
- memcpy(target, ctrl->cell_header, ATM_CELL_HEADER);
+ udsl_fill_cell_header(target, ctrl->atm_data.vcc);
target += ATM_CELL_HEADER;
memset(target, 0, ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER);
target += ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER;
Index: usb_atm.h
===================================================================
RCS file: /home/cvs/speedtch/usb_atm.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- usb_atm.h 5 Oct 2004 09:43:04 -0000 1.2
+++ usb_atm.h 14 Oct 2004 11:17:34 -0000 1.3
@@ -91,7 +91,6 @@
unsigned int num_cells;
unsigned int num_entire;
unsigned int pdu_padding;
- unsigned char cell_header[ATM_CELL_HEADER];
unsigned char aal5_trailer[ATM_AAL5_TRAILER];
};
- Previous message: speedtch speedtch.c,1.31,1.32
- Next message: speedtch crc.c, NONE, 1.1 crc.h, NONE, 1.1 firmware.c, NONE,
1.1 firmware.h, NONE, 1.1 Makefile, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Usbatm-commits
mailing list