Commit Graph

127 Commits

Author SHA1 Message Date
Malcolm Priestley 3ba0938c16 staging: vt6656: rxtx.c s_vFillTxKey replace u8 *pbyBuf.
Replace with struct vnt_tx_fifo_head and attach pbyBuf to
adwTxKey[0]

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:45:50 -07:00
Malcolm Priestley ecd80240af staging: vt6656: rxtx.c clean up s_uGetRTSCTSDuration
White space clean up.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley 3dec8f1654 staging: vt6656: rxtx.c s_uGetRTSCTSDuration allow fall-through duplicates
Allow switch fall-through of duplicate case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:37 -07:00
Malcolm Priestley f84cdf65a7 staging: vt6656: rxtx.c s_bPacketToWirelessUsb set fallback tx rates
Set the two TX fall back rates in s_bPacketToWirelessUsb and
pass to private area of driver in variables tx_rate_fb0
and tx_rate_fb1 from the wFB_Opt0/wFB_Opt1 array.

Apply these rates were needed in the TX structure and
remove byFBOption settings in s_uGetRTSCTSDuration.

This greatly simplifies s_uGetRTSCTSDuration and
more future flexibility of setting rates from
upper levels of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 12:40:36 -07:00
Malcolm Priestley 92928f1318 staging: vt6656: rxtx.c cleanup s_vGenerateTxParameter
Remove white space and commented out code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-07 19:01:53 -07:00
Malcolm Priestley c545e6a6f0 staging: vt6656: rxtx.c remove dead code s_uFillDataHead/pvTxDataHd.
uFillDataHead in is now dead so remove and pvTxDataHd.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:10 -07:00
Malcolm Priestley c12dca0946 staging: vt6656: rxtx.c add no rts struct vnt_tx_datahead_ab
Add no rts/cts vnt_tx_datahead_ab to union vnt_tx_data_head.

The need_mic now applies to all modes of packet type PK_TYPE_11B.

and return vnt_rxtx_datahead_ab in s_vGenerateTxParameter

This removes pvTxDataHd pointer assignment and calls to s_uFillDataHead.

Since pvTxDataHd is now null a small vendor hack to vDMA0_tx_80211/csMgmt_xmit
to do with Disassociation-packet is also changed correct head position.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:09 -07:00
Malcolm Priestley 5634a5ab6a staging: vt6656: rxtx.c parse out vnt_rxtx_datahead_ab
Parse struct vnt_tx_datahead_ab from s_uFillDataHead and
move to struct vnt_rts_ab structure returning duration down
functions.

Both are returned in s_uFillDataHead at this stage as pvTxDataHd
is only null in s_bPacketToWirelessUsb.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:09 -07:00
Malcolm Priestley a90186e458 staging: vt6656: rxtx.c add no rts struct vnt_tx_datahead_a_fb
Add no rts/cts vnt_tx_datahead_a_fb to union vnt_tx_data_head.

The need_mic now applies to all modes of packet type PK_TYPE_11A.

and return vnt_rxtx_datahead_a_fb in s_vGenerateTxParameter

This removes pvTxDataHd pointer assignment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:09 -07:00
Malcolm Priestley bd3f51f1ad staging: vt6656: rxtx.c parse out struct vnt_tx_datahead_a_fb
Parse struct vnt_tx_datahead_a_fb from s_uFillDataHead and
move to struct vnt_rts_a_fb structure returning duration down
functions.

This removes pvTxDataHd pointer assignment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:09 -07:00
Malcolm Priestley 5b852f5352 staging: vt6656: rxtx.c Parse struct vnt_tx_datahead_g_fb
Parse struct vnt_tx_datahead_g_fb from s_uFillDataHead and
move to struct vnt_rts_g_fb/struct vnt_cts_fb structure returning
duration down functions.

This removes pvTxDataHd pointer assignment.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:09 -07:00
Malcolm Priestley 78363fd187 staging: vt6656: rxtx.c Parse struct vnt_tx_datahead_g
Parse struct vnt_tx_datahead_g from s_uFillDataHead and
move to struct vnt_rts_g/struct vnt_cts structure.

This removes pvTxDataHd pointer assignment.

The duration_id(uDuration) field is now returned in s_vGenerateTxParameter.

The return of s_uFillDataHead temporary or'ed to retain functionality of
other functions and is removed at the end of this patch series.

Since pvTxDataHd is now null a small vendor hack to vDMA0_tx_80211/csMgmt_xmit
to do with Disassociation-packet is also changed correct head position.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:09 -07:00
Malcolm Priestley 0a0f4b6959 staging: vt6656: rxtx.c change tx functions to return u16
s_vGenerateTxParameter, s_vFillCTSHead, s_vFillRTSHead, vnt_rxtx_rts* functions
to return u16

Initially this is the duration_id field for ieee80211_hdr

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 13:56:08 -07:00
Greg Kroah-Hartman 73b2277718 Merge 3.12-rc3 into staging-next
We want the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-29 18:42:21 -07:00
Malcolm Priestley fa57560c5d staging: vt6656: rxtx.c remove dead code rts_cts void
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:40:13 -07:00
Malcolm Priestley b9cc2fc020 staging: vt6656: rxtx.c Move rts_cts pointer assignment to s_vGenerateTxParameter
Move rts/cts pointers to relevant vnt_tx_data_head position.

Remove old rts_cts pointers in calling functions.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:40:13 -07:00
Malcolm Priestley f0e0d5051c staging: vt6656: rxtx.c s_vGenerateTxParameter Create vnt_mic_hdr structure
Create double pointer to pass back vnt_mic_hdr address position
of relevant structure if need_mic is more than 0. Otherwise it
is NULL.

This replaces the pMICHDR void pointer with struct vnt_mic_hdr
and assignments in the calling functions.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:40:13 -07:00
Malcolm Priestley 56c60e4f1c staging: vt6656: rxtx.c create structure to join vnt_tx_data_head with vnt_tx_head.
Create struct vnt_tx_mic_hdr for with union vnt_tx_data_head
for mic mode.

Create union vnt_tx for mic and non mic mode.

Attach vnt_rrv_time_* to relevant tx_head.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:40:13 -07:00
Malcolm Priestley 9e38a5c105 staging: vt6656: rxtx.c Create union of struct vnt_rrv_time* stuctures
Attach union vnt_tx_head to structure vnt_tx_buffer replacing pointer
pvRrvTime.

In s_vGenerateTxParameter the relevant struct vnt_rrv_time_*
structure is attached to the vnt_tx_head.

The NULL check is now pFifoHead.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:40:12 -07:00
Malcolm Priestley 18e35e081e staging: vt6656: rxtx.c [BUG] s_vGetFreeContext dead lock on null apTD.
There seems to be race condition that the device is ndo_start_xmit
at a point where the device is closing and apTD is NULL resulting
in dead lock.

Add a NULL check to apTD and return NULL to calling functions.

This is more likely on 64 bit systems.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:53:39 -07:00
Malcolm Priestley 8e344c8847 staging: vt6656: rxtx.c s_vGenerateTxParameter replace pTxBufHead void pointer.
with struct vnt_tx_buffer and attach vnt_tx_fifo_head to pTX_Buffer structure.

The the calling pbyTxBufferAddr points to the same address as
vnt_tx_buffer->fifo_head and is still in use.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:25:41 -07:00
Malcolm Priestley d66caada5a staging: vt6656: desc.h remove typedef struct tagSTxBufHead to rxtx.h
In code it is referred to as fifo to renamed to
typedef struct tagSTxBufHead -> struct vnt_tx_fifo_head

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

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:25:40 -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