diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-05-27 21:05:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-28 14:10:45 -0700 |
commit | 9046db518e5d3da5371eb64bfe96203243b722c0 (patch) | |
tree | b6e866ec9aa8a61a15d0aaad53172a4243a4af20 /drivers/staging/vt6656 | |
parent | 8b9c012a425b23c1df52cc1ddfec8259035c6754 (diff) |
staging: vt6656: WCTLbIsDuplicate fix PSCacheEntry base types and warnings
Fix wFmSequence and wFrameCtl to __le16
Don't restrict to u8, if packet is a duplicate both bytes of __le16 will be
the same.
Fixes warnings
wctl.c:66:9: warning: restricted __le16 degrades to integer
wctl.c:71:56: warning: restricted __le16 degrades to integer
wctl.c:73:49: warning: cast from restricted __le16
wctl.c:83:30: warning: incorrect type in assignment (different base types)
wctl.c:83:30: expected unsigned short [unsigned] [usertype] wFmSequence
wctl.c:83:30: got restricted __le16 [usertype] seq_ctrl
wctl.c:85:28: warning: incorrect type in assignment (different base types)
wctl.c:85:28: expected unsigned short [unsigned] [usertype] wFrameCtl
wctl.c:85:28: got restricted __le16 [usertype] frame_control
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r-- | drivers/staging/vt6656/device.h | 6 | ||||
-rw-r--r-- | drivers/staging/vt6656/wctl.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index e5f84f5b377..5b64ca7b62f 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -340,9 +340,9 @@ typedef struct tagSPMKIDCandidateEvent { /* The receive duplicate detection cache entry */ typedef struct tagSCacheEntry{ - u16 wFmSequence; - u8 abyAddr2[ETH_ALEN]; - u16 wFrameCtl; + __le16 wFmSequence; + u8 abyAddr2[ETH_ALEN]; + __le16 wFrameCtl; } SCacheEntry, *PSCacheEntry; typedef struct tagSCache{ diff --git a/drivers/staging/vt6656/wctl.c b/drivers/staging/vt6656/wctl.c index 814342cd948..efdc5d5d38e 100644 --- a/drivers/staging/vt6656/wctl.c +++ b/drivers/staging/vt6656/wctl.c @@ -70,7 +70,7 @@ bool WCTLbIsDuplicate (PSCache pCache, struct ieee80211_hdr *pMACHeader) pCacheEntry = &(pCache->asCacheEntry[uIndex]); if ((pCacheEntry->wFmSequence == pMACHeader->seq_ctrl) && ether_addr_equal(pCacheEntry->abyAddr2, pMACHeader->addr2) && - (LOBYTE(pCacheEntry->wFrameCtl) == LOBYTE(pMACHeader->frame_control)) + (pCacheEntry->wFrameCtl == pMACHeader->frame_control) ) { /* Duplicate match */ return true; |