Commit graph

384 commits

Author SHA1 Message Date
Dave Jones 0b7cb6976e staging/vt6656: Fix screwed up indentation in swGetOFDMControlRate
The indentation in the swGetOFDMControlRate function is screwed up.
At first it appears that there are missing braces on a multi-line if, but
looking at history, commit dd0a774fc7
("staging: vt6656: card/main_usb/device use new structure names")
incorrectly indented the two lines below.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:39:27 -07:00
Malcolm Priestley 115cac2e7a staging: vt6656: device.h Replace typedef struct _RCB
Replace with struct vnt_rcb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 15:28:43 -07:00
Malcolm Priestley 688141d674 staging: vt6656: baseband.h re: baseband.c:877:26: sparse: incorrect type in assignment (different base types)
sparse warnings: (new ones prefixed by >>)
...
>> drivers/staging/vt6656/baseband.c:877:26: sparse: incorrect type in assignment (different base types)
   drivers/staging/vt6656/baseband.c:877:26:    expected unsigned short [unsigned] [usertype] len
   drivers/staging/vt6656/baseband.c:877:26:    got restricted __le16 [usertype] <noident>
>> drivers/staging/vt6656/baseband.c:880:26: sparse: incorrect type in assignment (different base types)
   drivers/staging/vt6656/baseband.c:880:26:    expected unsigned short [unsigned] [usertype] len
   drivers/staging/vt6656/baseband.c:880:26:    got restricted __le16 [usertype] <noident>

vnt_phy_field member len should be __le16.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-28 15:28:42 -07:00
Malcolm Priestley dcdf1d0323 staging: vt6656: device.h replace typedef struct _USB_SEND_CONTEXT.
Replace with struct vnt_usb_send_context.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:56:42 -07:00
Malcolm Priestley f6804f3376 staging: vt6656: rxtx.c s_vFillTxKey use switch for pTransmitKey->byCipherSuite
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:55:34 -07:00
Malcolm Priestley 95bfb1ae0d staging: vt6656: rxtx.c s_vFillTxKey clean up format and white space.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:55:34 -07:00
Malcolm Priestley 5fb8e412ab staging: vt6656: rxtx.c s_vFillRTSHead/s_vFillCTSHead move union vnt_tx_data_head up one level.
Move
s_vFillRTSHead union vnt_tx_data_head to void *pvRTS argument.
s_vFillCTSHead union vnt_tx_data_head to void *pvCTS argument.

In s_vGenerateTxParameter create union vnt_tx_data_head
pointing to rts_cts;

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:54:39 -07:00
Malcolm Priestley 351c7dc3f7 staging: vt6656: rxtx.c merge pvRTS and pvCTS/pCTS void pointers
As result of patch
rxtx.c s_vGenerateTxParameter create argument bool need rts

RTS and CTS void pointers can be merged.

Create new pointer rts_cts so that unions in s_vFillCTSHead/s_vFillRTSHead
can be joined.

If rts_cts is NULL neither exist.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:54:39 -07:00
Malcolm Priestley f46142b0bb staging: vt6656: rxtx.c s_vGenerateTxParameter create argument bool need rts
Allow conditional statements to be based on true/false instead of
NULL or not pointer pvRTS.

Harmonise all call functions will bool type.

If need_rts is true then rts is needed.

If need_rts is false then
	cts is needed only when byPktType == PK_TYPE_11GB || PK_TYPE_11GA.
	none no rts/cts other byPktTypes.

This allow the joining of pointers pvRTS/pvCTS in to single pointer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:54:39 -07:00
Malcolm Priestley 27df3ebf36 staging: vt6656: s_vFillCTSHead join structures of vnt_cts* to union vnt_tx_data_head
Only one of vnt_rts*/vnt_cts* structures are accessed at any one time.

structures vnt_cts and vnt_cts_fb are members of union vnt_tx_data_head.

Create pointer union head and point structures to the correct member.

Point the union to pvCTS.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:54:39 -07:00
Malcolm Priestley 43e48a4a8b staging: vt6656: rxtx.c s_vFillCTSHead Remove byPktType if
s_vFillCTSHead is only called when byPktType == PK_TYPE_11GB ||
byPktType == PK_TYPE_11GA so remove unnecessary if on byPktType.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:54:39 -07:00
Malcolm Priestley 2b83ebd0b7 staging: vt6656: rxtx.c s_vFillRTSHead PK_TYPE_11A allow fall through AUTO_FB_NONE
byFBOption == AUTO_FB_NONE (0) is the same as PK_TYPE_11B

Reverse if condition to break and allow fall through.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:49:29 -07:00
Malcolm Priestley 0bddd303f4 staging: vt6656: rxtx.c: s_vFillRTSHead change if/else to switch on byPktype
Allowing fall through where necessary.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 16:49:29 -07:00
Malcolm Priestley 9d5829bfba staging: rxtx.c s_vFillRTSHead white space and formating clean up
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:47 -07:00
Malcolm Priestley 13fe62ae6a staging: vt6656: rxtx s_vFillRTSHead create union of vnt_rts*/vnt_cts* structures.
Only one of vnt_rts*/vnt_cts* structures are accessed at any one time.

Join these structures in to a single union.

These will eventually form the tail structure of vnt_tx_buffer and
include structures vnt_tx_datahead*

Structures in s_vFillCTSHead will join in next patch series.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:47 -07:00
Malcolm Priestley 9d2578c170 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_a_fb to new function.
Parse out vnt_rts_a_fb code to new function vnt_rxtx_rts_a_fb_head.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:47 -07:00
Malcolm Priestley 1712633d72 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_ab to new function.
Parse out vnt_rts_ab code to new function vnt_rxtx_rts_ab_head.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:47 -07:00
Malcolm Priestley ec91713a29 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_g_fb to new function.
Parse out vnt_rts_g_fb code to new function vnt_rxtx_rts_g_fb_head.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:46 -07:00
Malcolm Priestley 5e67ee4956 staging: vt6656: rxtx.c s_vFillRTSHead Parse out struct vnt_rts_g to new functions.
Parse out vnt_rts_g code to new function vnt_rxtx_rts_g_head.

Also create a new common calling function vnt_fill_ieee80211_rts
to fill the ieee80211_rts structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:26:46 -07:00
Malcolm Priestley 2dc22d5a22 staging: vt6656: s_vGenerateTxParameter pvRrvTime should never be NULL
If pvRrvTime is NULL the whole structure is NULL, so
remove if statements and consolidate to single return.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:34 -07:00
Malcolm Priestley b6c416ce68 staging: vt6656: s_vGenerateTxParameter dead code bDisCRC
As result of patch
vt6656: rxtx.c s_vFillCTSHead remove dead code bDisCRC

bDisCRC is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:34 -07:00
Malcolm Priestley 09bd0f3563 staging: vt6656: rxtx.c s_vFillCTSHead remove dead code bDisCRC
As result of patch
vt6656: device.h Remove dead code bSoftwareGenCrcErr.

dDiscCRC is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:34 -07:00
Malcolm Priestley fedbfe7eb8 staging: vt6656: rxtx.c s_vFillRTSHead remove dead bDiscCRC
As result of patch
vt6656: device.h Remove dead code bSoftwareGenCrcErr.

dDiscCRC is unused.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:33 -07:00
Malcolm Priestley 4235f72fbc staging: vt6656: device.h Remove dead code bSoftwareGenCrcErr.
Probably an error in earlier firmware is never enabled so remove.

bPacketToWirelessUsb remove dead if/else and variables.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 06:25:33 -07:00
Malcolm Priestley ec37d8b67b staging: vt6656: rxtx.c s_vFillTxKey fill structure vnt_mic_hdr
Replace the pointer offsets with structure of mic_hdr with
endian conversion where needed.

Replace vFillTxKey argument u8 *pMICHDR with struct vnt_mic_hdr *mic_hdr
and fix type of calling functions.

An extra check that mic_hdr is not NULL

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:03 -07:00
Malcolm Priestley 5a5d6a80cf staging: vt6656: desc.h Remove typedef struct tagSMICHDRHead to new structure in rxtx.h
To new structure.
typedef struct tagSMICHDRHead -> struct vnt_mic_hdr

This is only needed by rxtc.c so moved to rxtx.h

The new structure is the same size as the old but
contains the members as pointer referenced in
rxtx.c s_vFillTxKey
u8 id
	*pMICHDR = 0x59;
u8 tx_priority;
	*((u8 *)(pMICHDR+1)) = 0; // TxPriority
u8 mic_addr2[6];
	memcpy(pMICHDR+2, &(pMACHeader->addr2[0]), 6);
__be32 tsc_47_16;
	pMICHDR+8 = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16));
	pMICHDR+9 = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16));
	pMICHDR+10 = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16));
	pMICHDR+11 = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16));
__be16 tsc_15_0;
	pMICHDR+12 = HIBYTE(pTransmitKey->wTSC15_0);
	pMICHDR+13 = LOBYTE(pTransmitKey->wTSC15_0);
__be16 payload_len;
	pMICHDR+14 = HIBYTE(wPayloadLen);
	pMICHDR+15 = LOBYTE(wPayloadLen);
__be16 hlen;
	pMICHDR+16 = 0; // HLEN[15:8]
	pMICHDR+17 = 28; // HLEN[7:0]
__le16 frame_control;
	memcpy(pMICHDR+18, (u8 *)&wValue, 2); // MSKFRACTL
u8 addr1[6];
	memcpy(pMICHDR+20, &(pMACHeader->addr1[0]), 6);
u8 addr2[6];
	memcpy(pMICHDR+26, &(pMACHeader->addr2[0]), 6);
u8 addr3[6];
	memcpy(pMICHDR+32, &(pMACHeader->addr3[0]), 6);
__le16 seq_ctrl;
	memcpy(pMICHDR+38, (u8 *)&wValue, 2); // MSKSEQCTL
u8 addr4[6];
	memcpy(pMICHDR+40, &(pMACHeader->addr4[0]), 6);
u16 packing; /* packing to 48 bytes */

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Malcolm Priestley f115e76aea staging: vt6656: rxtx.c endian correct wTimeStampOff
wTimeStampOff needs to be endian corrected

Create new function vnt_time_stamp_off to return little endian u16 value.

Private variable byPreambleType is common to all calling functions is included.

variable rate to set the desired rate.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Malcolm Priestley 9c3806d5a8 staging: vt6656: rxtx.c s_create new function to endian correct uGetTxRsvTime.
We can't endian correct uGetTxRsvTime because it is called by other functions.

Create new function to vnt_rxtx_rsvtime_le16 to return little endian u16
value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Malcolm Priestley cfabe4b43c staging: vt6656: s_uGetRTSCTSRsvTime return u16 endian corrected value.
s_uGetRTSCTSRsvTime always needs to be corrected to u16 endian value.

Change function to return u16 endian corrected value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 10:11:02 -07:00
Malcolm Priestley 6b5ad9d269 staging: vt6656: rxtx.c: s_uGetDataDuration Drop argument byDurType.
When byDurType == DATADUR_B then byPktType == PK_TYPE_11B

Drop argument byDurType and filter on byPktType == PK_TYPE_11B.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:07:50 -07:00
Malcolm Priestley d500595516 staging: vt6656: rxtx.c s_uGetDataDuration return endian corrected u16.
The return always be u16 endian corrected. For the
large part this is missing.

Fix uGetDataDuration to return u16 endian corrected.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:07:50 -07:00
Malcolm Priestley aed387c78d staging: vt6656: baseband.c BBvCalculateParameter create structure for pwPhyLen, pbyPhySrv and pbyPhySgn
Create single packed structure vnt_phy_field for rxtx.h structures.

In card.c CARDvSetRSPINF a vnt_phy_field replaces abyServ,
abySignal, awLen variables.

In rxtx.c point BBvCalculateParameter to relevant field.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:13:27 -07:00
Malcolm Priestley 4ac306e0d4 staging: vt6656: baseband.c BBvCalculateParameter pwPhyLen return endian corrected.
In rxtx.c many calls to BBvCaculateParameter are not endian
corrected all calls here need to be endian corrected.

Correct the endian in BBvCaculateParameter.

In card.c: CARDvSetRSPINF pwPhyLen points to awLen and is
manually applied to abyData.  Because it is now endian
corrected put_unaligned is needed to correct it.

In rxtx.c remove were endian is corrected.

This allows to merge  BBvCalculateParameter *pwPhyLen,*pbyPhySrv
and *pbyPhySgn to singles structure for tx buffers.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:10:36 -07:00
Malcolm Priestley c921cc8c1a staging: vt6656: rxtx.c dead code TYPE_ATIMDMA/TYPE_BEACONDMA
Both TYPE_ATIMDMA/TYPE_BEACONDMA are not used in driver for the value of uDMAIdx.

Remove dead code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 10:02:29 -07:00
Malcolm Priestley 1da4ee2050 staging: vt6656: desc.h remove typedef tagSTxDataHead_a_FB to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_a_FB -> struct vnt_tx_datahead_a_fb

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 558becf188 staging: vt6656: desc.h remove typedef tagSTxDataHead_ab to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_ab -> struct vnt_tx_datahead_ab

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 7c05c5451d staging: vt6656: desc.h remove typedef tagSTxDataHead_g_FB to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_g_FB -> struct vnt_tx_datahead_g_fb

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts*/vnt_cts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 7e60a3de27 staging: vt6656: desc.h: remove typedef struct tagSTxDataHead_g to new structure in rxtx.h
To new structure.
typedef struct tagSTxDataHead_g -> struct vnt_tx_datahead_g

This is only needed by rxtc.c so moved to rxtx.h visible to
vnt_rts*/vnt_cts* structures which it will eventually form part of
their structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 57107d4364 staging: vt6656: desc.h remove dead code typedef struct tagSRrvTime_atim.
Remove dead structure tagSRrvTime_atim.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:19 -07:00
Malcolm Priestley 976467d3cb staging: vt6656: desc.h remove typedef SRrvTime_ab to new structure.
To new structure.
typedef struct tagSRrvTime_ab -> struct vnt_rrv_time_ab

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Malcolm Priestley 4f990057bc staging: vt6656: desc.h: Move typedef struct tagSRrvTime_gCTS to new structure in rxtx.h
To new structure.
typedef struct tagSRrvTime_gCTS -> struct vnt_rrv_time_cts

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Malcolm Priestley 6398a59bec staging: vt6656: desc.h: Move typedef tagSRrvTime_gRTS to new structure in rxtx.h
To new structure.
typedef struct tagSRrvTime_gRTS -> struct vnt_rrv_time_rts

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-19 15:39:18 -07:00
Malcolm Priestley f0c5ba2815 staging: vt6656: desc.h Move typedef struct tagSCTS* to new structures in rxtx.h
The new structures being
typedef struct tagSCTS -> struct vnt_cts
typedef struct tagSCTS_FB -> struct vnt_cts_fb

These are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

The linux/ieee80211.h in desc.h is no longer needed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:24:22 -07:00
Malcolm Priestley c521cb5888 staging: vt6656: desc.h Remove typedef struct tagSRTS_* to new strutures in rxtx.h
The new structures being
typedef struct tagSRTS_g -> struct vnt_rts_g
typedef struct tagSRTS_g_FB -> struct vnt_rts_g_fb
typedef struct tagSRTS_ab -> struct vnt_rts_ab
typedef struct tagSRTS_a_FB -> struct vnt_rts_a_fb

These are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:24:22 -07:00
Malcolm Priestley 01f865ba4a staging: vt6656: rxtx.h : remove typedef struct tagSBEACON_BUFFER
Replace with struct vnt_beacon_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:20:54 -07:00
Malcolm Priestley d0a2b8fa76 staging: vt6656: rxtx.c : s_bPacketToWirelessUsb remove usbPacketBuf.
Move vnt_tx_buffer *pTxBufHead to argument u8 *usbPacketBuf position.

Fix the calling to s_bPacketToWirelessUsb so it attached to
the calling struct vnt_tx_buffer pTX_Buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:20:54 -07:00
Malcolm Priestley f39c0d8e30 staging: vt6656: rxtx.c remove typdef PTX_BUFFER
Rename to vnt_tx_buffer.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-15 17:20:54 -07:00
Malcolm Priestley e34f9dbe86 staging: vt6656: rxtx.c s_uGetRTSCTSDuration return endian u16
The return value of uGetRTSCTSDuration always needs to be
corrected to a u16 little endian corrected value.

Some places the endian correction is done on the next line

Change uGetRTSCTSDuration return u16 little endian corrected value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:42:59 -07:00
Malcolm Priestley b02ccd5957 staging: vt6656: rxtx.c s:_uGetDataDuration simplify structure.
A value is only returned when bNeedAck is true.

Only when byDurType == DATADUR_B is different.

Remove switch statement and simplify with if structure.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:42:59 -07:00
Malcolm Priestley 18ee00a6e1 staging: vt6656: rxtx.h dead code typedef union tagUTX_BUFFER_CONTAINER
This is part of the Remote NDIS message format with patch

vt6656: rxtx.c: s_vGetFreeContext use single tx memset.

there is not need for this structure and its members.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-14 14:16:18 -07:00