提交 18125dc0 编写于 作者: M Martin Karamihov 提交者: Greg Kroah-Hartman

staging: rtl8192u: fix incorrect type in assignment in ieee80211_tx.c

This patch fixes the following sparse warning:
ieee80211_tx.c:174:36: incorrect type in assignment (different base types)
ieee80211_tx.c:174:36: expected unsigned short [unsigned] [short] [usertype] <noident>
ieee80211_tx.c:174:36: got restricted __be16 [usertype] <noident>

by adding left side cast to __be16.
Signed-off-by: NMartin Karamihov <martinowar@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 df93c720
...@@ -171,7 +171,7 @@ static inline int ieee80211_put_snap(u8 *data, u16 h_proto) ...@@ -171,7 +171,7 @@ static inline int ieee80211_put_snap(u8 *data, u16 h_proto)
snap->oui[1] = oui[1]; snap->oui[1] = oui[1];
snap->oui[2] = oui[2]; snap->oui[2] = oui[2];
*(u16 *)(data + SNAP_SIZE) = htons(h_proto); *(__be16 *)(data + SNAP_SIZE) = htons(h_proto);
return SNAP_SIZE + sizeof(u16); return SNAP_SIZE + sizeof(u16);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册