Commit 606ea2bd authored by Alexander Alemayhu's avatar Alexander Alemayhu Committed by Greg Kroah-Hartman

staging: wlan-ng: reduce type warnings

Fixes the following sparse output:

drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16
drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16
drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16
drivers/staging/wlan-ng/p80211conv.c:132:25: warning: cast to restricted __be16
drivers/staging/wlan-ng/p80211conv.c:154:38: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/p80211conv.c:154:38:    expected unsigned short [unsigned] [usertype] type
drivers/staging/wlan-ng/p80211conv.c:154:38:    got restricted __be16 [usertype] <noident>
drivers/staging/wlan-ng/p80211conv.c:390:42: warning: cast to restricted __le16
drivers/staging/wlan-ng/p80211conv.c:413:29: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/p80211conv.c:413:29:    expected unsigned short [unsigned] [usertype] type
drivers/staging/wlan-ng/p80211conv.c:413:29:    got restricted __be16 [usertype] <noident>
drivers/staging/wlan-ng/p80211conv.c:481:29: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/p80211conv.c:481:29:    expected unsigned short [unsigned] [usertype] type
drivers/staging/wlan-ng/p80211conv.c:481:29:    got restricted __be16 [usertype] <noident>
Signed-off-by: default avatarAlexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aefc9589
...@@ -387,7 +387,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv, ...@@ -387,7 +387,7 @@ int skb_p80211_to_ether(struct wlandevice *wlandev, u32 ethconv,
(((memcmp(e_snap->oui, oui_rfc1042, (((memcmp(e_snap->oui, oui_rfc1042,
WLAN_IEEE_OUI_LEN) == 0) && WLAN_IEEE_OUI_LEN) == 0) &&
(ethconv == WLAN_ETHCONV_8021h) && (ethconv == WLAN_ETHCONV_8021h) &&
(p80211_stt_findproto(le16_to_cpu(e_snap->type)))) || (p80211_stt_findproto(be16_to_cpu(e_snap->type)))) ||
(memcmp(e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN) != (memcmp(e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN) !=
0))) { 0))) {
pr_debug("SNAP+RFC1042 len: %d\n", payload_length); pr_debug("SNAP+RFC1042 len: %d\n", payload_length);
......
...@@ -130,7 +130,7 @@ struct p80211_metawep { ...@@ -130,7 +130,7 @@ struct p80211_metawep {
struct wlan_ethhdr { struct wlan_ethhdr {
u8 daddr[ETH_ALEN]; u8 daddr[ETH_ALEN];
u8 saddr[ETH_ALEN]; u8 saddr[ETH_ALEN];
u16 type; __be16 type;
} __packed; } __packed;
/* local llc header type */ /* local llc header type */
...@@ -143,7 +143,7 @@ struct wlan_llc { ...@@ -143,7 +143,7 @@ struct wlan_llc {
/* local snap header type */ /* local snap header type */
struct wlan_snap { struct wlan_snap {
u8 oui[WLAN_IEEE_OUI_LEN]; u8 oui[WLAN_IEEE_OUI_LEN];
u16 type; __be16 type;
} __packed; } __packed;
/* Circular include trick */ /* Circular include trick */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment