diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-29 13:48:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-29 13:48:48 -0400 |
commit | e389f9aec689209724105ae80a6c91fd2e747bc9 (patch) | |
tree | 3cc88a3e785e4f2ffeaa9dad0da695cfa437d4fe /drivers/net/wan/hdlc_fr.c | |
parent | f73b0a08eae0e28c50db5dd5ab8245546918bfb6 (diff) | |
parent | b4cf205846463a0a23a917bb18ad833bc9a8c0bb (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (107 commits)
smc911x: fix compilation breakage wjen debug is on
[netdrvr] eexpress: minor corrections
add NAPI support to sb1250-mac.c
ixgb: ROUND_UP macro cleanup in drivers/net/ixgb
e1000: ROUND_UP macro cleanup in drivers/net/e1000
Generic HDLC sparse annotations
e100: Optionally use I/O mode only to access register space
e100: allow bad MAC address when running with invalid eeprom csum
ehea: fix for dlpar support
ehea: fix for sysfs entries
3C509: Remove unnecessary include of <linux/pm_legacy.h>
NetXen: Fix for vmalloc issues
NetXen: Fixes for Power PC architecture
NetXen: Port swap feature for multi port cards
NetXen: Removal of redundant macros
NetXen: Multi PCI support for Quad cards
NetXen: Removal of redundant argument passing
NetXen: Use multiple PCI functions
[netdrvr e100] experiment with doing RX in a similar manner to eepro100
[PATCH] ieee80211: add missing global needed by IEEE80211_DEBUG_XXXX
...
Diffstat (limited to 'drivers/net/wan/hdlc_fr.c')
-rw-r--r-- | drivers/net/wan/hdlc_fr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index aeb2789adf26..15b6e07a4382 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c | |||
@@ -288,31 +288,31 @@ static int fr_hard_header(struct sk_buff **skb_p, u16 dlci) | |||
288 | struct sk_buff *skb = *skb_p; | 288 | struct sk_buff *skb = *skb_p; |
289 | 289 | ||
290 | switch (skb->protocol) { | 290 | switch (skb->protocol) { |
291 | case __constant_ntohs(NLPID_CCITT_ANSI_LMI): | 291 | case __constant_htons(NLPID_CCITT_ANSI_LMI): |
292 | head_len = 4; | 292 | head_len = 4; |
293 | skb_push(skb, head_len); | 293 | skb_push(skb, head_len); |
294 | skb->data[3] = NLPID_CCITT_ANSI_LMI; | 294 | skb->data[3] = NLPID_CCITT_ANSI_LMI; |
295 | break; | 295 | break; |
296 | 296 | ||
297 | case __constant_ntohs(NLPID_CISCO_LMI): | 297 | case __constant_htons(NLPID_CISCO_LMI): |
298 | head_len = 4; | 298 | head_len = 4; |
299 | skb_push(skb, head_len); | 299 | skb_push(skb, head_len); |
300 | skb->data[3] = NLPID_CISCO_LMI; | 300 | skb->data[3] = NLPID_CISCO_LMI; |
301 | break; | 301 | break; |
302 | 302 | ||
303 | case __constant_ntohs(ETH_P_IP): | 303 | case __constant_htons(ETH_P_IP): |
304 | head_len = 4; | 304 | head_len = 4; |
305 | skb_push(skb, head_len); | 305 | skb_push(skb, head_len); |
306 | skb->data[3] = NLPID_IP; | 306 | skb->data[3] = NLPID_IP; |
307 | break; | 307 | break; |
308 | 308 | ||
309 | case __constant_ntohs(ETH_P_IPV6): | 309 | case __constant_htons(ETH_P_IPV6): |
310 | head_len = 4; | 310 | head_len = 4; |
311 | skb_push(skb, head_len); | 311 | skb_push(skb, head_len); |
312 | skb->data[3] = NLPID_IPV6; | 312 | skb->data[3] = NLPID_IPV6; |
313 | break; | 313 | break; |
314 | 314 | ||
315 | case __constant_ntohs(ETH_P_802_3): | 315 | case __constant_htons(ETH_P_802_3): |
316 | head_len = 10; | 316 | head_len = 10; |
317 | if (skb_headroom(skb) < head_len) { | 317 | if (skb_headroom(skb) < head_len) { |
318 | struct sk_buff *skb2 = skb_realloc_headroom(skb, | 318 | struct sk_buff *skb2 = skb_realloc_headroom(skb, |
@@ -340,7 +340,7 @@ static int fr_hard_header(struct sk_buff **skb_p, u16 dlci) | |||
340 | skb->data[5] = FR_PAD; | 340 | skb->data[5] = FR_PAD; |
341 | skb->data[6] = FR_PAD; | 341 | skb->data[6] = FR_PAD; |
342 | skb->data[7] = FR_PAD; | 342 | skb->data[7] = FR_PAD; |
343 | *(u16*)(skb->data + 8) = skb->protocol; | 343 | *(__be16*)(skb->data + 8) = skb->protocol; |
344 | } | 344 | } |
345 | 345 | ||
346 | dlci_to_q922(skb->data, dlci); | 346 | dlci_to_q922(skb->data, dlci); |
@@ -974,8 +974,8 @@ static int fr_rx(struct sk_buff *skb) | |||
974 | 974 | ||
975 | } else if (skb->len > 10 && data[3] == FR_PAD && | 975 | } else if (skb->len > 10 && data[3] == FR_PAD && |
976 | data[4] == NLPID_SNAP && data[5] == FR_PAD) { | 976 | data[4] == NLPID_SNAP && data[5] == FR_PAD) { |
977 | u16 oui = ntohs(*(u16*)(data + 6)); | 977 | u16 oui = ntohs(*(__be16*)(data + 6)); |
978 | u16 pid = ntohs(*(u16*)(data + 8)); | 978 | u16 pid = ntohs(*(__be16*)(data + 8)); |
979 | skb_pull(skb, 10); | 979 | skb_pull(skb, 10); |
980 | 980 | ||
981 | switch ((((u32)oui) << 16) | pid) { | 981 | switch ((((u32)oui) << 16) | pid) { |
@@ -1127,7 +1127,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) | |||
1127 | memcpy(dev->dev_addr, "\x00\x01", 2); | 1127 | memcpy(dev->dev_addr, "\x00\x01", 2); |
1128 | get_random_bytes(dev->dev_addr + 2, ETH_ALEN - 2); | 1128 | get_random_bytes(dev->dev_addr + 2, ETH_ALEN - 2); |
1129 | } else { | 1129 | } else { |
1130 | *(u16*)dev->dev_addr = htons(dlci); | 1130 | *(__be16*)dev->dev_addr = htons(dlci); |
1131 | dlci_to_q922(dev->broadcast, dlci); | 1131 | dlci_to_q922(dev->broadcast, dlci); |
1132 | } | 1132 | } |
1133 | dev->hard_start_xmit = pvc_xmit; | 1133 | dev->hard_start_xmit = pvc_xmit; |