Commit cde1b55b authored by Michael Buesch's avatar Michael Buesch Committed by John W. Linville

b43: Fix sparse warning in hw-tkip code

This fixes a sparse warning in the hardware-TKIP code:

drivers/net/wireless/b43/xmit.c:272:18: warning: incorrect type in assignment (different base types)
drivers/net/wireless/b43/xmit.c:272:18:    expected unsigned short [unsigned] [short] <noident>
drivers/net/wireless/b43/xmit.c:272:18:    got restricted unsigned short [usertype] <noident>

The code should work correctly with and without this patch applied.
Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b0544eb6
...@@ -267,11 +267,11 @@ int b43_generate_txhdr(struct b43_wldev *dev, ...@@ -267,11 +267,11 @@ int b43_generate_txhdr(struct b43_wldev *dev,
*/ */
ieee80211_get_tkip_key(info->control.hw_key, skb_frag, ieee80211_get_tkip_key(info->control.hw_key, skb_frag,
IEEE80211_TKIP_P1_KEY, (u8*)phase1key); IEEE80211_TKIP_P1_KEY, (u8*)phase1key);
/* phase1key is in host endian */ /* phase1key is in host endian. Copy to little-endian txhdr->iv. */
for (i = 0; i < 5; i++) for (i = 0; i < 5; i++) {
phase1key[i] = cpu_to_le16(phase1key[i]); txhdr->iv[i * 2 + 0] = phase1key[i];
txhdr->iv[i * 2 + 1] = phase1key[i] >> 8;
memcpy(txhdr->iv, phase1key, 10); }
/* iv16 */ /* iv16 */
memcpy(txhdr->iv + 10, ((u8 *) wlhdr) + wlhdr_len, 3); memcpy(txhdr->iv + 10, ((u8 *) wlhdr) + wlhdr_len, 3);
} else { } else {
......
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