|
From: Fredrik S. <fre...@us...> - 2002-02-20 10:13:38
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bnep.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Removed stripping of the Ethernet checksum as this turned out to be a bug i=
n the Etrax Ethernet driver.
The diff of the modified file(s):
--- bnep.c 13 Feb 2002 14:05:03 -0000 1.7
+++ bnep.c 20 Feb 2002 10:13:37 -0000 1.8
@@ -411,20 +411,17 @@
{
bt_tx_buf *tx_buf;
struct net_local *local;
- struct net_local *other;
-=09
struct ethhdr *eth;
struct bnep_compressed_ethernet_dest_only bnep_c_d;
struct bnep_general_ethernet bnep_g;=20
struct bnep_compressed_ethernet_source_only bnep_c_s;
struct bnep_compressed_ethernet bnep_c;
void *bhdr;
- int i, bhdrlen, ethhdrlen =3D sizeof(struct ethhdr), buflen, strip_len =
=3D 0, j;
+ int i, bhdrlen, ethhdrlen =3D sizeof(struct ethhdr), buflen;
u16 proto, payload_proto;=20
int send_packet =3D 0;
int dest =3D 1;
int source =3D 1;
- int fromLAN =3D 1;
=20
eth =3D (struct ethhdr *)skb->data;
=20=09
@@ -582,40 +579,9 @@
=20
/* Everything examined; time to send the data */
=20
- /* check whether the we have room for the bt_tx_buf ( -4 ?) */
+ /* check whether we have room for the bt_tx_buf */
buflen =3D skb->len + sizeof(bnep_tx_buf) - ethhdrlen + bhdrlen;
=20=20=20
-
- /* Check the data source as we should
- strip 4 bytes when it comes from the LAN.=20
- Found during UPF7 but can't reproduce it here.*/
-#if 0
- for(i =3D 0 ; i < BNEP_INTERFACES; i++) {
- other =3D dev_bnep[i].priv;
- if(other->state !=3D CONNECTED) {
- continue;
- }
-=09
- for (j =3D 0; j < 6; j++) {
- if (eth->h_source[j] !=3D other->l2cap->remote_bd[5-j]) {
- fromLAN =3D 1;
- break;
- }
- fromLAN =3D 0;
- }
-
- if(!fromLAN) {
- break;
- }
- }
-
- if(!source && fromLAN && (skb->len >=3D 4)) {
- strip_len =3D 4;
- }
-
- buflen -=3D strip_len;
-#endif
-=20=20
D_XMIT("buflen %i\n",buflen);
if (buf_write_room() < buflen) {
D_ERR(__FUNCTION__": not enough room for a %d byte bt_tx_buf\n", skb->le=
n);
@@ -635,7 +601,7 @@
memcpy(tx_buf->data + sizeof(bnep_tx_buf) + bhdrlen,=20
skb->data + ethhdrlen,=20
buflen - bhdrlen - sizeof(bnep_tx_buf));
- tx_buf->cur_len =3D skb->len - ethhdrlen + bhdrlen - strip_len; /*-4*/
+ tx_buf->cur_len =3D skb->len - ethhdrlen + bhdrlen;
/* transmit the packet */
D_XMIT("bnep: tx packet\n");
l2cap_send_data(tx_buf, local->l2cap);
|