aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/lec.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-12-05 09:37:56 -0500
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-12-05 09:37:56 -0500
commit4c1ac1b49122b805adfa4efc620592f68dccf5db (patch)
tree87557f4bc2fd4fe65b7570489c2f610c45c0adcd /net/atm/lec.c
parentc4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff)
parentd916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r--net/atm/lec.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index e801fff69dc0..3fc0abeeaf34 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -204,9 +204,9 @@ static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc)
204 memset(rdesc, 0, ETH_ALEN); 204 memset(rdesc, 0, ETH_ALEN);
205 /* offset 4 comes from LAN destination field in LE control frames */ 205 /* offset 4 comes from LAN destination field in LE control frames */
206 if (trh->rcf & htons((uint16_t) TR_RCF_DIR_BIT)) 206 if (trh->rcf & htons((uint16_t) TR_RCF_DIR_BIT))
207 memcpy(&rdesc[4], &trh->rseg[num_rdsc - 2], sizeof(uint16_t)); 207 memcpy(&rdesc[4], &trh->rseg[num_rdsc - 2], sizeof(__be16));
208 else { 208 else {
209 memcpy(&rdesc[4], &trh->rseg[1], sizeof(uint16_t)); 209 memcpy(&rdesc[4], &trh->rseg[1], sizeof(__be16));
210 rdesc[5] = ((ntohs(trh->rseg[0]) & 0x000f) | (rdesc[5] & 0xf0)); 210 rdesc[5] = ((ntohs(trh->rseg[0]) & 0x000f) | (rdesc[5] & 0xf0));
211 } 211 }
212 212
@@ -775,7 +775,7 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
775 unsigned char *src, *dst; 775 unsigned char *src, *dst;
776 776
777 atm_return(vcc, skb->truesize); 777 atm_return(vcc, skb->truesize);
778 if (*(uint16_t *) skb->data == htons(priv->lecid) || 778 if (*(__be16 *) skb->data == htons(priv->lecid) ||
779 !priv->lecd || !(dev->flags & IFF_UP)) { 779 !priv->lecd || !(dev->flags & IFF_UP)) {
780 /* 780 /*
781 * Probably looping back, or if lecd is missing, 781 * Probably looping back, or if lecd is missing,
@@ -1321,11 +1321,10 @@ static int lane2_resolve(struct net_device *dev, u8 *dst_mac, int force,
1321 if (table == NULL) 1321 if (table == NULL)
1322 return -1; 1322 return -1;
1323 1323
1324 *tlvs = kmalloc(table->sizeoftlvs, GFP_ATOMIC); 1324 *tlvs = kmemdup(table->tlvs, table->sizeoftlvs, GFP_ATOMIC);
1325 if (*tlvs == NULL) 1325 if (*tlvs == NULL)
1326 return -1; 1326 return -1;
1327 1327
1328 memcpy(*tlvs, table->tlvs, table->sizeoftlvs);
1329 *sizeoftlvs = table->sizeoftlvs; 1328 *sizeoftlvs = table->sizeoftlvs;
1330 1329
1331 return 0; 1330 return 0;
@@ -1364,11 +1363,10 @@ static int lane2_associate_req(struct net_device *dev, u8 *lan_dst,
1364 1363
1365 kfree(priv->tlvs); /* NULL if there was no previous association */ 1364 kfree(priv->tlvs); /* NULL if there was no previous association */
1366 1365
1367 priv->tlvs = kmalloc(sizeoftlvs, GFP_KERNEL); 1366 priv->tlvs = kmemdup(tlvs, sizeoftlvs, GFP_KERNEL);
1368 if (priv->tlvs == NULL) 1367 if (priv->tlvs == NULL)
1369 return (0); 1368 return (0);
1370 priv->sizeoftlvs = sizeoftlvs; 1369 priv->sizeoftlvs = sizeoftlvs;
1371 memcpy(priv->tlvs, tlvs, sizeoftlvs);
1372 1370
1373 skb = alloc_skb(sizeoftlvs, GFP_ATOMIC); 1371 skb = alloc_skb(sizeoftlvs, GFP_ATOMIC);
1374 if (skb == NULL) 1372 if (skb == NULL)
@@ -1409,12 +1407,10 @@ static void lane2_associate_ind(struct net_device *dev, u8 *mac_addr,
1409 1407
1410 kfree(entry->tlvs); 1408 kfree(entry->tlvs);
1411 1409
1412 entry->tlvs = kmalloc(sizeoftlvs, GFP_KERNEL); 1410 entry->tlvs = kmemdup(tlvs, sizeoftlvs, GFP_KERNEL);
1413 if (entry->tlvs == NULL) 1411 if (entry->tlvs == NULL)
1414 return; 1412 return;
1415
1416 entry->sizeoftlvs = sizeoftlvs; 1413 entry->sizeoftlvs = sizeoftlvs;
1417 memcpy(entry->tlvs, tlvs, sizeoftlvs);
1418#endif 1414#endif
1419#if 0 1415#if 0
1420 printk("lec.c: lane2_associate_ind()\n"); 1416 printk("lec.c: lane2_associate_ind()\n");