Skip to content

Commit

Permalink
staging: rtl8192u: fix incorrect type in assignment in ieee80211_tx.c
Browse files Browse the repository at this point in the history
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: Martin Karamihov <martinowar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Martin Karamihov authored and Greg Kroah-Hartman committed Apr 18, 2017
1 parent df93c72 commit 18125dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static inline int ieee80211_put_snap(u8 *data, u16 h_proto)
snap->oui[1] = oui[1];
snap->oui[2] = oui[2];

*(u16 *)(data + SNAP_SIZE) = htons(h_proto);
*(__be16 *)(data + SNAP_SIZE) = htons(h_proto);

return SNAP_SIZE + sizeof(u16);
}
Expand Down

0 comments on commit 18125dc

Please sign in to comment.