1
0
Fork 0
Commit Graph

798 Commits (eaaa7ec71bff4cb34d9025ed89068d4b3cac3df0)

Author SHA1 Message Date
Malcolm Priestley 738487ffc5 staging: vt6655: card.c move __iomem into functions.
Removing dereferencing from callers

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:37:24 -08:00
Malcolm Priestley 6d35b1fcaa staging: vt6655: card Remove function vUpdateIFS
vUpdateIFS does the same operations of CARDbSetPhyParameter there
is not need to call this function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:37:24 -08:00
Malcolm Priestley c397d46fbe staging: vt6655: always keep abyCurrentNetAddr aligned to 2
Because the driver now uses ether_addr_copy the alignment of this
variable must be maintained at 2.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:54 -08:00
Malcolm Priestley bf8918de79 staging: vt6655: change typedef enum _VIA_PKT_TYPE to macro
Replacing for u8 type and removing cast for byBBType.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:54 -08:00
Malcolm Priestley ff8d9f0806 staging: vt6655: replace typedef enum _VIA_BB_TYPE with macros
Replacing type with u8

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:54 -08:00
Malcolm Priestley bfb6c86376 staging: vt6655: CARDbSetPhyParameter remove unused parameters
wCapInfo
byERPField,
*pvSupportRateIEs
*pvExtSupportRateIEs

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley b40d821dcc staging: vt6655: dead code remove typedef enum _CARD_PHY_TYPE
Removing unused eCurrentPHYType

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley d1ab52011c staging: vt6655: s_vCalculateOFDMRParameter use bb_type for CARD_PHY_TYPE
using u8 for bb_type and replacing PHY_TYPE_11A with BB_TYPE_11A

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley 6e1d14a56b staging: vt6655: CARDvSetRSPINF us bb_type for CARD_PHY_TYPE
Using u8 for bb_type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley a558e3dcc3 staging: vt6655: CARDbSetPhyParameter change CARD_PHY_TYPE to bb_type
using u8 for bb_type

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley b930eb56e3 staging: vt6655: dead code remove CARDbAddBasicRate
we nonlonger set rates in the driver

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley 3008dd9d9b staging: vt6655: CARDvUpdateBasicTopRate use basic_rates to find top rate
basic_rates should now be used to find it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 13:36:53 -08:00
Malcolm Priestley 61b90995d3 staging: vt6655: Fix issue of byPacketType is not set at all.
set by calling CARDbyGetPktType.

change CARDbIsOFDMinBasicRate to check basic_rates.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:29 -08:00
Malcolm Priestley 8e8a9f5133 staging: vt6655: BBbReadEmbedded replace __iomem with vnt_private
Changing callers to point to private

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:29 -08:00
Malcolm Priestley 377f5bc00f staging: vt6655: BBbWriteEmbedded replace __iomem with vnt_private for callers
Referencing dwIoBase inside function.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:28 -08:00
Malcolm Priestley 78b3c1fde0 staging: vt6655: baseband/rf s_bAL7230Init change __iomem for baseband functions
Replace __iomem with vnt_private providing pointer for dwIoBase

Change BBvPowerSaveModeON and BBvPowerSaveModeOFF to vnt_private and
reference __iomem there, to be removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:28 -08:00
Malcolm Priestley a5f0eef38b staging: vt6655: baseband replace __iomem where caller is priv dereferenced.
Replace with stucture vnt_private *priv

in functions
BBvSoftwareReset
BBvSetTxAntennaMode
BBvSetRxAntennaMode
BBvSetDeepSleep
BBvExitDeepSleep

__iomem *dwIoBase will be moved into BBbWriteEmbedded and BBbReadEmbedded
later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:28 -08:00
Malcolm Priestley 314e5caa4b staging: vt6655: baseband.h remove pDevice from struct vnt_private pointer
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:23:28 -08:00
Malcolm Priestley 54fbb2da8d staging: vt6655: change tx wake queue
Wake queue in the dwIsr loop of device_intr instead of device_tx_srv.

This fixes an issue when ISR_TXDMA0 or ISR_AC0DMA does not occur
device_tx_srv is not called and the queue gets stuck in stopped
condition.

On test if the queue is stuck another MACvTransmitAC0 or MACvTransmit0
in vnt_tx_packet will clear it.

Check on vif that both buffers are available and the queue is stopped.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:52:59 -08:00
Malcolm Priestley 8514408b9b staging: vt6655 baseband.c camel case replace pDevice -> priv
for struct vnt_private

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:14 -08:00
Malcolm Priestley d475d42db6 staging: vt6655: device.h remove dead member wstats
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:14 -08:00
Malcolm Priestley 2ee1ad7b32 staging: vt6655: device_set_options remove dead variables
uConnectionRate
wRTSThreshold
byOpMode
b11hEnable
uChannel

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:14 -08:00
Malcolm Priestley 3d42d26c83 staging: vt6655: baseband.c/h remove dead functions
These functions are not used so remove them
BBbIsRegBitsOn
BBbIsRegBitsOff
BBvReadAllRegs
BBvLoopbackOn
BBvLoopbackOff

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:14 -08:00
Malcolm Priestley bfa4b0febd staging: vt6655: device_init_registers remove uConnectionRate
The device starts up with a default rate of 54M

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:14 -08:00
Malcolm Priestley ac875c17a1 staging: vt6655: device_set_options remove unused ethernet addresses
Removing these variables
abyBroadcastAddr
abySNAP_RFC1042
abySNAP_Bridgetunnel

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:13 -08:00
Malcolm Priestley 1b8e512b41 staging: vt6655: device_get_options remove unused device parameters
IP_byte_align
Channel
PreambleType
RTSThreshold
ConnectionRate
OPMode
b80211hEnable

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:13 -08:00
Malcolm Priestley b1c4133657 staging: vt6655: remove fragmentation from driver
fragmentation is now handled by mac80211.

Remove functions
device_alloc_frag_buf
device_init_defrag_cb
device_free_frag_buf

Removing
typedef struct tagSDeFragControlBlock
frag_thresh
sRxDFCB
cbDFCB;
cbFreeDFCB;
uCurrentDFCBIdx;

macros
FRAG_THRESH_MIN
FRAG_THRESH_MAX

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:13 -08:00
Malcolm Priestley 87299d4c06 staging: vt6655: mac.c and mac.h remove dead functions.
MACvReadAllRegs
MACbyReadMultiAddr
MACvWriteMultiAddr
MACvSetMultiAddrByHash
MACvResetMultiAddrByHash
MACvSetRxThreshold
MACvGetRxThreshold
MACvSetTxThreshold
MACvGetTxThreshold
MACvSetDmaLength
MACvGetDmaLength
MACvGetLongRetryLimit
MACbIsInLoopbackMode
MACbCompareContext
MACvOneShotTimer0MicroSec
MACbTxDMAOff
MACvClearBusSusInd
MACvEnableBusSusEn
MACbFlushSYNCFifo
MACvSetDefaultKeyEntry
MACvEnableDefaultKey
MACvDisableDefaultKey
MACvSetDefaultTKIPKeyEntry
MACvSetDefaultKeyCtl

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:13 -08:00
Malcolm Priestley 6b5db44ecd staging: vt6655: mac.c/h remove member type comments
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:13 -08:00
Malcolm Priestley 5116d9fcf1 staging: vt6655: mac remove dead variable TxRate_iwconfig
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:13 -08:00
Malcolm Priestley 0fbdd5ca6f staging: vt6655: dead code remove header type.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:47 -07:00
Malcolm Priestley 33785983ca staging: vt6655: dead code remove wmgr.h
on removal needs to be replaced by card.h in device.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:47 -07:00
Malcolm Priestley c3fb46429b staging: vt6655: move MAKE_BEACON_RESERVED to device.h
Used only in function device_intr in device_main.c move macro.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:47 -07:00
Malcolm Priestley 1903e6dd05 staging: vt6655: Move LIFETIME RES 64us macros to rxtx.h
Used only by vnt_generate_fifo_header move these macros.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:47 -07:00
Malcolm Priestley e11cdc39f3 staging: vt6655: remove typedef void *TimerFunction
Covert functions TimerSQ3CallBack and TimerState1CallBack to
the correct type for struct timer_list.function to remove
the cast altogether.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:47 -07:00
Malcolm Priestley dd46cf735d staging: vt6655: dead code remove 80211hdr.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:47 -07:00
Malcolm Priestley 9c644a05c6 staging: vt6655: device.h remove dead strutures and macros
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:46 -07:00
Malcolm Priestley 146761058f staging: vt6655: struct vnt_private remove dead members
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:46 -07:00
Malcolm Priestley 4cf8e50303 staging: vt6655: dead code remove country.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:46 -07:00
Malcolm Priestley 651a39cad5 staging: vt6655: dead code remove iocmd.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:46 -07:00
Malcolm Priestley 47a2a3cb75 staging: vt6655: dead code remove iowpa.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:46 -07:00
Malcolm Priestley 8224e771ca staging: vt6655: dead code remove 80211mgr.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:46 -07:00
Malcolm Priestley d54435d3fb staging: vt6655: dead code remove tether.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:46 -07:00
Malcolm Priestley d853ce2291 staging: vt6655: dead code remove bssdb.h header
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley 37cc22b1c4 staging: vt6655: dead remove wcmd.h and typedefs
CMD_STATE
CMD_CODE
CMD_ITEM

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley 38ad4a00eb staging: vt6655: dead code remove ndis and pmkid strutures.
struct pmkid_candidate
typedef struct _BSSID_INFO
typedef struct tagSPMKID
typedef struct tagSPMKIDCandidateEvent
NDIS_802_11_MAC_ADDRESS
typedef struct _NDIS_802_11_AI_REQFI
typedef struct _NDIS_802_11_AI_RESFI
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
typedef struct tagSAssocInfo

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley ab2eb50af8 staging: vt6655: wmgr.h remove management structures
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley 8ec94797eb staging: vt6655: dead code remove vntwifi.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley b0437f281d staging: vt6655: move all RATE_* macros to device.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley d40c444668 staging: vt6655: channel.c remove dead functions
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley b4ba0cb10f staging: vt6655: dead code remove wctl.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley 7910356c7f staging: vt6655: dead code remove 80211mgr.c and functions
80211mgr.h header will be removed later

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley 5e6fc9d7e4 staging: vt6655: dead code remove tcrc.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:45 -07:00
Malcolm Priestley 029c7d225a staging: vt6655L remove tether.c functions
remove
ETHbyGetHashIndexByCrc32
ETHbIsBufferCrc32Ok

tether.h header will be removed later

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:44 -07:00
Malcolm Priestley 1243317b46 staging: vt6655: mib remove unused functions and structure members
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:44 -07:00
Malcolm Priestley 77bb9975d4 staging: vt6655: key.c remove dead functions
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:44 -07:00
Malcolm Priestley 610cc9d98b staging: vt6655: dead code remove vntwifi.c functions
Header will be removed later

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:44 -07:00
Malcolm Priestley e813580c36 staging: vt6655: dead code remove michael.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:43 -07:00
Malcolm Priestley 7c23c2d25d staging: vt6655: deadcode remove aes_ccmp/rc4/tkip
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:43 -07:00
Malcolm Priestley 6bedc35b75 staging: vt6655: dead code remove wpa/wpa2
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:43 -07:00
Malcolm Priestley c49802bfb6 staging: vt6655: deadcode remove wroute.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:42 -07:00
Malcolm Priestley dd1c689cec staging: vt6655: card.c/h remove dead functions
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:34:37 -07:00
Malcolm Priestley 86b5afa757 staging: vt6655: dead code remove IEEE11.h.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley f3de0df9b0 staging: vt6655: dead code datarate.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley 7d48710aec staging: vt6655: dead code remove bssdb.c
header will be removed later

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley 1a48e8c412 staging: vt6655: s_cbFillTxBufHead remove unused parameters
Remove the following parameters
PSEthernetHeader psEthHeader
PSKeyItem pTransmitKey
bool bNeedEncrypt

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley d829163fa9 staging: vt6655: rxtx remove dead functions
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley 8d0126b1f0 staging: vt6655: dead code remove wcmd.c
header will be removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley 185cb4e6ce staging: vt6655: dead code remove wmgr.c
Remove all functions

Header will be deleted later

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley 55340d6bb8 staging: vt6655: remove dead functions in power.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley 01b8979244 staging: vt6655: dpc.c/h remove dead functions
s_byGetRateIdx
s_vGetDASA
s_vProcessRxMACHeader
s_bAPModeRxCtl
s_bAPModeRxData
s_bHandleRxEncryption
s_bHostWepRxEncryption
s_vProcessRxMACHeader
s_byGetRateIdx
s_vGetDASA
device_receive_frame
s_bAPModeRxCtl

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley 2759e2172d staging: vt6655: dead code remove wpactl.c/h
All these functions are now dead.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:35 -07:00
Malcolm Priestley ee1464902c staging: vt6655: dead code remove legacy hostap.c/h
hoatap is now supported by mac80211 in nl80211 mode

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:34 -07:00
Malcolm Priestley ae1927eb34 staging: vt6655: dead code remove ioctl.c/h
The driver nolonger supports these io functions

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:34 -07:00
Malcolm Priestley 0d24c97093 staging: vt6655: dead code remove iwctl.c/h
The iw handler and functions are nolonger required.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:34 -07:00
Malcolm Priestley 7af1ead431 staging: vt6655: dead code remove net device code
All functions are dead and nolonger of use.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:34 -07:00
Malcolm Priestley 3f9aceeddb staging: vt6655: dead code remove zones and channel table elements
emply functions will be deleted later

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:34 -07:00
Malcolm Priestley f4cf678fd7 staging: vt6655: deadcode remove zone file operations and vntconfiguration.dat
These are now all handled by mac80211.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:33:34 -07:00
Malcolm Priestley c7b14ea096 staging: vt6655: reset tsf on dissociation
Ensuring that tsf counter does not run while idle.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley d855802b8d staging: vt6655: don't update bUpdateBBVGA when off channel
Check flag conf IEEE80211_CONF_OFFCHANNEL so that RSSI doesn't swing wildly
on scanning.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley f218f40d48 staging: vt6655: vnt_rx_data: uCurrRSSI should have the value of *rssi
Fixes issue of byBBVGANew is wrong in device_intr

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley 9aa5bedaa0 staging: vt6655: fifo & frag control remove big endian values
Endian conversion now happens at run time only little endian
values are valid.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley a9c049b86d staging: vt6655: baseband.c timers replace spin lock
Use spin_lock_irqsave and spin_unlock_irqrestore

in functions TimerSQ3CallBack and TimerState1CallBack

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley 10d6f1b743 staging: vt6655: device_init_registers replace spin lock
Use 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-10-29 13:31:31 -07:00
Malcolm Priestley f038ad0e72 staging: vt6655: s_vGenerateTxParameter remove unused cbMACHdLen
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley 837a38f71b staging: vt6655: baseband.c replace BIT0 with BIT(0)
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley b0a08a8a73 staging: vt6655: MACvSetDefaultKeyEntry replace WLAN_WEP104_KEYLEN
with WLAN_KEY_LEN_WEP40

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley e24c235b5d staging: vt6655: mac80211 conversion: PSbIsNextTBTTWakeUp convert to mac80211
Wake up to listen to next beacon when struct ieee80211_conf -> listen_interval == 1

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:31 -07:00
Malcolm Priestley b4bdf94d7d staging: vt6655: vt6655_probe remove management pointers
All these pointers are now dead.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 7e5d88d89b staging: vt6655: mac80211 conversion: device_error remove legacy functions
Remove netif_stop_queue, bCmdRunning and timer functions

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 64fea6e455 staging: vt6655: phy type same as bb type
To maintain functionality

typedef enum _CARD_PHY_TYPE should have the same values as
typedef enum _VIA_PKT_TYPE

TODO both these types need merging.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 1f7a081abf staging: vt6655: switch driver over to mac80211
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 14e5300631 staging: vt6655: mac80211 conversion: device_free_info
Remove net device code and add mac80211 unregister code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 1d6d3c1a62 staging: vt6655: mac80211 conversion: device_init_registers remove legacy code
Remove pMgmt, byCurrentCh, VNTWIFIbConfigPhyMode, eEncryptionStatus and netif_stop_queue.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 3fbbb75f55 staging: vt6655: CARDbSetPhyParameter replace s_vSetRSPINF with CARDvSetRSPINF
Removing s_vSetRSPINF

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley c01ef29e38 staging: vt6655: mac80211 conversion: card.c use basic_rates
Use basic_rates to find cck and ofdm rates.

wBasicRate will be removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley 0614a0e84d staging: vt6655: mac80211 conversion: changes to CARDbSetPhyParameter
CARDbSetPhyParameter appears to use two different strutures to find supported
rates.

Remove PWLAN_IE_SUPP_RATES and use basic_rates to find rates supported.

mac80211 now sets bShortSlotTime, bBarkerPreambleMd and byPreambleType remove
these.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley e99d357c6f staging: vt6655: mac80211 conversion: enable power saving
Convert PSvEnablePowerSaving and PSvEnablePowerSaving

Remove mgmt->wCurrAID and use pDevice->current_aid

We nolonger send the PSbSendNullPacket.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:30 -07:00
Malcolm Priestley b956374239 staging: vt6655: mac80211 conversion: changes to set channel
Remove call to sChannelTbl, the channel under mac80211 is always valid.

CARDbSetPhyParameter is nolonger set here.

RFbSetPower is now set on byBBType

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:29 -07:00
Malcolm Priestley 59918beada staging: vt6655: mac80211 conversion: device_tx_srv tx and add report rates
vnt_int_report_rate reports backs tx rate and is replacment for STAvUpdateTDStatCounter
and BSSvUpdateNodeTxCounter.

Replacing existing code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:29 -07:00
Malcolm Priestley e70abceb05 staging: vt6655: mac80211 conversion: changes to device_intr
Remove net device code.

Remove current measure code and function s_vCompleteCurrentMeasure
and switch code which are now handled by mac80211

Change beaconing to mac80211.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:29 -07:00
Malcolm Priestley bc5d431c9b staging: vt6655: mac80211 conversion: device_print_info remove netdevice.
use dev_info for device name and pcid->irq for irq number.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:29 -07:00
Malcolm Priestley 000fe0f534 staging: vt6655: mac80211 conversion replace suspend resume functions
add vt6655_suspend and vt6655_resume

remove viawget_suspend and viawget_resume.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:29 -07:00
Malcolm Priestley 3d75b9e235 staging: vt6655: mac80211 conversion add channel bands
Add rates and channels according to rf type for vnt_init_bands which is a
mac80211 replacement for init_channel_table.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:31:29 -07:00
Malcolm Priestley 67013f2c0e staging: vt6655: mac80211 conversion add main mac80211 functions
Replace existing vt6655_probe with one converted to mac80211
with the following operations

vnt_tx_80211
vnt_start
vnt_stop
vnt_add_interface
vnt_remove_interface
vnt_config
vnt_bss_info_changed
vnt_prepare_multicast
vnt_configure
vnt_set_key
vnt_get_tsf
vnt_set_tsf
vnt_reset_tsf

The following variables are also added.
basic_rates
mc_list_count
mac_hw

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 13:30:55 -07:00
Malcolm Priestley 89cf9be6e6 staging: vt6655: mac80211 conversion: s_uFillDataHead add power saving poll
Replace variable wCurrentRate with is_pspoll.

add current_aid to structure vnt_private which is to be used by
mac80211 operations.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Malcolm Priestley 7c0496d191 staging: vt6655: mac80211 conversion: s_vFillRTSHead convert to using struct ieee80211_hdr
Removing PSEthernetHeader

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Malcolm Priestley 9c71cb3209 staging: vt6655: dead code remove s_vFillFragParameter.
s_vFillFragParameter is nolonger used.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Malcolm Priestley cfd9f0d6b1 staging: vt6655: mac80211 conversion: s_cbFillTxBufHead
Covert to handle mac80211 sk_buff data removing fragmentation processing
via s_vFillFragParameter and calls to vGenerateMACHeader and s_vSWencryption

fragmentation is now handled by mac80211.

There is still more todos with this function when legacy net device code
have been remove from driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Malcolm Priestley 01eec153ab staging: vt6655: mac8021 conversion: add new tx functions
vnt_fill_txkey a mac80211 repacement for s_vFillTxKey

vnt_generate_fifo_header mac80211 replacement for vGenerateFIFOHeader

vnt_beacon_make for making and despatching beacon.

vnt_beacon_enable to enabling beacon

struct vnt_tx_fifo_head is also added to replace typedef
struct tagSTxBufHead that will be removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Malcolm Priestley fee7506a12 staging: vt6655: mac80211 conversion: add new key functions
vnt_key_init_table to initialize the table

vnt_set_keys to set the keys

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Malcolm Priestley 33b1c8c13f staging: vt6655: mac80211 conversion: add new rx functions
vnt_receive_frame which replaces device_receive_frame

and vnt_rx_data which handles mac80211 rx data

structures ieee80211_hw, ieee80211_vif and variable rx_rate are added
in structure vnt_private

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 11:35:51 -07:00
Nicky Chorley 79bffc5344 Staging: vt6655: Remove C99 comments
This patch fixes the following errors identified by
checkpatch.pl:

ERROR: do not use C99 // comments
36: FILE: card.h:36:
//

ERROR: do not use C99 // comments
37: FILE: card.h:37:
// Loopback mode

ERROR: do not use C99 // comments
38: FILE: card.h:38:
//

ERROR: do not use C99 // comments
39: FILE: card.h:39:
// LOBYTE is MAC LB mode, HIBYTE is MII LB mode

ERROR: do not use C99 // comments
41: FILE: card.h:41:
#define CARD_LB_MAC             MAKEWORD(MAC_LB_INTERNAL, 0)   // PHY must ISO, avoid MAC loopback packet go out

ERROR: do not use C99 // comments
44: FILE: card.h:44:
#define DEFAULT_MSDU_LIFETIME           512  // ms

ERROR: do not use C99 // comments
45: FILE: card.h:45:
#define DEFAULT_MSDU_LIFETIME_RES_64us  8000 // 64us

ERROR: do not use C99 // comments
47: FILE: card.h:47:
#define DEFAULT_MGN_LIFETIME            8    // ms

ERROR: do not use C99 // comments
48: FILE: card.h:48:
#define DEFAULT_MGN_LIFETIME_RES_64us   125  // 64us

ERROR: do not use C99 // comments
175: FILE: card.h:175:
#endif // __CARD_H__

Signed-off-by: Nicky Chorley <ndchorley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:20:17 +08:00
Rasmus Villemoes c42645a2c5 staging: vt6655: Remove redundant cast
Both sides have type const struct iw_handler_def*, so the cast is
unnecessary and confusing.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 17:19:38 +08:00
Veronika Kabatova 1e06c3a492 staging: vt6655: iwctl.c: Comments fixes
Replace C99 "//" comments by "/* */", remove comments about
adding code, remove commented code (one left there for
debugging of the function)

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:11:14 +08:00
Veronika Kabatova af969c8457 staging: vt6655: iocmd.h: Replace C99 // comments by /* */
Replace C99 "//" comments by "/* */"

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:11:14 +08:00
Veronika Kabatova fab2f89359 staging: vt6655: iowpa.h: Replace C99 // comments by /* */
Replace C99 "//" comments by "/* */"

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:11:14 +08:00
Veronika Kabatova bd2ac90116 staging: vt6655: ioctl.h: Replace C99 // comment by /* */
Replace C99 "//" comment by "/* */"

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:11:14 +08:00
Veronika Kabatova d8e340de7d staging: vt6655: IEEE11h.h: Replace C99 // comment by /* */
Replace C99 "//" comment by "/* */"

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:11:14 +08:00
Veronika Kabatova c834e7656b staging: vt6655: channel.c: Comments fixes
Replace C99 "//" comments by "/* */", remove not needed
comments about adding code

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:11:14 +08:00
Veronika Kabatova 29425feb5c staging: vt6655: bssdb.h: Replace C99 // comments by /* */
Replace C99 "//" comments by "/* */"

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:11:13 +08:00
Veronika Kabatova b69c0bfd92 staging: vt6655: desc.h: Comments fixes
Replace C99 "//" comments by "/* */", remove blank
commented lines

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:09:34 +08:00
Veronika Kabatova 1d39fe040b staging: vt6655: dpc.c: Comment fixes
Replace C99 "//" comments by "/* */", remove not
needed comments about adding code

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:09:34 +08:00
Veronika Kabatova 99b4a7e0a2 staging: vt6655: dpc.h: Replace C99 // comment by /* */
Replace C99 "//" comment by "/* */"

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:09:34 +08:00
Veronika Kabatova 77b6a6a3f5 staging: vt6655: card.c: Comments fixes
Replace C99 "//" comments by "/* */", remove not needed
comments (year of adding code, commented code)

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:09:28 +08:00
Veronika Kabatova 81a4e959f2 staging: vt6655: device.h: Comments fixes
Replace C99 "//" comments by "/* */", remove not
needed comments (year of adding code, commented code)

Signed-off-by: Veronika Kabatova <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 16:09:28 +08:00
Jiayi Ye 1d06bb4e9d staging: remove unneeded parentheses around the right hand side of an assignment
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses
are not needed. The Coccinelle semantic patch was used to find cases.

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Sarah Khan 861374fcf3 staging: vt6655: Replace C99 // comments by /* */
Replaced C99 // comments by /* */ in wroute.c

Signed-off-by: Sarah Khan <sarahjmi07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:05 +08:00
Aya Mahfouz 0a98586890 staging: vt6655: wcmd.c: fix print priority warning
This patch fixes the following warning generated by checkpatch.pl
for the file wcmd.c

WARNING: printk() should include KERN_ facility level

printk was replaced by netdev_err since providing printk with the
facility level KERN_ERR generated the printing priority warning.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 08:22:53 +08:00
Aya Mahfouz 2359b5c2d9 staging: vt6655: replace memcpy() by ether_addr_copy() using coccinelle and pack variables
This patch focuses on fixing the following warning generated
by checkpatch.pl for the file rxtx.c :

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

The changes were applied using the following coccinelle rule:

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

After applying the rule, some referencing operations were
adjusted manually to avoid a gcc compilation warning.

According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.
A check was made on the following datastructures:

        - vnt_mic_hdr
        - tagS802_11Header
        - tagSEthernetHeader
        - vnt_rts_g
        - ieee80211_rts
        - vnt_private

To maintain that the array abyCurrentNetAddr in vnt_private is aligned,
it was placed before the boolean bLinkPass in the struct definition.
The definition can be found in device.h. A couple of variables were
packed in holes detected by pahole.

Output of pahole when running it on rxtx.o after the changes:

truct tagSEthernetHeader {
        unsigned char          abyDstAddr[6];        /* 0     6 */
        unsigned char          abySrcAddr[6];        /* 6     6 */
        short unsigned int     wType;                /* 12    2 */

        /* size: 14, cachelines: 1, members: 3 */
        /* last cacheline: 14 bytes */
};
struct tagS802_11Header {
        short unsigned int     wFrameCtl;            /* 0     2 */
        short unsigned int     wDurationID;          /* 2     2 */
        unsigned char          abyAddr1[6];          /* 4     6 */
        unsigned char          abyAddr2[6];          /* 10    6 */
        unsigned char          abyAddr3[6];          /* 16    6 */
        short unsigned int     wSeqCtl;              /* 22    2 */
        unsigned char          abyAddr4[6];          /* 24    6 */

        /* size: 30, cachelines: 1, members: 7 */
        /* last cacheline: 30 bytes */
};
struct ieee80211_rts {
        __le16                 frame_control;        /* 0     2 */
        __le16                 duration;             /* 2     2 */
        u8                     ra[6];                /* 4     6 */
        u8                     ta[6];                /* 10    6 */

        /* size: 16, cachelines: 1, members: 4 */
        /* last cacheline: 16 bytes */
};
struct vnt_private {
        struct pci_dev *       pcid;                 /* 0     4 */
        struct net_device *    dev;                  /* 4     4 */
        dma_addr_t             pool_dma;             /* 8     4 */
        dma_addr_t             rd0_pool_dma;         /* 12    4 */
        dma_addr_t             rd1_pool_dma;         /* 16    4 */
        dma_addr_t             td0_pool_dma;         /* 20    4 */
        dma_addr_t             td1_pool_dma;         /* 24    4 */
        dma_addr_t             tx_bufs_dma0;         /* 28    4 */
        dma_addr_t             tx_bufs_dma1;         /* 32    4 */
        dma_addr_t             tx_beacon_dma;        /* 36    4 */
        unsigned char *        tx0_bufs;             /* 40    4 */
        unsigned char *        tx1_bufs;             /* 44    4 */
        unsigned char *        tx_beacon_bufs;       /* 48    4 */
        CHIP_TYPE              chip_id;              /* 52    4 */
        void *                 PortOffset;           /* 56    4 */
        long unsigned int      dwIsr;                /* 60    4 */
        /*--- cacheline 1 boundary (64 bytes) ---*/
        u32                    memaddr;              /* 64    4 */
        u32                    ioaddr;               /* 68    4 */
        u32                    io_size;              /* 72    4 */
        unsigned char          byRevId;              /* 76    1 */
        unsigned char          byRxMode;             /* 77    1 */
        short unsigned int     SubSystemID;          /* 78    2 */
        short unsigned int     SubVendorID;          /* 80    2 */
        spinlock_t             lock;                 /* 82    2 */
        int                    nTxQueues;            /* 84    4 */
        volatile int           iTDUsed;              /* 88    8 */
        volatile PSTxDesc      apCurrTD;             /* 96    8 */
        volatile PSTxDesc      apTailTD;             /* 104   8 */
        volatile PSTxDesc      apTD0Rings;           /* 112   4 */
        volatile PSTxDesc      apTD1Rings;           /* 116   4 */
        volatile PSRxDesc      aRD0Ring;             /* 120   4 */
        volatile PSRxDesc      aRD1Ring;             /* 124   4 */
        /*--- cacheline 2 boundary (128 bytes) ---*/
        volatile PSRxDesc      pCurrRD;              /* 128   8 */
        SCache                 sDupRxCache;          /* 136  44 */
        SDeFragControlBlock    sRxDFCB[64];          /* 180  2048 */
        /*--- cacheline 34 boundary (2176 bytes) was 52 bytes ago ---*/
        unsigned int           cbDFCB;               /* 2228  4 */
        unsigned int           cbFreeDFCB;           /* 2232  4 */
        unsigned int           uCurrentDFCBIdx;      /* 2236  4 */
        /*--- cacheline 35 boundary (2240 bytes) ---*/
        OPTIONS                sOpts;                /* 2240 52 */
        u32                    flags;                /* 2292  4 */
        u32                    rx_buf_sz;            /* 2296  4 */
        int                    multicast_limit;      /* 2300  4 */
        /*--- cacheline 36 boundary (2304 bytes) ---*/
        pid_t                  MLMEThr_pid;          /* 2304  4 */
        struct completion      notify;               /* 2308 16 */
        struct semaphore       mlme_semaphore;       /* 2324 16 */
        u32                    rx_bytes;             /* 2340  4 */
        unsigned char          byLocalID;            /* 2344  1 */
        unsigned char          byRFType;             /* 2345  1 */
        unsigned char          byMaxPwrLevel;        /* 2346  1 */
        unsigned char          byZoneType;           /* 2347  1 */
        bool                   bZoneRegExist;        /* 2348  1 */
        unsigned char          byOriginalZonetype;   /* 2349  1 */
        unsigned char          abyMacContext[384];   /* 2350  384 */
        /*--- cacheline 42 boundary (2688 bytes) was 46 bytes ago ---*/
        unsigned char          abyCurrentNetAddr[6]; /* 2734  6 */
        bool                   bLinkPass;            /* 2740  1 */

        /* XXX 3 bytes hole, try to pack */

        SStatCounter           scStatistic;          /* 2744  776 */
        /*--- cacheline 55 boundary (3520 bytes) ---*/
        SDot11Counters         s802_11Counter;       /* 3520  172 */
        /*--- cacheline 57 boundary (3648 bytes) was 44 bytes ago ---*/
        PSMgmtObject           pMgmt;                /* 3692  4 */
        SMgmtObject            sMgmtObj;             /* 3696 95840 */
        /*--- cacheline 1555 boundary (99520 bytes) was 16 bytes ago ---*/

        /* Bitfield combined with previous fields */

        unsigned int           uCurrRSSI;            /* 0    4 */
        unsigned char          byCurrSQ;             /* 0    1 */
        long unsigned int      dwTxAntennaSel;       /* 0    4 */
        long unsigned int      dwRxAntennaSel;       /* 0    4 */
        unsigned char          byAntennaCount;       /* 0    1 */
        unsigned char          byRxAntennaMode;      /* 0    1 */
        unsigned char          byTxAntennaMode;      /* 0    1 */
        bool                   bTxRxAntInv;          /* 0    1 */
        unsigned char *        pbyTmpBuff;           /* 0    4 */
        unsigned int           uSIFS;                /* 0    4 */
        unsigned int           uDIFS;                /* 0    4 */
        unsigned int           uEIFS;                /* 0    4 */
        unsigned int           uSlot;                /* 0    4 */
        unsigned int           uCwMin;               /* 0    4 */
        unsigned int           uCwMax;               /* 0    4 */
        unsigned char          bySIFS;               /* 0    1 */
        unsigned char          byDIFS;               /* 0    1 */
        unsigned char          byEIFS;               /* 0    1 */
        unsigned char          bySlot;               /* 0    1 */
        unsigned char          byCWMaxMin;           /* 0    1 */
        CARD_PHY_TYPE          eCurrentPHYType;      /* 0    4 */
        VIA_BB_TYPE            byBBType;             /* 0    4 */
        VIA_PKT_TYPE           byPacketType;         /* 0    4 */
        short unsigned int     wBasicRate;           /* 0    2 */
        unsigned char          byACKRate;            /* 0    1 */
        unsigned char          byTopOFDMBasicRate;   /* 0    1 */
        unsigned char          byTopCCKBasicRate;    /* 0    1 */
        unsigned char          byMinChannel;         /* 0    1 */
        unsigned char          byMaxChannel;         /* 0    1 */
        unsigned int           uConnectionRate;      /* 0    4 */
        unsigned char          byPreambleType;       /* 0    1 */
        unsigned char          byShortPreamble;      /* 0    1 */
        short unsigned int     wCurrentRate;         /* 0    2 */
        short unsigned int     wRTSThreshold;        /* 0    2 */
        short unsigned int     wFragmentationThreshold; /* 0    2 */
        unsigned char          byShortRetryLimit;    /* 0    1 */
        unsigned char          byLongRetryLimit;     /* 0    1 */
        enum nl80211_iftype    op_mode;              /* 0    4 */
        unsigned char          byOpMode;             /* 0    1 */
        bool                   bBSSIDFilter;         /* 0    1 */
        short unsigned int     wMaxTransmitMSDULifetime; /* 0     2 */
        unsigned char          abyBSSID[6];          /* 0    6 */
        unsigned char          abyDesireBSSID[6];    /* 0    6 */
        short unsigned int     wACKDuration;         /* 0    2 */
        short unsigned int     wRTSTransmitLen;      /* 0    2 */
        unsigned char          byRTSServiceField;    /* 0    1 */
        unsigned char          byRTSSignalField;     /* 0    1 */
        long unsigned int      dwMaxReceiveLifetime; /* 0    4 */
        bool                   bEncryptionEnable;    /* 0    1 */
        bool                   bLongHeader;          /* 0    1 */
        bool                   bShortSlotTime;       /* 0    1 */
        bool                   bProtectMode;         /* 0    1 */
        bool                   bNonERPPresent;       /* 0    1 */
        bool                   bBarkerPreambleMd;    /* 0    1 */
        unsigned char          byERPFlag;            /* 0    1 */
        short unsigned int     wUseProtectCntDown;   /* 0    2 */
        bool                   bRadioControlOff;     /* 0    1 */
        bool                   bRadioOff;            /* 0    1 */
        bool                   bEnablePSMode;        /* 0    1 */
        short unsigned int     wListenInterval;      /* 0    2 */
        bool                   bPWBitOn;             /* 0    1 */
        WMAC_POWER_MODE        ePSMode;              /* 0    4 */
        unsigned char          byRadioCtl;           /* 0    1 */
        unsigned char          byGPIO;               /* 0    1 */
        bool                   bHWRadioOff;          /* 0    1 */
        bool                   bPrvActive4RadioOFF;  /* 0    1 */
        bool                   bGPIOBlockRead;       /* 0    1 */
        short unsigned int     wSeqCounter;          /* 0    2 */
        short unsigned int     wBCNBufLen;           /* 0    2 */
        bool                   bBeaconBufReady;      /* 0    1 */
        bool                   bBeaconSent;          /* 0    1 */
        bool                   bIsBeaconBufReadySet; /* 0    1 */
        unsigned int           cbBeaconBufReadySetCnt; /* 0     4 */
        bool                   bFixRate;             /* 0    1 */
        unsigned char          byCurrentCh;          /* 0    1 */
        unsigned int           uScanTime;            /* 0    4 */
        CMD_STATE              eCommandState;        /* 0    4 */
        CMD_CODE               eCommand;             /* 0    4 */
        bool                   bBeaconTx;            /* 0    1 */
        bool                   bStopBeacon;          /* 0    1 */
        bool                   bStopDataPkt;         /* 0    1 */
        bool                   bStopTx0Pkt;          /* 0    1 */
        unsigned int           uAutoReConnectTime;   /* 0    4 */
        CMD_ITEM               eCmdQueue[32];        /* 0  1408 */
        unsigned int           uCmdDequeueIdx;       /* 0    4 */
        unsigned int           uCmdEnqueueIdx;       /* 0    4 */
        unsigned int           cbFreeCmdQueue;       /* 0    4 */
        bool                   bCmdRunning;          /* 0    1 */
        bool                   bCmdClear;            /* 0    1 */
        bool                   bRoaming;             /* 0    1 */
        unsigned char          abyIPAddr[4];         /* 0    4 */
        long unsigned int      ulTxPower;            /* 0    4 */
        NDIS_802_11_WEP_STATUS eEncryptionStatus;    /* 0    4 */
        bool                   bTransmitKey;         /* 0    1 */
        NDIS_802_11_WEP_STATUS eOldEncryptionStatus; /* 0    4 */
        SKeyManagement         sKey;                 /* 0  3784 */
        long unsigned int      dwIVCounter;          /* 0    4 */
        u64                    qwPacketNumber;       /* 0    8 */
        unsigned int           uCurrentWEPMode;      /* 0    4 */
        RC4Ext                 SBox;                 /* 0  264 */
        unsigned char          abyPRNG[35];          /* 0   35 */
        unsigned char          byKeyIndex;           /* 0    1 */
        unsigned int           uKeyLength;           /* 0    4 */
        unsigned char          abyKey[29];           /* 0   29 */
        bool                   bAES;                 /* 0    1 */
        unsigned char          byCntMeasure;         /* 0    1 */
        unsigned int           uAssocCount;          /* 0    4 */
        bool                   bMoreData;            /* 0    1 */
        bool                   bGrpAckPolicy;        /* 0    1 */
        bool                   bAssocInfoSet;        /* 0    1 */
        unsigned char          byAutoFBCtrl;         /* 0    1 */
        bool                   bTxMICFail;           /* 0    1 */
        bool                   bRxMICFail;           /* 0    1 */
        unsigned int           uRATEIdx;             /* 0    4 */
        bool                   bUpdateBBVGA;         /* 0    1 */
        unsigned int           uBBVGADiffCount;      /* 0    4 */
        unsigned char          byBBVGANew;           /* 0    1 */
        unsigned char          byBBVGACurrent;       /* 0    1 */
        unsigned char          abyBBVGA[4];          /* 0    4 */
        long int               ldBmThreshold[4];     /* 0   16 */
        unsigned char          byBBPreEDRSSI;        /* 0    1 */
        unsigned char          byBBPreEDIndex;       /* 0    1 */
        bool                   bRadioCmd;            /* 0    1 */
        long unsigned int      dwDiagRefCount;       /* 0    4 */
        unsigned char          byFOETuning;          /* 0    1 */
        unsigned char          byAutoPwrTunning;     /* 0    1 */
        short int              sPSetPointCCK;        /* 0    2 */
        short int              sPSetPointOFDMG;      /* 0    2 */
        short int              sPSetPointOFDMA;      /* 0    2 */
        long int               lPFormulaOffset;      /* 0    4 */
        short int              sPThreshold;          /* 0    2 */
        char                   cAdjustStep;          /* 0    1 */
        char                   cMinTxAGC;            /* 0    1 */
        unsigned char          byCCKPwr;             /* 0    1 */
        unsigned char          byOFDMPwrG;           /* 0    1 */
        unsigned char          byCurPwr;             /* 0    1 */
        char                   byCurPwrdBm;          /* 0    1 */
        unsigned char          abyCCKPwrTbl[15];     /* 0   15 */
        unsigned char          abyOFDMPwrTbl[57];    /* 0   57 */
        char                   abyCCKDefaultPwr[15]; /* 0   15 */
        char                   abyOFDMDefaultPwr[57]; /* 0  57 */
        char                   abyRegPwr[57];        /* 0   57 */
        char                   abyLocalPwr[57];      /* 0   57 */
        unsigned char          byBBCR4d;             /* 0    1 */
        unsigned char          byBBCRc9;             /* 0    1 */
        unsigned char          byBBCR88;             /* 0    1 */
        unsigned char          byBBCR09;             /* 0    1 */
        struct timer_list      sTimerCommand;        /* 0   52 */
        struct timer_list      sTimerTxData;         /* 0   52 */
        long unsigned int      nTxDataTimeCout;      /* 0    4 */
        bool                   fTxDataInSleep;       /* 0    1 */
        bool                   IsTxDataTrigger;      /* 0    1 */
        bool                   fWPA_Authened;        /* 0    1 */
        unsigned char          byReAssocCount;       /* 0    1 */
        unsigned char          byLinkWaitCount;      /* 0    1 */
        unsigned char          abyNodeName[17];      /* 0   17 */
        bool                   bDiversityRegCtlON;   /* 0    1 */
        bool                   bDiversityEnable;     /* 0    1 */
        long unsigned int      ulDiversityNValue;    /* 0    4 */
        long unsigned int      ulDiversityMValue;    /* 0    4 */
        unsigned char          byTMax;               /* 0    1 */
        unsigned char          byTMax2;              /* 0    1 */
        unsigned char          byTMax3;              /* 0    1 */
        long unsigned int      ulSQ3TH;              /* 0    4 */
        long unsigned int      uDiversityCnt;        /* 0    4 */
        unsigned char          byAntennaState;       /* 0    1 */
        long unsigned int      ulRatio_State0;       /* 0    4 */
        long unsigned int      ulRatio_State1;       /* 0    4 */
        struct timer_list      TimerSQ3Tmax1;        /* 0   52 */
        struct timer_list      TimerSQ3Tmax2;        /* 0   52 */
        struct timer_list      TimerSQ3Tmax3;        /* 0   52 */
        long unsigned int      uNumSQ3[12];          /* 0   48 */
        short unsigned int     wAntDiversityMaxRate; /* 0    2 */
        SEthernetHeader        sTxEthHeader;         /* 0   14 */
        SEthernetHeader        sRxEthHeader;         /* 0   14 */
        unsigned char          abyBroadcastAddr[6];  /* 0    6 */
        unsigned char          abySNAP_RFC1042[6];   /* 0    6 */
        unsigned char          abySNAP_Bridgetunnel[6]; /* 0     6 */
        unsigned char          abyEEPROM[256];       /* 0   256 */
        SPMKID                 gsPMKID;              /* 0   360 */
        SPMKIDCandidateEvent   gsPMKIDCandidate;     /* 0    72 */
        bool                   b11hEnable;           /* 0     1 */
        unsigned char          abyCountryCode[3];    /* 0     3 */
        unsigned int           uNumOfMeasureEIDs;    /* 0     4 */
        PWLAN_IE_MEASURE_REQ   pCurrMeasureEID;      /* 0     4 */
        bool                   bMeasureInProgress;   /* 0     1 */
        unsigned char          byOrgChannel;         /* 0     1 */
        unsigned char          byOrgRCR;             /* 0     1 */
        long unsigned int      dwOrgMAR0;            /* 0     4 */
        long unsigned int      dwOrgMAR4;            /* 0     4 */
        unsigned char          byBasicMap;           /* 0     1 */
        unsigned char          byCCAFraction;        /* 0     1 */
        unsigned char          abyRPIs[8];           /* 0     8 */
        long unsigned int      dwRPIs[8];            /* 0    32 */
        bool                   bChannelSwitch;       /* 0     1 */
        unsigned char          byNewChannel;         /* 0     1 */
        unsigned char          byChannelSwitchCount; /* 0     1 */
        bool                   bQuietEnable;         /* 0     1 */
        bool                   bEnableFirstQuiet;    /* 0     1 */
        unsigned char          byQuietStartCount;    /* 0     1 */
        unsigned int           uQuietEnqueue;        /* 0     4 */
        long unsigned int      dwCurrentQuietEndTime; /* 0     4 */
        SQuietControl          sQuiet[8];            /* 0    96 */
        bool                   bCountryInfo5G;       /* 0     1 */
        bool                   bCountryInfo24G;      /* 0     1 */
        short unsigned int     wBeaconInterval;      /* 0     2 */
        struct net_device *    wpadev;               /* 0     4 */
        bool                   bWPADEVUp;            /* 0     1 */
        struct sk_buff *       skb;                  /* 0     4 */
        unsigned int           bwextcount;           /* 0     4 */
        bool                   bWPASuppWextEnabled;  /* 0     1 */
        bool                   bEnableHostapd;       /* 0     1 */
        bool                   bEnable8021x;         /* 0     1 */
        bool                   bEnableHostWEP;       /* 0     1 */
        struct net_device *    apdev;                /* 0     4 */
        int                    (*tx_80211)(struct sk_buff *,
                                 struct net_device *); /* 0     4 */
        unsigned int           uChannel;             /* 0     4 */
        bool                   bMACSuspend;          /* 0     1 */
        struct iw_statistics   wstats;               /* 0    32 */
        bool                   bCommit;              /* 0     1 */
        /*--- cacheline 1672 boundary (107008 bytes) ---*/

        /* size: 107008, cachelines: 1672, members: 279 */
        /* sum members: 107005, holes: 1, sum holes: 3 */
        /* padding: 41471 */

        /* BRAIN FART ALERT! 107008 != 107005 + 3(holes), diff = 0 */

};
struct vnt_mic_hdr {
        u8                     id;                   /* 0     1 */
        u8                     tx_priority;          /* 1     1 */
        u8                     mic_addr2[6];         /* 2     6 */
        u8                     ccmp_pn[6];           /* 8     6 */
        __be16                 payload_len;          /* 14    2 */
        __be16                 hlen;                 /* 16    2 */
        __le16                 frame_control;        /* 18    2 */
        u8                     addr1[6];             /* 20    6 */
        u8                     addr2[6];             /* 26    6 */
        u8                     addr3[6];             /* 32    6 */
        __le16                 seq_ctrl;             /* 38    2 */
        u8                     addr4[6];             /* 40    6 */
        u16                    packing;              /* 46    2 */

        /* size: 48, cachelines: 1, members: 13 */
        /* last cacheline: 48 bytes */
};
struct vnt_rts_g {
        struct vnt_phy_field   b;                    /*  0    4 */
        struct vnt_phy_field   a;                    /*  4    4 */
        __le16                 duration_ba;          /*  8    2 */
        __le16                 duration_aa;          /* 10    2 */
        __le16                 duration_bb;          /* 12    2 */
        u16                    reserved;             /* 14    2 */
        struct ieee80211_rts   data;                 /* 16   16 */

        /* size: 32, cachelines: 1, members: 7 */
        /* last cacheline: 32 bytes */
};

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:15 +08:00
Aya Mahfouz 85061eb97a staging: vt6655: wmgr.c and wmgr.h: replace memcpy() by ether_addr_copy() using coccinelle and pack variable
This patch focuses on fixing the following warning generated
by checkpatch.pl for the file wmgr.c :

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

The changes were applied using the following coccinelle rule:

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.

To maintain that the array abyCurrBSSID in tagSMgmtObject is aligned,
it was placed after the int uCurrChannel in the struct definition.
This was done in wmgr.h

Here is the output of pahole for the relevant datastructures:

struct sockaddr {
        sa_family_t                sa_family;            /*     0     2 */
        char                       sa_data[14];          /*     2    14 */

        /* size: 16, cachelines: 1, members: 2 */
        /* last cacheline: 16 bytes */
};
struct tagSMgmtObject {
        void *                     pAdapter;             /*     0     4 */
        unsigned char              abyMACAddr[6];        /*     4     6 */

        /* XXX 2 bytes hole, try to pack */

        WMAC_CONFIG_MODE           eConfigMode;          /*    12     4 */
        CARD_PHY_TYPE              eCurrentPHYMode;      /*    16     4 */
        CARD_PHY_TYPE              eConfigPHYMode;       /*    20     4 */
        WMAC_CURRENT_MODE          eCurrMode;            /*    24     4 */
        WMAC_BSS_STATE             eCurrState;           /*    28     4 */
        PKnownBSS                  pCurrBSS;             /*    32     4 */
        unsigned char              byCSSGK;              /*    36     1 */
        unsigned char              byCSSPK;              /*    37     1 */

        /* XXX 2 bytes hole, try to pack */

        unsigned int               uCurrChannel;         /*    40     4 */
        unsigned char              abyCurrBSSID[6];      /*    44     6 */
        unsigned char              abyCurrSuppRates[19]; /*    50    19 */
        /* --- cacheline 1 boundary (64 bytes) was 5 bytes ago --- */
        unsigned char              abyCurrExtSuppRates[19]; /*    69    19 */
        unsigned char              abyCurrSSID[35];      /*    88    35 */

        /* XXX 1 byte hole, try to pack */

        short unsigned int         wCurrCapInfo;         /*   124     2 */
        short unsigned int         wCurrAID;             /*   126     2 */
        /* --- cacheline 2 boundary (128 bytes) --- */
        short unsigned int         wCurrATIMWindow;      /*   128     2 */
        short unsigned int         wCurrBeaconPeriod;    /*   130     2 */
        bool                       bIsDS;                /*   132     1 */
        unsigned char              byERPContext;         /*   133     1 */

        /* XXX 2 bytes hole, try to pack */

        CMD_STATE                  eCommandState;        /*   136     4 */
        unsigned int               uScanChannel;         /*   140     4 */
        unsigned char              abyDesireSSID[35];    /*   144    35 */
        unsigned char              abyDesireBSSID[6];    /*   179     6 */

        /* XXX 1 byte hole, try to pack */

        short unsigned int         wIBSSBeaconPeriod;    /*   186     2 */
        short unsigned int         wIBSSATIMWindow;      /*   188     2 */

        /* XXX 2 bytes hole, try to pack */

        /* --- cacheline 3 boundary (192 bytes) --- */
        unsigned int               uIBSSChannel;         /*   192     4 */
        unsigned char              abyIBSSSuppRates[19]; /*   196    19 */
        unsigned char              byAPBBType;           /*   215     1 */
        unsigned char              abyWPAIE[64];         /*   216    64 */
        /* --- cacheline 4 boundary (256 bytes) was 24 bytes ago --- */
        short unsigned int         wWPAIELen;            /*   280     2 */

        /* XXX 2 bytes hole, try to pack */

        unsigned int               uAssocCount;          /*   284     4 */
        bool                       bMoreData;            /*   288     1 */

        /* XXX 3 bytes hole, try to pack */

        WMAC_SCAN_STATE            eScanState;           /*   292     4 */
        WMAC_SCAN_TYPE             eScanType;            /*   296     4 */
        unsigned int               uScanStartCh;         /*   300     4 */
        unsigned int               uScanEndCh;           /*   304     4 */
        short unsigned int         wScanSteps;           /*   308     2 */

        /* XXX 2 bytes hole, try to pack */

        unsigned int               uScanBSSType;         /*   312     4 */
        unsigned char              abyScanSSID[35];      /*   316    35 */
        /* --- cacheline 5 boundary (320 bytes) was 31 bytes ago --- */
        unsigned char              abyScanBSSID[6];      /*   351     6 */

        /* XXX 3 bytes hole, try to pack */

        WMAC_AUTHENTICATION_MODE   eAuthenMode;          /*   360     4 */
        WMAC_ENCRYPTION_MODE       eEncryptionMode;      /*   364     4 */
        bool                       bShareKeyAlgorithm;   /*   368     1 */
        unsigned char              abyChallenge[128];    /*   369   128 */
        /* --- cacheline 7 boundary (448 bytes) was 49 bytes ago --- */
        bool                       bPrivacyInvoked;      /*   497     1 */
        bool                       bInTIM;               /*   498     1 */
        bool                       bMulticastTIM;        /*   499     1 */
        unsigned char              byDTIMCount;          /*   500     1 */
        unsigned char              byDTIMPeriod;         /*   501     1 */

        /* XXX 2 bytes hole, try to pack */

        WMAC_POWER_MODE            ePSMode;              /*   504     4 */
        short unsigned int         wListenInterval;      /*   508     2 */
        short unsigned int         wCountToWakeUp;       /*   510     2 */
        /* --- cacheline 8 boundary (512 bytes) --- */
        bool                       bInTIMWake;           /*   512     1 */

        /* XXX 3 bytes hole, try to pack */

        unsigned char *            pbyPSPacketPool;      /*   516     4 */
        unsigned char              byPSPacketPool[36];   /*   520    36 */
        bool                       bRxBeaconInTBTTWake;  /*   556     1 */
        unsigned char              abyPSTxMap[65];       /*   557    65 */

        /* XXX 2 bytes hole, try to pack */

        /* --- cacheline 9 boundary (576 bytes) was 48 bytes ago --- */
        unsigned int               uCmdBusy;             /*   624     4 */
        unsigned int               uCmdHostAPBusy;       /*   628     4 */
        unsigned char *            pbyMgmtPacketPool;    /*   632     4 */
        unsigned char              byMgmtPacketPool[2352]; /*   636  2352 */
        /* --- cacheline 46 boundary (2944 bytes) was 44 bytes ago --- */
        struct timer_list          sTimerSecondCallback; /*  2988    52 */
        /* --- cacheline 47 boundary (3008 bytes) was 32 bytes ago --- */
        SRxMgmtPacket              sRxPacket;            /*  3040    28 */
        KnownBSS                   sBSSList[42];         /*  3068 57288 */
        /* --- cacheline 943 boundary (60352 bytes) was 4 bytes ago --- */
        KnownNodeDB                sNodeDBTable[65];     /* 60356 20800 */
        /* --- cacheline 1268 boundary (81152 bytes) was 4 bytes ago --- */

        /* Bitfield combined with previous fields */

        SPMKIDCache                gsPMKIDCache;         /*     0   356 */
        bool                       bRoaming;             /*     0     1 */
        SAssocInfo                 sAssocInfo;           /*     0  7064 */
        bool                       b11hEnable;           /*     0     1 */
        bool                       bSwitchChannel;       /*     0     1 */
        unsigned char              byNewChannel;         /*     0     1 */
        PWLAN_IE_MEASURE_REP       pCurrMeasureEIDRep;   /*     0     4 */
        unsigned int               uLengthOfRepEIDs;     /*     0     4 */
        unsigned char              abyCurrentMSRReq[2352]; /*     0  2352 */
        unsigned char              abyCurrentMSRRep[2352]; /*     0  2352 */
        unsigned char              abyIECountry[2340];   /*     0  2340 */
        unsigned char              abyIBSSDFSOwner[6];   /*     0     6 */
        unsigned char              byIBSSDFSRecovery;    /*     0     1 */
        struct sk_buff             skb;                  /*     0   192 */

        /* XXX last struct has 4 bytes of padding */

        /* --- cacheline 1497 boundary (95808 bytes) was 32 bytes ago --- */

        /* size: 95840, cachelines: 1498, members: 81 */
        /* sum members: 95813, holes: 13, sum holes: 27 */
        /* padding: 30112 */
        /* paddings: 1, sum paddings: 4 */
        /* last cacheline: 32 bytes */

        /* BRAIN FART ALERT! 95840 != 95813 + 27(holes), diff = 0 */

};
struct pmkid_candidate {
        NDIS_802_11_MAC_ADDRESS    BSSID;                /*     0     6 */

        /* XXX 2 bytes hole, try to pack */

        long unsigned int          Flags;                /*     8     4 */

        /* size: 12, cachelines: 1, members: 2 */
        /* sum members: 10, holes: 1, sum holes: 2 */
        /* last cacheline: 12 bytes */
};

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:15 +08:00
Aya Mahfouz 87bb326ead staging: vt6655: dpc.c: replace memcpy() by ether_addr_copy() using coccinelle
This patch focuses on fixing the following warning generated
by checkpatch.pl for the file dpc.c :

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

The changes were applied using the following coccinelle rule:

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.

Here is the output of pahole for the relevant datastructures:

struct tagS802_11Header {
        short unsigned int         wFrameCtl;            /*     0     2 */
        short unsigned int         wDurationID;          /*     2     2 */
        unsigned char              abyAddr1[6];          /*     4     6 */
        unsigned char              abyAddr2[6];          /*    10     6 */
        unsigned char              abyAddr3[6];          /*    16     6 */
        short unsigned int         wSeqCtl;              /*    22     2 */
        unsigned char              abyAddr4[6];          /*    24     6 */

        /* size: 30, cachelines: 1, members: 7 */
        /* last cacheline: 30 bytes */
};
struct iw_michaelmicfailure {
        __u32                      flags;                /*     0     4 */
        struct sockaddr            src_addr;             /*     4    16 */
        __u8                       tsc[8];               /*    20     8 */

        /* size: 28, cachelines: 1, members: 3 */
        /* last cacheline: 28 bytes */
};
struct sockaddr {
        sa_family_t                sa_family;            /*     0     2 */
        char                       sa_data[14];          /*     2    14 */

        /* size: 16, cachelines: 1, members: 2 */
        /* last cacheline: 16 bytes */
};

There is one thing to note though, sa_data is a char array of size 14.
And the number of bytes copied using memcpy() or ether_addr_copy()
is 6.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:15 +08:00
Aya Mahfouz e1499e8149 staging: vt6655: card.c: replace memcpy() by ether_addr_copy() using coccinelle
This patch focuses on fixing the following warning generated
by checkpatch.pl for the file rxtx.c :

Prefer ether_addr_copy() over memcpy() if the Ethernet addresses
are __aligned(2)

The changes were applied using the following coccinelle rule:

@@ expression e1, e2; @@

- memcpy(e1, e2, ETH_ALEN);
+ ether_addr_copy(e1, e2);

According to ether_addr_copy() description and functionality,
all Ethernet addresses should align to the u16 datatype.

Here is the output of pahole for the relevant datastructures:

struct pmkid_candidate {
        NDIS_802_11_MAC_ADDRESS    BSSID;                /*     0     6 */

        /* XXX 2 bytes hole, try to pack */

        long unsigned int          Flags;                /*     8     4 */

        /* size: 12, cachelines: 1, members: 2 */
        /* sum members: 10, holes: 1, sum holes: 2 */
        /* last cacheline: 12 bytes */
};

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:15 +08:00
Vladimir A. Nazarenko 4a2bc3bdff staging: vt6655: delete SndEvt_ToAPI code
It's never enabled, so we can safely remove it.

Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:13 +08:00
Tapasweni Pathak 586e8b6845 staging: vt6655: Remove unused code inside switch case
This patch removes dead code in private_ioctl function and
iwctl_siwmode function, in file ioctl.c.

Inside switch, for a case no code gets executed
after break.

This was detected by smatch.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:13 +08:00
Vladimir A. Nazarenko 402eede3c0 staging: vt6655: remove useless #if 1
There is code encapsulated in #if 1, let's remove it.

Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:13 +08:00
Vladimir A. Nazarenko 5ba1b07a6e staging: vt6655: remove global variable wpa_Result
This variable unused, so remove it.

Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:13 +08:00
Vladimir A. Nazarenko 5e8dc1cbf7 staging: vt6655: delete non-standard ioctl 0xFF
Custom ioctl 0xff is legacy code that was used for
patched version of wpa_supplicant,  where function
wpa_authen_Status_transfer() called this ioctl  to
tell authentication   status to  the driver. While
from upstream  was added only driver code  to  the
kernel  but  not  patches to the wpa_supplicant we
can safely remove this unused ioctl.

Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:30:13 +08:00
Esra Altintas f3512d5fe8 staging: vt6655: Fixed C99 // comment errors in wpa.h
The following patch fixes the checkpatch.pl warning:
ERROR: do not use C99 // comments

Signed-off-by: Esra Altintas <es.altintas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Dilek Uzulmez 25ef419dc9 staging: vt6655: Use ether_addr_copy function
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file device_main.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:28 +08:00
Dilek Uzulmez 038862c4a3 staging: vt6655: Use ether_addr_copy function
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file iwctl.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:20 +08:00
Dilek Uzulmez 5ab665eb24 staging: vt6655: Use ether_addr_copy function
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file iwctl.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Dilek Uzulmez c5e1150178 staging: vt6655: Use ether_addr_copy function
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file device_main.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Dilek Uzulmez 5de55f6524 staging: vt6655: Use ether_addr_copy function
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file key.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Dilek Uzulmez 0c074871f7 staging: vt6655: Removing else after break statement to fix warning
This patch fixes the checkpatch.pl warning in key.c file
WARNING: else is not useful after a break or return

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Tapasweni Pathak 61d566a5a3 staging: vt6655: Remove unnecessary cast for argument of kfree
This patch removes all occurrences of unnecessary cast on the
argument to kfree, all over in rtl8712.

There is no need of the cast on the argument to kfree.

Greped to find occurrences.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Dilek Uzulmez 14cd1df4ba staging: vt6655: Remove unnecessary else after return
This patch fixes checkpatch.pl warning in files of vt6655
WARNING: else is not generally useful after a break or return

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:15 +08:00
Melike Yurtoglu 3aaa06e1cb staging: vt6655: fix do not use // c99 comments.
This patch fixes "do not use // C99 comments" checkpatch.pl errors in
hostap.h

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:15 +08:00
Melike Yurtoglu b7f0790d73 staging: vt6655: Fixed else after return or break warning.
This patch fixes multiple instances of checkpatch.pl
WARNING : else is not generally useful after a break or return in
device_main.c

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:15 +08:00
Melike Yurtoglu d84e63378b staging: vt6655: Fix do not use // c99 comments.
This patch fixes "do not use // C99 comments" errors in datarate.h

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:15 +08:00
Yeliz Taneroglu 99fdb36ec3 staging: vt6655: Fixed else after return or break warning
The following patch fixes the checkpatch.pl warning:

drivers/staging/vt6655/vntwifi.c warning: else is not generally useful after a break or return

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:15 +08:00
Yeliz Taneroglu ac23fed858 staging: vt6655: Fixed else after return or break warning
The following patch fixes the checkpatch.pl warning:

drivers/staging/vt6655/hostap.c warning: else is not generally useful after a break or return

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:15 +08:00
Esra Altintas dab5aeebdd staging: vt6655: Fixed C99 // comment errors in wpactl.c
The following patch fixes the checkpatch.pl warning:
ERROR: do not use C99 // comments

Signed-off-by: Esra Altintas <es.altintas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 10:11:26 -07:00
Tapasweni Pathak fd7dcd3997 staging: vt6655: Merge three lines into one
This patch merges three lines into one, removing unecessary
if check.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:22:21 -04:00
Gulsah Kose a793b2d817 staging: vt6655: Type conversion was made.
This patch fixes this sparse warning:
drivers/staging/vt6655/device_main.c:385:40: warning: mixing different enum types
drivers/staging/vt6655/device_main.c:385:40:     int enum _VIA_BB_TYPE versus
drivers/staging/vt6655/device_main.c:385:40:     int enum _VIA_PKT_TYPE

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:22:21 -04:00
Aybuke Ozdemir 9e23c1b8c3 Staging: vt6655: Add require space before that '('
This patch fixes checkpatch.pl error in file device_main.c
ERROR: space required before the open parenthesis '('

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:22:21 -04:00
Aybuke Ozdemir 6e61b441ce Staging: vt6655: Add require space after that ','
This patch fixes checkpatch.pl error in file device_main.c
ERROR: space required after that ';' (ctx:VxV)

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:22:21 -04:00
Malcolm Priestley 46fa0ec0fa staging: vt6655: device_get_options remove unused variable devname
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:45:41 -07:00
Malcolm Priestley 42f709eff1 staging: vt6655: pr_err remove string to net device name
Just print driver name with dev_err removing the string formatting.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:45:41 -07:00
Tapasweni Pathak 78fc84848a staging: vt6655: shift open brace '{' to previous line
This patch fixes checkpatch.pl error in baseband.c file
ERROR : that open brace { should be on the previous line

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:41:15 -07:00
Tapasweni Pathak cf329e54b3 staging: vt6655: remove unnecessary else after return
This patch fixes checkpatch.pl warning in aes_ccmp.c file
WARNING : else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:41:15 -07:00
Aybuke Ozdemir fdeef1fe4d Staging: vt6655: Fix C99 style commenting.
This patch fixes these error messages found by checkpatch.pl:
ERROR: do not use C99 // comments

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:40:17 -07:00
Greg Kroah-Hartman d84a2b0d6f Merge 3.17-rc6 into staging-next.
We want the fixes in there, and it resolves a merge issue with
drivers/iio/accel/bma180.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-22 07:30:03 -07:00
Rajbinder Brar 4309635f69 Staging: vt6655: Break 80 character long line to remove checkpatch error
This removes checkpatch.pl warning
WARNING: line over 80 characters

Signed-off-by: Rajbinder Brar <brar.rajbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:01:22 -07:00
Aybuke Ozdemir dbc6ee63d4 Staging: vt6655: Fix C99 style commenting.
This patch fixes these error messages found by checkpatch.pl:
ERROR: do not use C99 // comments

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:01:22 -07:00
Dan Carpenter ed87c2b2e7 staging: vt6655: buffer overflow in ioctl
->u.generic_elem.len is a user controlled number between 0-255.  We
should limit it to avoid memory corruption.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:32:20 -07:00
Tobias Klauser b4a814d4a9 staging: vt6655: Remove unnecessary condition around include
ethtool (and SIOCETHTOOL in particular) is part of Linux since the
pre-git era, it thus makes no sense no sense to make the include of
linux/ethtool.h conditional. Also remove the unused define
DEVICE_ETHTOOL_IOCTL_SUPPORT.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:59:18 -07:00
Tobias Klauser 22981e0e5a staging: vt6655: Use net_device_stats from struct net_device
Instead of using an own copy of struct net_device_stats in struct
vnt_private, use stats from struct net_device. Also remove the thus
unnecessary device_get_stats(), as it would now just return
netdev->stats, which is the default in dev_get_stats().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:59:18 -07:00
Tobias Klauser 46ef6886ac staging: vt6655: Remove unused member from struct vnt_private
The pci_state member of struct vnt_private is used nowhere in the code,
so remove it. Supposedly it was used to save the PCI configuration space
which is now done using pci_save_state().

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:56:51 -07:00
Malcolm Priestley c72f65ccca staging: vt6655: device_free_info() warn: variable dereferenced before check
pDevice is never NULL when this function is called remove the check.

This fixes smatch warning
drivers/staging/vt6655/device_main.c:1023 device_free_info() warn: variable dereferenced
before check 'pDevice' (see line 1021)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@01.org
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08 14:01:17 -07:00
Malcolm Priestley a987367348 staging: vt6655: Replace typedef enum _CARD_OP_MODE eOPMode with enum nl80211_iftype op_mode.
Using the nl80211 header.

Using enum changes
OP_MODE_ADHOC -> NL80211_IFTYPE_ADHOC
OP_MODE_AP ->  NL80211_IFTYPE_AP
OP_MODE_INFRASTRUCTURE -> NL80211_IFTYPE_STATION
OP_MODE_UNKNOWN -> NL80211_IFTYPE_UNSPECIFIED

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:17 -07:00
Malcolm Priestley 96372bd9b4 staging: vt6655: s_uGetRTSCTSDuration always return __le16
This function should always return __le16, move all endian
correction to here.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:17 -07:00
Malcolm Priestley 9332025898 stgaing: vt6655: remove unused variable wCTSDuration
wCTSDuration is always set to 0.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:17 -07:00
Malcolm Priestley db1afd18e9 staging: vt6655: replace typedef struct tagSCTS_FB with struct vnt_cts_fb
Replacing members
b, wDuration_ba,  wReserved, wCTSDuration_ba_f0, wCTSDuration_ba_f1, data and
reserved2.

With
b, duration_ba, reserved, cts_duration_ba_f0, cts_duration_ba_f1, data and
reserved2

unsigned short is replaced with u16 or __le16 where necessary.

cast void pointer to pvCTS

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:17 -07:00
Malcolm Priestley f5172b0edf staging: vt6655: replace typedef struct tagSCTS with struct vnt_cts
Replacing members
b, wDuration_ba, wReserved, data and reserved2
with
b, duration_ba, reserved, data and reserved2

unsigned short is replaced with u16 or __le16 where necessary.

cast void pointer to pvCTS

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 8e44804e73 staging: vt6655: replace typedef struct tagSRTS_a_FB with struct vnt_rts_a_fb
Replacing members
a, wDuration, wReserved, wRTSDuration_f0, wRTSDuration_f1 and data
with
a, duration, reserved, rts_duration_f0, rts_duration_f1 and data

unsigned short is replaced with u16 or __le16 where necessary.

cast void pointer to pvRTS

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley e21eb1c8d1 staging: vt6655: replace typedef struct tagSRTS_ab with struct vnt_rts_ab
Replacing members
ab, wDuration, wReserved and data

with

ab, duration, reserved and data

replacing unsigned short with u16 and __le16 where necessary.

pvRTS is void pointer.

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 9587b09206 staging: vt6655: replace typedef struct tagSRTS_g_FB with struct vnt_rts_g_fb
Replacing members
b, a, wDuration_ba, wDuration_aa, wDuration_bb, wReserved, wRTSDuration_ba_f0,
wRTSDuration_aa_f0, wRTSDuration_ba_f1, wRTSDuration_aa_f1 and data

with

b, a, duration_ba, duration_aa, duration_bb, wReserved, rts_duration_ba_f0,
rts_duration_aa_f0, rts_duration_ba_f1, rts_duration_aa_f1 and data

replacing unsigned short with u16 or __le16 where endian correction is necessary.

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 17434f094a staging: vt6655: replace typedef struct tagSRTS_g with struct vnt_rts_g
Replacing members
b, a, wDuration_ba, wDuration_aa, wDuration_bb, wReserved and data
with
b, a,duration_ba, duration_aa, duration_bb, reserved and  data

replacing unsigned short with u16 or __le16 where endian correction is necessary.

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 0864db15a0 staging: vt6655: Replace typedef struct tagSCTSData with ieee80211_cts data
ieee80211_cts data needs extra padding with reserved2 set to 0

use IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS to set frame_control

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 52c4130bdb staging: vt6655: Replace typedef struct tagSRTSData with ieee80211_rts data
Replacing SRTSData Data with struct ieee80211_rts data

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley a479ffc388 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>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 9c62c7abf8 staging: vt6655: replace -typedef struct tagSTxDataHead_a_FB with struct vnt_tx_datahead_a_fb
Replace members
a, wDuration, wTimeStampOff, wDuration_f0, and wDuration_f1;
with
a, duration, time_stamp_off, duration_f0, duration_f1

All unsigned short members should be  __le16

Creating the new structure in rxtx.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 9ce842ab3f staging: vt6655: replace typedef struct tagSTxDataHead_ab with struct vnt_tx_datahead_ab
Replacing members
ab, wDuration and wTimeStampOff

with
ab, duration and time_stamp_off

All unsigned short should be __le16

Structure is moved to rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 2dd76679cc staging: vt6655: replace typedef struct tagSTxDataHead_g_FB with struct vnt_tx_datahead_g_fb
Replacing members
b, a, wDuration_b, wDuration_a, wDuration_a_f0, wDuration_a_f1, wTimeStampOff_b and wTimeStampOff_a
with
b, a, duration_b, duration_a, duration_a_f0, duration_a_f1, time_stamp_off_b and time_stamp_off_a

All unsigned short need to be __le16 type.

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley 72edb7ed1f staging: vt6655: replace typedef struct tagSTxDataHead_g with struct vnt_tx_datahead_g
Replace members
b, a, wDuration_b, wDuration_a, wTimeStampOff_b and wTimeStampOff_a
with
b, a, duration_b, duration_a, time_stamp_off_b and time_stamp_off_a

Using __le16 endian type for unsigned short.

Creating the new structure in rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley d6b95c0659 staging: vt6655: rxtx.c create function to return __le16 wTimeStampOff
wTimeStampOff always needs to be endian corrected.

Create vnt_time_stamp_off to return this value.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:16 -07:00
Malcolm Priestley c00a378bff staging: vt6655: s_vGenerateTxParameter removed nested pvRrvTime NULL check
Just do single NULL check on pvRrvTime and return.

If pvRrvTime is NULL none of the if statements are valid.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:15 -07:00
Malcolm Priestley 853532d3b5 staging: vt6655: rxtx change s_uGetRTSCTSRsvTime to always return __le16
s_uGetRTSCTSRsvTime always needs to return little endian __le16

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:15 -07:00
Malcolm Priestley e7a3481b7b staging: vt6655: create vnt_rxtx_rsvtime_le16 to return s_uGetTxRsvTime endian corrected.
Replace s_uGetTxRsvTime where endian correction is needed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:15 -07:00
Malcolm Priestley f6a634c3d2 staging: vt6655: rxtx replace typedef struct tagSRrvTime_ab with struct vnt_rrv_time_ab
Replacing members
wRTSTxRrvTime and wTxRrvTime
with
rts_rrv_time and rrv_time

using __le16 type

Moving structure to rxtx.h

pvRrvTime is a void pointer

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:15 -07:00
Malcolm Priestley d66a5a7464 staging: vt6655: rxtx replace typedef struct tagSRrvTime_gCTS with struct vnt_rrv_time_cts
replacing members
wCTSTxRrvTime_ba, wReserved, wTxRrvTime_b and wTxRrvTime_a
with
cts_rrv_time_ba, reserved, rrv_time_b and rrv_time_a;

Creating the new structure in rxtx.h and Using __le16 where necessary

pvRrvTime is a void pointer

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:15 -07:00
Malcolm Priestley a9e6a2dcd3 staging: vt6655: rxtx replace typedef struct tagSRrvTime_gRTS with struct vnt_rrv_time_rts
Replacing members
wRTSTxRrvTime_ba, wRTSTxRrvTime_aa,  wRTSTxRrvTime_bb, wReserved, wTxRrvTime_b and wTxRrvTime_a
with
rts_rrv_time_ba, rts_rrv_time_aa, rts_rrv_time_bb, reserved, rrv_time_b and rrv_time_a

Creating the new structure in rxtx.h and Using __le16 where necessary

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 15:19:15 -07:00
Malcolm Priestley 9641723591 staging: vt6655: rxtx create new structure vnt_tx_short_buf_head for csBeacon_xmit
This is a merger of PSTxDataHead_ab and PSTxShortBufHead of which typedef struct tagSTxShortBufHead
is removed.

This is formed as fifo_ctl, time_stamp, struct vnt_phy_field, duration and time_stamp_off.

Replacing stuctures in csBeacon_xmit and doing endian correction where necessary.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:50:10 -07:00
Malcolm Priestley 09a903b51b staging: vt6655: rxtx.h structure vnt_mic_hdr add IEEE80211_CCMP_PN_LEN macro
ccmp_pn is the size of IEEE80211_CCMP_PN_LEN (6)

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:50:10 -07:00
Malcolm Priestley 20b33b1944 staging: vt6655: 80211mgr.h add ieee80211.h header and fix conflicts
Fix conflict with WLAN_EID macros, by removing them.

This allows the adding other definitions from the ieee80211 header.

Eventually the 80211mgr.h header will be removed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:50:09 -07:00
Malcolm Priestley 43e79c0fb3 staging: vt6655: dead code remove device_nics variable
The module can not load more than once.

Remove device_nics, MAX_UINTS and OPTION_DEFAULT

Remove dead index variable from device_get_options

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:49:34 -07:00
Malcolm Priestley 33cfce64e7 staging: vt6655: remove multiple instances of netdevice.
netdevice can only be created once.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:49:34 -07:00
Malcolm Priestley 70afb8e503 staging: vt6655: remove multiple instances of driver loading.
The driver can only load once from the instance provided
by pci_dev.

struct vnt_private next, prev and pDevice_Infos are removed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:49:34 -07:00
Malcolm Priestley c28f3253f2 staging: vt6655: Remove BBvCalculateParameter and its data members
Remove data members bySignalField*, byServiceField*, wTransmitLength*
from structures in desc.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:48:19 -07:00
Malcolm Priestley 864a5a37aa staging: vt6655: card.c change BBvCalculateParameter to vnt_get_phy_field
Using vnt_get_phy_field means the values are not in the
correct write order the lower word and the upper word need
to be swapped over for an u32 write out.

Rather create another data variable to manipulate this structure.
Create a new union vnt_phy_field_swap with struct vnt_phy_field,
the u16 word swap and the u32 write out.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:48:19 -07:00
Malcolm Priestley 429a247495 staging: vt6655: rxtx.c change BBvCalculateParameter to function vnt_get_phy_field
Removing wLen and pointing to correct member.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:48:19 -07:00
Malcolm Priestley 10c174455a staging: vt6655: baseband add new function vnt_get_phy_field
This is a replacement for BBvCalculateParameter for getting
the phy fields via struct vnt_phy_field

This is a direct copy from the vt6656 driver.

BBvCalculateParameter will removed later.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:48:19 -07:00
Malcolm Priestley edbae997a8 staging: vt6655: add new stucture struct vnt_phy_field for rts/cts/data structures
This will replace bySignalField*, byServiceField* and wTransmitLength_b
members of these strutures, these are removed in the last patch.

The len member is of little endian type.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:48:19 -07:00
Malcolm Priestley 5154b0d0e2 staging: vt6655: device.h dead code remove bCCK
bCCK is always set to true, the only place it is used is in
BBvCalculateParameter which nots the value to false.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:48:19 -07:00
Malcolm Priestley 9e9df6704c staging: vt6655: remove remaining comments of PLICE_DEBUG
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:47:31 -07:00
Malcolm Priestley af925cc721 staging: vt6655: vntwifi.c remove unused directive PLICE_DEBUG
PLICE_DEBUG is not defined remove dead code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:47:31 -07:00
Malcolm Priestley 281a19d21b staging: vt6655: remove PLICE_DEBUG where it is defined
Remove macro and directive leaving the code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:47:31 -07:00
Malcolm Priestley 97fe1ad03c staging: vt6655: main_usb.c remove undefined PLICE_DEBUG code.
PLICE_DEBUG is not defined in any header for this file.

Remove code, references and directives.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:47:31 -07:00
Malcolm Priestley b39d60c1de staging: vt6655: Use ether_crc in kernel.
ether_crc is already in kernel remove local code and
include linux/crc32.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:47:31 -07:00
Joe Perches 48caf5a060 staging: vt6655: Convert DBG_PRT to pr_<level>
DBG_PRT uses are unnecessarily complex.

Convert DBG_PRT msglevel to pr_<level>.
This changes the KERN_<level> type of several uses.
It also enables dynamic_debug for the pr_debug conversions.

This patch can be a prelude to converting these pr_<level>
uses to dev_<level> as appropriate.

Other changes:

Realign arguments of these conversions.
Remove now unused static int msglevel declarations.
Remove now unused DBG_PRT #define.

Compile tested only.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17 09:43:50 -07:00
Malcolm Priestley 80f598ae8a staging: vt6655: remove typedef from struct vnt_private
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 1bd6375760 staging: vt6655: device_main Replace DEVICE_INFO with size of pointer
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 6af4336e64 staging: vt6655: rf/wpactl/wroute use struct vnt_private
Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 8f335dd136 staging: vt6655: hostap/ioctl/iwctl use struct vnt_private
Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley cf76dc4b85 staging: vt6655: bssdb/datarate/dpc/power/rxtx use struct vnt_private
Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 0ffc58742d staging: vt6655: channel/wcmd/wctl/wmgr use struct vnt_private *
Replacing PSDevice.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley d052270b43 staging: vt6655: card change PSDevice to struct vnt_private
Repacing void *pDeviceHandler

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 582d6c220b staging: vt6655: baseband replace PSDevice
Coverting all functions to struct vnt_private.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:16 -07:00
Malcolm Priestley 3f8597f4e4 staging: vt6655: device.h use change __device_info to vnt_private
Coverting all functions to struct vnt_private in device.h and device_main.c

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 965d017f49 staging: vt6655: upc.h replace read and write memory functions
Update to the newer memory functions
readb -> ioread8
readw -> ioread16
readl -> ioread32
writeb -> iowrite8
writew -> iowrite16
writel -> iowrite32

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 3e66a2aadd staging: vt6655: upc.h: Remove unused macros
PCBv* are not used

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 4a5f718409 staging: vt6655: CARDbSetBeaconPeriod call CARDbGetCurrentTSF to get TBTT
There is already a function to get next TBTT.

Replace code with CARDqGetNextTBTT.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 989ae8601b staging: vt6655: CARDqGetNextTBTT calculate qwTSF using do_div
Use do_div to compute equation as shown replacing existing code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 0fc2a76eef staging: vt6655: Replace and remove typedef QWORD/ DQWORD
Replace the variables with u64/__le64.

The endian variant is needed in some places endian correction is
needed.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley c98323a7da staging: vt6655: BSSvSecondTxData remove #if 1 else directive
There is a code alignment error after this directive realign
code

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley f2af99ee5b staging: vt6655: Remove TxInSleep macro
TxInSleep is always enabled remove the macro and any
else code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Malcolm Priestley 11a72e5e11 staging: vt6655: rxtx: Replace typedef struct tagSMICHDRHead
With struct vnt_mic_hdr replacing pointer assigments in
s_vFillTxKey.

The size of new struture is the same as old with packing

Create the struture rxtx.h where it is only used.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Martin Berglund effda6973d staging: vt6655: wpactl.c: Fix sparse warnings
Add missing __user macro casting in the function wpa_set_keys.
This is okay since the function handles the possibility of
param->u.wpa_key.key and param->u.wpa_key.seq pointing to
kernelspace using a flag, fcpfkernel.

Signed-off-by: Martin Berglund <martin@rogsta.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:15 -07:00
Martin Berglund 2eb61f3882 staging: vt6655: iowpa.h: Fix sparse warnings
This resolves a sparse address space warning in wpactl.c

Signed-off-by: Martin Berglund <martin@rogsta.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:05 -07:00
Joe Perches 8b983be54b staging: use pci_zalloc_consistent
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:30 -07:00
Linus Torvalds ae045e2455 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
 "Highlights:

   1) Steady transitioning of the BPF instructure to a generic spot so
      all kernel subsystems can make use of it, from Alexei Starovoitov.

   2) SFC driver supports busy polling, from Alexandre Rames.

   3) Take advantage of hash table in UDP multicast delivery, from David
      Held.

   4) Lighten locking, in particular by getting rid of the LRU lists, in
      inet frag handling.  From Florian Westphal.

   5) Add support for various RFC6458 control messages in SCTP, from
      Geir Ola Vaagland.

   6) Allow to filter bridge forwarding database dumps by device, from
      Jamal Hadi Salim.

   7) virtio-net also now supports busy polling, from Jason Wang.

   8) Some low level optimization tweaks in pktgen from Jesper Dangaard
      Brouer.

   9) Add support for ipv6 address generation modes, so that userland
      can have some input into the process.  From Jiri Pirko.

  10) Consolidate common TCP connection request code in ipv4 and ipv6,
      from Octavian Purdila.

  11) New ARP packet logger in netfilter, from Pablo Neira Ayuso.

  12) Generic resizable RCU hash table, with intial users in netlink and
      nftables.  From Thomas Graf.

  13) Maintain a name assignment type so that userspace can see where a
      network device name came from (enumerated by kernel, assigned
      explicitly by userspace, etc.) From Tom Gundersen.

  14) Automatic flow label generation on transmit in ipv6, from Tom
      Herbert.

  15) New packet timestamping facilities from Willem de Bruijn, meant to
      assist in measuring latencies going into/out-of the packet
      scheduler, latency from TCP data transmission to ACK, etc"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1536 commits)
  cxgb4 : Disable recursive mailbox commands when enabling vi
  net: reduce USB network driver config options.
  tg3: Modify tg3_tso_bug() to handle multiple TX rings
  amd-xgbe: Perform phy connect/disconnect at dev open/stop
  amd-xgbe: Use dma_set_mask_and_coherent to set DMA mask
  net: sun4i-emac: fix memory leak on bad packet
  sctp: fix possible seqlock seadlock in sctp_packet_transmit()
  Revert "net: phy: Set the driver when registering an MDIO bus device"
  cxgb4vf: Turn off SGE RX/TX Callback Timers and interrupts in PCI shutdown routine
  team: Simplify return path of team_newlink
  bridge: Update outdated comment on promiscuous mode
  net-timestamp: ACK timestamp for bytestreams
  net-timestamp: TCP timestamping
  net-timestamp: SCHED timestamp on entering packet scheduler
  net-timestamp: add key to disambiguate concurrent datagrams
  net-timestamp: move timestamp flags out of sk_flags
  net-timestamp: extend SCM_TIMESTAMPING ancillary data struct
  cxgb4i : Move stray CPL definitions to cxgb4 driver
  tcp: reduce spurious retransmits due to transient SACK reneging
  qlcnic: Initialize dcbnl_ops before register_netdev
  ...
2014-08-06 09:38:14 -07:00
Linus Torvalds 53ee983378 Staging driver patches for 3.17-rc1
Here's the big pull request for the staging driver tree for 3.17-rc1.
 
 Lots of things in here, over 2000 patches, but the best part is this:
  1480 files changed, 39070 insertions(+), 254659 deletions(-)
 
 Thanks to the great work of Kristina Martšenko, 14 different staging
 drivers have been removed from the tree as they were obsolete and no one
 was willing to work on cleaning them up.  Other than the driver
 removals, loads of cleanups are in here (comedi, lustre, etc.) as well
 as the usual IIO driver updates and additions.
 
 All of this has been in the linux-next tree for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlPf1wYACgkQMUfUDdst+ykrNwCgswPkRSAPQ3C8WvLhzUYRZZ/L
 AqEAoJP0Q8Fz8unXjlSMcx7pgcqUaJ8G
 =mrTQ
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big pull request for the staging driver tree for 3.17-rc1.

  Lots of things in here, over 2000 patches, but the best part is this:
   1480 files changed, 39070 insertions(+), 254659 deletions(-)

  Thanks to the great work of Kristina Martšenko, 14 different staging
  drivers have been removed from the tree as they were obsolete and no
  one was willing to work on cleaning them up.  Other than the driver
  removals, loads of cleanups are in here (comedi, lustre, etc.) as well
  as the usual IIO driver updates and additions.

  All of this has been in the linux-next tree for a while"

* tag 'staging-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (2199 commits)
  staging: comedi: addi_apci_1564: remove diagnostic interrupt support code
  staging: comedi: addi_apci_1564: add subdevice to check diagnostic status
  staging: wlan-ng: coding style problem fix
  staging: wlan-ng: fixing coding style problems
  staging: comedi: ii_pci20kc: request and ioremap memory
  staging: lustre: bitwise vs logical typo
  staging: dgnc: Remove unneeded dgnc_trace.c and dgnc_trace.h
  staging: dgnc: rephrase comment
  staging: comedi: ni_tio: remove some dead code
  staging: rtl8723au: Fix static symbol sparse warning
  staging: rtl8723au: usb_dvobj_init(): Remove unused variable 'pdev_desc'
  staging: rtl8723au: Do not duplicate kernel provided USB macros
  staging: rtl8723au: Remove never set struct pwrctrl_priv.bHWPowerdown
  staging: rtl8723au: Remove two never set variables
  staging: rtl8723au: RSSI_test is never set
  staging:r8190: coding style: Fixed checkpatch reported Error
  staging:r8180: coding style: Fixed too long lines
  staging:r8180: coding style: Fixed commenting style
  staging: lustre: ptlrpc: lproc_ptlrpc.c - fix dereferenceing user space buffer
  staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer
  ...
2014-08-04 18:36:12 -07:00
Malcolm Priestley 3500a1da81 staging: vt6655: clean up the tail of function device_init_registers
Aligning the code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:08:20 -07:00
Malcolm Priestley 9f34de35d5 staging: vt6655: remove typedef enum __device_init_type
The value is either DEVICE_INIT_COLD or DEVICE_INIT_DXPL making no
difference to code.

Remove typedef and remove if statement in device_init_registers
pulling the code in.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:08:20 -07:00
Malcolm Priestley fbf515b815 staging: vt6655: dead code remove undefined macro IO_MAP
This device is always memory mapped

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:07:32 -07:00
Malcolm Priestley 33c1576ea1 staging: vt6655: dead code remove undefined macro FOR_LED_ON_NOTEBOOK code.
Removing all variables associated with the code.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:07:32 -07:00
Malcolm Priestley 9a802f2edc staging: vt6655: deadcode remove undefined macro THREAD code.
Removing _RxManagementQueue, InitRxManagementQueue, MlmeThread, mlme_kill,
EnQueue and DeQueue.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:07:32 -07:00
Malcolm Priestley 795d644c0a staging: vt6655: remove undefined TASK_LET code
Removing all code within and function MngWorkItem.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:07:32 -07:00
Rahul Garg e8cdd70aff staging: vt6655: coding style: Fixed commenting style
fix coding style: use C89 comments, not C99

Signed-off-by: Rahul Garg <rahul.lnmiit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:36:27 -07:00
Guillaume Clement 53cbe20d02 staging: vt6655: fix direct dereferencing of user pointer
Sparse reported that the data from tagSCmdRequest is given by
userspace, so it should be tagged as such.

Later, we were memcomparing and dereferencing it without first copying
it, fix that as well.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:36:27 -07:00
Igor Bezukh f56f473a3c Staging: vt6655: removed redundant comments from power.h
Removed redundant comments from power.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:38:42 -07:00
Igor Bezukh 6c324e518b Staging: vt6655: removed redundant comments from michael.h
Removed redundant comments from michael.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:38:42 -07:00
Igor Bezukh b218c00830 Staging: vt6655: removed redundant comments from mib.h
Removed redundant comments from mib.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:38:42 -07:00
Igor Bezukh 2cb9fa5151 Staging: vt6655: removed redundant comments from iowpa.h
Removed redundant comments from iowpa.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:35:55 -07:00
Igor Bezukh efcd24445d Staging: vt6655: removed redundant comments from ioctl.h
Removed redundant comments from ioctl.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:34:38 -07:00
Igor Bezukh d681012df5 Staging: vt6655: removed redundant comments from iocmd.h
Removed redundant comments from iocmd.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:34:38 -07:00
Igor Bezukh e5851cf64e Staging: vt6655: removed redundant comments from IEEE11h.h
Removed redundant comments from IEEE11h.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:34:38 -07:00
Igor Bezukh 2c62064105 Staging: vt6655: removed redundant comments from hostap.h
Removed redundant comments from hostap.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:34:38 -07:00
Igor Bezukh 1d2a404edb Staging: vt6655: removed redundant comments from dpc.h
Removed redundant comments from dpc.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:34:38 -07:00