Skip to contentSkip to conversation

staging: wilc1000: Fix endian sparse warning

PATCH New Mike Kofron 1 participant 1 message Dec 29, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wilc1000: Fix endian sparse warning

drivers/staging/wilc1000/linux_wlan.c:995:18: warning: restricted __be16 degrades to integer

---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/linux_wlan.c +1 -1
index e59cab5..f293779 100644
@@ -992,7 +992,7 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
 	tx_data->skb  = skb;
 
 	eth_h = (struct ethhdr *)(skb->data);
-	if (eth_h->h_proto == 0x8e88)
+	if (eth_h->h_proto == cpu_to_be16(0x8e88))
 		netdev_dbg(ndev, "EAPOL transmitted\n");
 
 	ih = (struct iphdr *)(skb->data + sizeof(struct ethhdr));
Signature · 1 line
1.9.1