Commit Graph

648 Commits

Author SHA1 Message Date
Malcolm Priestley
19440266b8 staging: vt6656: clean up BBvUpdatePreEDThreshold
Camel case changes
pDevice -> priv
bScanning -> scanning

White space cleanup

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:23 -07:00
Malcolm Priestley
6d5485af95 staging: vt6656: BBvUpdatePreEDThreshold change byBBPreEDIndex
assign pDevice->byBBPreEDIndex to ed_idx and change ed_inx
value in switch.

If ed_inx == byBBPreEDIndex and not bScanning return out.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:23 -07:00
Malcolm Priestley
7794dad672 staging: vt6656: BBvUpdatePreEDThreshold reorganize ControlvWriteByte.
Create variables cr_201 and cr 206 with values for registers 0xc9 and 0xce.

Set both to zero .

If cr201 and cr206 are zero drop out.

write both out with ControlvWriteByte.

pDevice->byBBPreEDIndex breaks will be dealt with in next patch

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:23 -07:00
Malcolm Priestley
0b7021f57b staging: vt6656: BBvUpdatePreEDThreshold replace debug messages.
Replace DBG_PRT with single dev_dbg with calling function
and byBBPreEDRSSI value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:23 -07:00
Malcolm Priestley
36c69f3ce5 staging: vt6656: BBvExitDeepSleep remove camel case.
pDevice -> priv

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:23 -07:00
Malcolm Priestley
07c116f29c staging: vt6656: BBvSetDeepSleep remove camel case
pDevice -> priv

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:22 -07:00
Malcolm Priestley
15897f6724 staging: vt6656: BBvSetVGAGainOffset remove camel case
pDevice -> priv
byData -> data

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:22 -07:00
Malcolm Priestley
4bdb312028 staging: vt6656: BBvSetShortSlotTime remove camel case.
pDevice -> priv
byBBVGA -> bb_vga

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:22 -07:00
Malcolm Priestley
53dab3280b staging: vt6656: BBvSetAntennaMode remove camel case.
changes
pDevice -> priv
byAntennaMode -> antenna_mode

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:22 -07:00
Malcolm Priestley
efe40c09b8 staging: vt6656: clean up BBvSetAntennaMode.
white space clean up.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:22 -07:00
Malcolm Priestley
a1ff543514 staging: vt6656: BBvCalculateParameter remove camel case
Camel case changes
pDevice, cbFrameLength, wRate, byPacketType, cbBitCount, cbUsCount
cbTmp, bExtBit, byPreambleType

->

priv, frame_length, tx_rate, pkt_type, bit_count, count,
tmp,  ext_bit, preamble_type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:22 -07:00
Malcolm Priestley
a4fb3e78b7 staging: vt6656: checkpatch cleanup BBvCalculateParameter.
White space clean up.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:21 -07:00
Malcolm Priestley
030ede1e0e staging: vt6656: BBuGetFrameTime remove camel case.
Camel case changes.
byPreambleType, byPktType, cbFrameLength, uFrameTime, uPreamble, uTmp, uRate
->
preamble_type, pkt_type, frame_length, frame_time, preamble, tmp, rate

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:21 -07:00
Malcolm Priestley
3b5a89ca3d staging: vt6656: BBuGetFrameTime remove uRateIdx
Remove uRateIdx and rename wRate tx_rate

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:21 -07:00
Malcolm Priestley
4d99952df1 staging: vt6656: checkpatch cleanup BBuGetFrameTime.
clean up white space.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:21 -07:00
Malcolm Priestley
2a4ee86f04 staging; vt6656: dead code aes_ccmp.
After dead code dpc hostapd remove aes.c/h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:21 -07:00
Malcolm Priestley
7a24390d0f staging: vt6656: dead code bRelayPacketSend
After dead code hostapd remove bRelayPacketSend

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:21 -07:00
Malcolm Priestley
c0fcac91f3 staging: vt6656: dpc.c remove hostapd
Remove dead functions
s_bAPModeRxCtl
s_bAPModeRxData

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:20 -07:00
Malcolm Priestley
90f96acd1b staging: vt6656: Remove hostapd functions.
Remove throughout driver
bEnableHostapd
bEnable8021x
bEnableHostWEP
struct net_device *apdev
tx_80211

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:20 -07:00
Malcolm Priestley
a30d534bda staging: vt6656: Remove dead code hostap.
It is based on viawget, proprietary version of wpa supplicant.

The code is not compatible with the current version of hostapd.

It may be possible to implement when the driver is fully converted
to mac80211.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19 15:23:20 -07:00
Malcolm Priestley
9cade5aceb staging: vt6656: Remove always true bUpdateBBVGA
Remove true if statements.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:31 -07:00
Malcolm Priestley
c729b0a4de staging: vt6656: vnt_private remove dead variables.
byBBCR4d
byBBCRc9
byBBCR88
byBBCR09

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:31 -07:00
Malcolm Priestley
0fc64c1579 staging: vt6656: vnt_private remove dead variables
byFOETuning
byAutoPwrTunning

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:31 -07:00
Malcolm Priestley
085f7c437f staging: vt6656: vnt_private remove dead variables.
dwAotoRateTxOkCnt
dwAotoRateTxFailCnt
dwErrorRateThreshold
dwTPTable

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:31 -07:00
Malcolm Priestley
e7cb8e25eb staging: vt6656: Remove unused variable byACKRate.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:31 -07:00
Malcolm Priestley
6983df6fbc staging: vt6656: Remove unused variable uScanTime.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:30 -07:00
Malcolm Priestley
f576abc8fc staging: vt6656: Remove dead variable bCCK.
bCCK is always true remove all false conditions and
local variable.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:30 -07:00
Malcolm Priestley
a0522e88c0 staging: vt6656: Remove unused variable ulTxPower.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:30 -07:00
Malcolm Priestley
2486890a93 staging: vt6656: Remove unused variable byRevId.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:30 -07:00
Malcolm Priestley
60f8ce8dd6 staging: vt6656: rndis.h move all to device.h
Commands macros are common to all source files.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:30 -07:00
Malcolm Priestley
887651e00e staging: vt6656: rndis.h remove dead code.
Remove dead structures and macros.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:29 -07:00
Malcolm Priestley
15baf4ff62 staging: vt6656: srom.h move all macros to device.h
Remove srom.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:29 -07:00
Malcolm Priestley
399db90dd7 staging: vt6656: srom.h : Remove dead code.
Remove macros and unused strutures.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:29 -07:00
Malcolm Priestley
bffa42e151 staging: vt6656: desc.h Remove unused macros
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:29 -07:00
Malcolm Priestley
d4f376ddbe staging: vt6656: device.h remove dead macros
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:29 -07:00
Malcolm Priestley
4aeaf1538f staging: vt6656: device_cfg.h Move macros to device.h
Remove device_cfg.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:29 -07:00
Malcolm Priestley
fe7111aa93 staging: vt6656: device_cfg.h remove dead code.
Also unneeded #ifndef

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:28 -07:00
Malcolm Priestley
9af49fdbdd staging: vt6656: PIPEnsControlIn remove camel case.
Camel case changes
pDevice, byRequest,  wValue, wIndex, wLength, pbyBuffer, ntStatus

->

priv, request, value, index, length, buffer, status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:28 -07:00
Malcolm Priestley
0f06a73949 staging: vt6656: PIPEnsControlOut remove camel case.
Camel case changes
pDevice, byRequest,  wValue, wIndex, wLength, pbyBuffer, ntStatus

->

priv, request, value, index, length, buffer, status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:28 -07:00
Malcolm Priestley
8a6602614a staging: vt6656: usbpipe: replace debug messsages.
Replace all DBG_PRT wiht dev_dbg

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:28 -07:00
Malcolm Priestley
f347d8cbd0 staging: vt6656: usbpipe: get rid of in/out debug messages.
Remove all in/out debug messages.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:28 -07:00
Malcolm Priestley
f53d9f12c5 staging: vt6656: rf.c additional power.
Provides extra power on weak RSSI.

The values orginate from the vendors driver.

It is applied later in RFbRawSetPower to simplify and check that it doesn't
exceed the max power.

Vendor driver VT6656_Linux_src_v1.21.03_x86_11.04.zip
http://www.viaembedded.com/servlet/downloadSvl?id=1890&download_file_id=14704
This is GPL-licensed code.

vendors code
...
if (pDevice->byRFType == RF_VT3226D0) {
	if (lRSSI == 0){
		lAdditionalPower = 7;
	}
	else if ((lRSSI < -60) && (lRSSI >= -65)){
		lAdditionalPower = 5;
		//lAdditionalPower = 9;
	}
	else if ((lRSSI < -65) && (lRSSI >= -70)){
		lAdditionalPower = 7;
		//lAdditionalPower = 9;
	}
	else if ((lRSSI < -70) && (lRSSI >= -80)){
		lAdditionalPower = 9;
		}
	else if (lRSSI < -80) {
		lAdditionalPower = 9;
	}
}
else {
	if (lRSSI == 0){
		lAdditionalPower = 7;
	}
	else if ((lRSSI < -70) && (lRSSI >= -75)){
		lAdditionalPower = 5;
	}
	else if ((lRSSI < -75) && (lRSSI >= -80)){
			lAdditionalPower = 7;
		}
		else if (lRSSI < -80) {
			lAdditionalPower = 9;
		}
	}

...

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-18 09:58:27 -07:00
Malcolm Priestley
3136b5fee2 staging: vt6656: Remove PIPEnsControlOutAsyn/CONTROLnsRequestOutAsyn
This now the same as PIPEnsControlOut.

Replace with PIPEnsControlOut/CONTROLnsRequestOut.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:20 -07:00
Malcolm Priestley
0fb2af353f staging: vt6656: PIPEnsControlIn use usb_control_msg
Now that this function is nolonger atomic useusb_control_msg.

Return STATUS_FAILURE if ntStatus less than wLength

Remove the old struct urb and struct usb_ctrlrequest structures.

Remove fMP_CONTROL_READS flag.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:20 -07:00
Malcolm Priestley
7021b684eb staging: vt6656: usbpipe.c PIPEnsControlOut use usb_control_msg
Now that this fucntion is nolonger atomic change to usb_control_msg

Return STATUS_FAILURE if ntStatus less than wLength.

Remove fMP_CONTROL_WRITES flag

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:20 -07:00
Malcolm Priestley
3c647642f6 staging: vt6656: lock changes device_xmit
Replace locks with the spin_lock_irqsave and spin_unlock_irqrestore

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:20 -07:00
Malcolm Priestley
29b02373f4 staging: vt6656: lock changes: s_nsBulkInUsbIoCompleteRead.
Use spin_lock_irqsave/spin_unlock_irqrestore

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:19 -07:00
Malcolm Priestley
c91b1869fb staging: vt6656: lock changes: usbpipe.c add mutex lock.
PIPEnsControlOut and PIPEnsControlIn are nolonger
atomic but they do need a usb lock.

Add new mutex lock for these functions and PIPEnsControlOutAsyn.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:19 -07:00
Malcolm Priestley
97641ca2b2 staging: vt6656: lock changes: vRunCommand nsDMA_tx_packet
vRunCommand is nolonger atomic add lock for nsDMA_tx_packet.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:19 -07:00
Malcolm Priestley
8783a1a4af staging: vt6656: lock changes: bMgrPrepareBeaconToSend add lock.
bMgrPrepareBeaconToSend is nolonger atomic

csBeacon_xmit must be locked add spin lock.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 15:02:19 -07:00