staging: wlan-ng: Fix restricted __be16 degrades to integer
authorEbru Akagunduz <ebru.akagunduz@gmail.com>
Mon, 20 Oct 2014 23:47:29 +0000 (02:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Oct 2014 06:10:49 +0000 (14:10 +0800)
commitcb6c1ee3057ebb717fd4439711b3cb5354d5085f
tree4060bda0e0ba9396176c4dc9bb4b38dec2c1dec3
parent1002a240ed72f0535f01ca88e0341ccf7c4e0b54
staging: wlan-ng: Fix restricted __be16 degrades to integer

skb->protocol variable type is __be16 and in if condition
it is comparing with ETH_P_80211_RAW constant variable
which is not __be16 type. Using be16_to_cpu() function,
value of skb->protocol converted native processor format.
This bug was found by sparse.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/p80211netdev.c