aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2014-08-30 22:25:38 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-30 15:19:16 -0700
commita479ffc38885e52f16d0e28cdf40b2e3893ab6f3 (patch)
treedbdbdcd27e8a4dcca61fa3655277f3fa1f12802c /drivers/staging/vt6655
parentstaging: vt6655: replace -typedef struct tagSTxDataHead_a_FB with struct vnt_tx_datahead_a_fb (diff)
downloadlinux-dev-a479ffc38885e52f16d0e28cdf40b2e3893ab6f3.tar.xz
linux-dev-a479ffc38885e52f16d0e28cdf40b2e3893ab6f3.zip
staging: vt6655: Fix *Duration s_uFillDataHead to return to __le16
All callers should be __le16. Fix vGenerateMACHeader duration to __le16 and reverse the endian conversion. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r--drivers/staging/vt6655/rxtx.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index bd0e339fa674..0171f64f492a 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -166,7 +166,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
unsigned int uNodeIndex, unsigned int *puMACfragNum);
static
-unsigned int
+__le16
s_uFillDataHead(
struct vnt_private *pDevice,
unsigned char byPktType,
@@ -671,7 +671,7 @@ s_uGetRTSCTSDuration(
}
static
-unsigned int
+__le16
s_uFillDataHead(
struct vnt_private *pDevice,
unsigned char byPktType,
@@ -1202,7 +1202,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
unsigned char *pbyIVHead;
unsigned char *pbyMacHdr;
unsigned short wFragType; //00:Non-Frag, 01:Start, 10:Mid, 11:Last
- unsigned int uDuration;
+ __le16 uDuration;
unsigned char *pbyBuffer;
unsigned int cbIVlen = 0;
unsigned int cbICVlen = 0;
@@ -1448,7 +1448,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFragmentSize, uDMAIdx, bNeedACK,
uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption, pDevice->wCurrentRate);
// Generate TX MAC Header
- vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
+ vGenerateMACHeader(pDevice, pbyMacHdr, uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, uFragIdx);
if (bNeedEncrypt == true) {
@@ -1539,7 +1539,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption, pDevice->wCurrentRate);
// Generate TX MAC Header
- vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
+ vGenerateMACHeader(pDevice, pbyMacHdr, uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, uFragIdx);
if (bNeedEncrypt == true) {
@@ -1657,7 +1657,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
uFragIdx, cbLastFragmentSize, uMACfragNum, byFBOption, pDevice->wCurrentRate);
// Generate TX MAC Header
- vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
+ vGenerateMACHeader(pDevice, pbyMacHdr, uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, uFragIdx);
if (bNeedEncrypt == true) {
@@ -1765,7 +1765,7 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate);
// Generate TX MAC Header
- vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
+ vGenerateMACHeader(pDevice, pbyMacHdr, uDuration, psEthHeader, bNeedEncrypt,
wFragType, uDMAIdx, 0);
if (bNeedEncrypt == true) {
@@ -1989,7 +1989,7 @@ void
vGenerateMACHeader(
struct vnt_private *pDevice,
unsigned char *pbyBufferAddr,
- unsigned short wDuration,
+ __le16 wDuration,
PSEthernetHeader psEthHeader,
bool bNeedEncrypt,
unsigned short wFragType,
@@ -2027,7 +2027,7 @@ vGenerateMACHeader(
if (bNeedEncrypt)
pMACHeader->wFrameCtl |= cpu_to_le16((unsigned short)WLAN_SET_FC_ISWEP(1));
- pMACHeader->wDurationID = cpu_to_le16(wDuration);
+ pMACHeader->wDurationID = le16_to_cpu(wDuration);
if (pDevice->bLongHeader) {
PWLAN_80211HDR_A4 pMACA4Header = (PWLAN_80211HDR_A4) pbyBufferAddr;