]> xenbits.xensource.com Git - arm/linux.git/commitdiff
staging: wilc1000: Fix endian sparse warning
authorMike Kofron <mpkofron@gmail.com>
Thu, 29 Dec 2016 21:35:48 +0000 (16:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:23:27 +0000 (09:23 +0100)
[ Upstream commit 94500d5667386119c27725fe314f6882f68580a9 ]

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

Signed-off-by: Mike Kofron <mpkofron@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index defffa75ae1cbfc7acb45d971940b4820b663f22..07d6e4824a9d28da11a73320efbdddaa2a90a70f 100644 (file)
@@ -1001,7 +1001,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));