Skip to contentSkip to conversation

ethernet: print protocol in host byte order

PATCH Applied Johannes Berg 2 participants 2 messages Apr 21, 2010 – Apr 22, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethernet: print protocol in host byte order

Eric's recent patch added __force, but this place would seem to require actually doing a byte order conversion so the printk is consistent across architectures.

---
 net/ethernet/eth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ethernet/eth.c +1 -1
index 3584696..0c0d272 100644
@@ -136,7 +136,7 @@ int eth_rebuild_header(struct sk_buff *skb)
 	default:
 		printk(KERN_DEBUG
 		       "%s: unable to resolve type %X addresses.\n",
-		       dev->name, (__force int)eth->h_proto);
+		       dev->name, ntohs(eth->h_proto));
 
 		memcpy(eth->h_source, dev->dev_addr, ETH_ALEN);
 		break;