Skip to content

Commit

Permalink
wireless: correct sparse warning in lib80211_crypt_tkip.c
Browse files Browse the repository at this point in the history
  CHECK   net/wireless/lib80211_crypt_tkip.c
net/wireless/lib80211_crypt_tkip.c:581:27: warning: cast to restricted __le16

Caused by dereferencing a "u8 *" and passing it to le16_to_cpu...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Jul 20, 2010
1 parent 4f366c5 commit 3f6ff6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/wireless/lib80211_crypt_tkip.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr)
}

if (ieee80211_is_data_qos(hdr11->frame_control)) {
hdr[12] = le16_to_cpu(*ieee80211_get_qos_ctl(hdr11))
hdr[12] = le16_to_cpu(*((__le16 *)ieee80211_get_qos_ctl(hdr11)))
& IEEE80211_QOS_CTL_TID_MASK;
} else
hdr[12] = 0; /* priority */
Expand Down

0 comments on commit 3f6ff6b

Please sign in to comment.