Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
staging: vt6656: Fix sparse warnings
Browse files Browse the repository at this point in the history
This patch fixes the following sparse warnings:
drivers/staging/vt6656/aes_ccmp.c:272:32: warning: restricted __le16 degrades to integer
drivers/staging/vt6656/aes_ccmp.c:274:32: warning: restricted __le16 degrades to integer
drivers/staging/vt6656/aes_ccmp.c:282:32: warning: restricted __le16 degrades to integer

Signed-off-by: Himangi Saraogi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
himangi774 authored and gregkh committed Mar 18, 2014
1 parent 625fd1a commit f4d636d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/vt6656/aes_ccmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,17 @@ bool AESbGenCCMP(u8 *pbyRxKey, u8 *pbyFrame, u16 wFrameSize)
/* MIC_HDR1 */
MIC_HDR1[0] = (u8)(wHLen >> 8);
MIC_HDR1[1] = (u8)(wHLen & 0xff);
byTmp = (u8)(pMACHeader->frame_control & 0xff);
byTmp = (u8)(le16_to_cpu(pMACHeader->frame_control) >> 8);
MIC_HDR1[2] = byTmp & 0x8f;
byTmp = (u8)(pMACHeader->frame_control >> 8);
byTmp = (u8)(le16_to_cpu(pMACHeader->frame_control) & 0xff);
byTmp &= 0x87;
MIC_HDR1[3] = byTmp | 0x40;
memcpy(&(MIC_HDR1[4]), pMACHeader->addr1, ETH_ALEN);
memcpy(&(MIC_HDR1[10]), pMACHeader->addr2, ETH_ALEN);

/* MIC_HDR2 */
memcpy(&(MIC_HDR2[0]), pMACHeader->addr3, ETH_ALEN);
byTmp = (u8)(pMACHeader->seq_ctrl & 0xff);
byTmp = (u8)(le16_to_cpu(pMACHeader->seq_ctrl) >> 8);
MIC_HDR2[6] = byTmp & 0x0f;
MIC_HDR2[7] = 0;

Expand Down

0 comments on commit f4d636d

Please sign in to comment.