Commit graph

798 commits

Author SHA1 Message Date
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
Igor Bezukh aee4821c26 Staging: vt6655: removed redundant comments from device_cfg.h
Removed redundant comments from device_cfg.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:08 -07:00
Igor Bezukh 795a8f9aa5 Staging: vt6655: removed redundant comments from desc.h
Removed redundant comments from desc.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
C99 style comments will be fixed in further patches.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:34:08 -07:00
Igor Bezukh 85a97db4fa Staging: vt6655: removed redundant comments from channel.h
Removed redundant comments from channel.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:33:08 -07:00
Igor Bezukh 17db00af8e Staging: vt6655: removed redundant comments from country.h
Removed redundant comments from country.h header file

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:33:08 -07:00
Igor Bezukh 846a7f69ba Staging: vt6655: removed redundant comments from datarate.h
Removed redundant comments from datarate.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:33:07 -07:00
Igor Bezukh 7745bd6828 Staging: vt6655: remove redundant comments from card.h
Removed redundant comments from card.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:31:59 -07:00
Guillaume Clement 70ae543b32 staging: vt6655: Remove NULL pointer sparse warning
We were using 0 instead of NULL to initialize a pointer, which caused
a sparse warning.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement 1ce87e2409 staging: vt6655: remove unused macro
The MAC_MAX_CONTEXT_SIZE macro was not enclosed into parenthesis,
which might have caused hard to debug errors, and caused a sparse
warning.

Since it is unused, we might as well remove it.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement 049a8afbaa staging: vt6655: fix braces at newline in if statements
Braces should not be in a separate line for multi-line if
statements. This fixes warnings reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement cba60905f1 staging: vt6655: remove braces for single statements if
This fixes several "braces {} are not necessary for single statement
blocks" checkpatch warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement fa13849f58 staging: vt6655: add missing whitespace
Some whitespace were missing, causing checkpatch warnings and altering
readability.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement cef27eae2f staging: vt6655: Remove unreachable break statements
This fixes break "break is not useful after a goto or return"
checkpatch warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement a1613423cd staging: vt6655: break single line if statements
This fixes the "trailing statements should be on next line" checkpatch
warning.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement 941ead9adf staging: vt6655: Use pr_* functions instead of printk
Lots of printk are used in vt6655, replace them with the pr_*
equivalent.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:28 -07:00
Guillaume Clement 5f742c7b98 staging: vt6655: fix static position in inline function
This should be "static inline", not "inline static". Reported by
checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement b69ee55b4c staging: vt6655: fix braces at newline for structs
For structs definitions, the braces should be at the end of the
line. Reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement 84b5076207 staging: vt6655: fix function braces not on the proper line
Function braces should be on a separate line. Reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement bfd7a28190 staging: vt6655: Remove spaces before quoted newlines
This fixes several spaces added just before a newline in debug
strings, reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement 6b7112719f staging: vt6655: Add missing blank lines after declarations
This patch fixes the missing blank lines after declarations in vt6655
reported by checkpatch.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Guillaume Clement fe802546ce staging: vt6655: remove useless return statements
Many return statements in void function were present at the end of
functions, with no effect. They now are removed.

This fixes a bunch of checkpatch warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:21:27 -07:00
Malcolm Priestley 4aa0abed3a staging: vt6655: Fix disassociated messages every 10 seconds
byReAssocCount is incremented every second resulting in
disassociated message being send every 10 seconds whether
connection or not.

byReAssocCount should only advance while eCommandState
is in WLAN_ASSOCIATE_WAIT

Change existing scope to if condition.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:10:42 -07:00
Malcolm Priestley 6cff1f6ad4 staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0()
irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts

Using spin_lock_irqsave appears to fix this.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:10:42 -07:00
Igor Bezukh d83ba4a1f3 Staging: vt6655: remove redundant comments from bssdb.h
Removed redundant comments from bssdb.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:09:21 -07:00
Igor Bezukh b9334c9f9a Staging: vt6655: remove redundant comments from baseband.h
Removed redundant comments in baseband.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:09:20 -07:00
Igor Bezukh 7a43ba4221 Staging: vt6655: remove redundant comments from 80211hdr.h
Removed redundant comments from 80211hdr.h header file

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:04:13 -07:00
Igor Bezukh 221cf98ca2 Staging: vt6655: Removed redundant comments and newlines
Removed redundant comments and newlines from 80211mgr.h header file.

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:04:13 -07:00
Igor Bezukh 5a0232aeb1 Staging: vt6655: removed redundant comments from aes_ccmp.h
Removed redundant comments from aes_ccmp.h header file

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:04:13 -07:00
Guillaume Clement 8e3bec324e staging: vt6655: Fix unused function warning
Sparse reports that MimeThread is not used. Actually, it can be used
if THREAD is defined. By enclosing the MimeThread function into the
same #ifdef as the caller of MimeThread, this fixes the sparse
warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:03:13 -07:00
Guillaume Clement 2b3f41c723 staging: vt6655: remove unused functions
The IEEE11hbMgrRxAction is not exported and never used. Deleting it
allows to delete other functions that were only used by
IEEE11hbMgrRxAction.

This allows to fix several warnings reported by sparse.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:03:13 -07:00
Guillaume Clement 9e4c5c2837 staging: vt6655: statify some variables
Some variables are used only in the context of their .c file, which
gives warnings with sparse.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:03:13 -07:00
Guillaume Clement e7a3cd595a staging: vt6655:fix warning for unexported non-static functions
There is one function in aes_ccmp.c which is exported, but sparse sees
it unexported because it doesn't include the header that exports it.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:02:08 -07:00
Guillaume Clement 1683440595 staging: vt6655: change type of PortOffset to void __iomem *
PortOffset was an unsigned long, but used as an pointer to io
memory. Sometimes it was not properly cast before use, which caused
many warning by sparse.

By updating its type to void __iomem *, and reflecting the changes
where it is needed, this removes most of those warnings.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 15:02:08 -07:00
Petar Dimitrijevic 7354a17509 staging: vt6655: Fixed checkpatch errors
This patch fixes the errors report by the checkpatch script.
Most of them are use of C99 comments.

The checkpatch doesn't report any errors after the clean up.
However, please not that there are still ton of warnings left.

Signed-off-by: Petar Dimitrijevic <petar.dimitrijevic@vorteksed.com.mk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 14:18:45 -07:00
Igor Bezukh 4025ef18c8 Staging: vt6655: Remove redundant comments in wcmd.h
Removed redundant comments in the header file wcmd.h

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 14:18:45 -07:00
Igor Bezukh f9dc1a8a70 Staging: vt6655: fix missing blank line after variable declaration
Checkpatch fix - Add missing blank line after variable declaration

Signed-off-by: Igor Bezukh <igbzkh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16 13:30:32 -07:00
Tom Gundersen c835a67733 net: set name_assign_type in alloc_netdev()
Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
all users to pass NET_NAME_UNKNOWN.

Coccinelle patch:

@@
expression sizeof_priv, name, setup, txqs, rxqs, count;
@@

(
-alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
+alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
|
-alloc_netdev_mq(sizeof_priv, name, setup, count)
+alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
|
-alloc_netdev(sizeof_priv, name, setup)
+alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
)

v9: move comments here from the wrong commit

Signed-off-by: Tom Gundersen <teg@jklm.no>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-15 16:12:48 -07:00
Anton Protopopov 83e771fc88 staging: vt6655: fixed sparse warnings
This commit fixes a few sparse warnings for missing the 'static' keyword
in array definitions:
    drivers/staging//vt6655/rxtx.c:81:22: warning: symbol 'wTimeStampOff' was not declared. Should it be static?
    drivers/staging//vt6655/rxtx.c:86:22: warning: symbol 'wFB_Opt0' was not declared. Should it be static?
    drivers/staging//vt6655/rxtx.c:90:22: warning: symbol 'wFB_Opt1' was not declared. Should it be static?

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08 16:03:57 -07:00
James A Shackleford 94540a1ea2 staging: vt6655: remove header declarations for static functions
The functions iwctl_giwscan() and iwctl_siwscan() are only referenced
within iwctl.c -- so, remove their function declarations from iwctl.h
and mark these functions as static.

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:21:51 -04:00
Merlin Chlosta 5c3ddb3a4c staging: vt6655: coding style: use C89 comments
fix coding style: use C89 comments, not C99

Signed-off-by: Merlin Chlosta <eudyptula@merlin.geekmail.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:37:43 -07:00
Martin Kepplinger ff87dbc906 staging: vt6655: remove unnecessary typedef struct.
Remove a totally unnecessary typedef and rename it to lowercase.
This is more readable now.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:37:01 -07:00
James A Shackleford 15974dce2e staging: vt6655: replace C99 style comments
Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:36:12 -07:00
James A Shackleford 14257463f7 staging: vt6655: fix sparse warning for static declarations
This patch fixes the following sparse warnings:

iwctl.c:76:22: warning: symbol 'iwctl_get_wireless_stats' was not declared. Should it be static?
iwctl.c:118:5: warning: symbol 'iwctl_giwname' was not declared. Should it be static?
iwctl.c:131:5: warning: symbol 'iwctl_siwscan' was not declared. Should it be static?
iwctl.c:192:5: warning: symbol 'iwctl_giwscan' was not declared. Should it be static?
iwctl.c:344:5: warning: symbol 'iwctl_siwfreq' was not declared. Should it be static?
iwctl.c:390:5: warning: symbol 'iwctl_giwfreq' was not declared. Should it be static?
iwctl.c:420:5: warning: symbol 'iwctl_siwmode' was not declared. Should it be static?
iwctl.c:486:5: warning: symbol 'iwctl_giwmode' was not declared. Should it be static?
iwctl.c:520:5: warning: symbol 'iwctl_giwrange' was not declared. Should it be static?
iwctl.c:626:5: warning: symbol 'iwctl_siwap' was not declared. Should it be static?
iwctl.c:684:5: warning: symbol 'iwctl_giwap' was not declared. Should it be static?
iwctl.c:711:5: warning: symbol 'iwctl_giwaplist' was not declared. Should it be static?
iwctl.c:784:5: warning: symbol 'iwctl_siwessid' was not declared. Should it be static?
iwctl.c:893:5: warning: symbol 'iwctl_giwessid' was not declared. Should it be static?
iwctl.c:923:5: warning: symbol 'iwctl_siwrate' was not declared. Should it be static?
iwctl.c:1004:5: warning: symbol 'iwctl_giwrate' was not declared. Should it be static?
iwctl.c:1049:5: warning: symbol 'iwctl_siwrts' was not declared. Should it be static?
iwctl.c:1077:5: warning: symbol 'iwctl_giwrts' was not declared. Should it be static?
iwctl.c:1096:5: warning: symbol 'iwctl_siwfrag' was not declared. Should it be static?
iwctl.c:1123:5: warning: symbol 'iwctl_giwfrag' was not declared. Should it be static?
iwctl.c:1141:5: warning: symbol 'iwctl_siwretry' was not declared. Should it be static?
iwctl.c:1176:5: warning: symbol 'iwctl_giwretry' was not declared. Should it be static?
iwctl.c:1205:5: warning: symbol 'iwctl_siwencode' was not declared. Should it be static?
iwctl.c:1336:5: warning: symbol 'iwctl_giwencode' was not declared. Should it be static?
iwctl.c:1398:5: warning: symbol 'iwctl_siwpower' was not declared. Should it be static?
iwctl.c:1448:5: warning: symbol 'iwctl_giwpower' was not declared. Should it be static?
iwctl.c:1478:5: warning: symbol 'iwctl_giwsens' was not declared. Should it be static?
iwctl.c:1502:5: warning: symbol 'iwctl_siwauth' was not declared. Should it be static?
iwctl.c:1603:5: warning: symbol 'iwctl_giwauth' was not declared. Should it be static?
iwctl.c:1611:5: warning: symbol 'iwctl_siwgenie' was not declared. Should it be static?
iwctl.c:1644:5: warning: symbol 'iwctl_giwgenie' was not declared. Should it be static?
iwctl.c:1669:5: warning: symbol 'iwctl_siwencodeext' was not declared. Should it be static?
iwctl.c:1783:5: warning: symbol 'iwctl_giwencodeext' was not declared. Should it be static?
iwctl.c:1791:5: warning: symbol 'iwctl_siwmlme' was not declared. Should it be static?
iwctl.c:1900:21: warning: symbol 'iwctl_private_args' was not declared. Should it be static?
iwctl.c:1906:33: warning: symbol 'iwctl_handler_def' was not declared. Should it be static?

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:35:09 -07:00
James A Shackleford 2c052d4000 staging: vt6655: update iwctl_private_args extern declaration
Update declaration of iwctl_private_args to match definition in iwctl.c

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:35:09 -07:00
James A Shackleford b47056707e staging: vt6655: update out-of-date function declaration
The function iwctl_siwscan() is defined in iwctl.c as:
int iwctl_siwscan(struct net_device *dev,
		  struct iw_request_info *info,
		  struct iw_point *wrq,
		  char *extra)
{
  ...

This patch updates iwctl.h so that the type of the 3rd parameter (*wqr) in the
function declaration matches the definition.

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:35:09 -07:00
James A Shackleford 04d521970b staging: vt6655: fix sparse warning for static declarations
This patch fixes the following sparse warnings:

dpc.c:65:21: warning: symbol 'acbyRxRate' was not declared. Should it be static?
dpc.c:272:9: warning: symbol 'MngWorkItem' was not declared. Should it be static?
dpc.c:288:1: warning: symbol 'device_receive_frame' was not declared. Should it be static?

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:33:44 -07:00
James A Shackleford ebc43d093b staging: vt6655: fix sparse warning "cast removes address space of expression"
Add missing __user macro to second parameter of ethtool_ioctl().
This removes the need for the offending (void *) cast of the user space pointer
rq->ifr_data.

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:33:44 -07:00
Konrad Zapalowicz 0c4df9c969 staging: vt6655: refactor iwctl_giwaplist() to avoid -Wframe-larger-than warn.
This commit refactors the iwctl_giwaplist() function so that the sparse
warning "the frame size of 1292 bytes is larger than 1024 bytes
[-Wframe-larger-than=]" is no more.

The root cause of this warning were two arrays allocated on the stack
and this commit changes this - these arrays are now kmalloc'ed. As a
result the function is refactored and hopefully stil working the same.

I were not able to test these changes so at least the carefull review
is more than welcomed.

Note that my changes has broadened the set of error codes that this
function can return. The new error code is ENOMEM. Luckily, this is
no issue.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:10:46 -07:00
Peter Senna Tschudin c804f5920c staging: vt6655: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 21:35:27 +09:00
Guido Martínez bc5cf65635 staging: vt6655: fix checkpatch bracing issues
This patchs fixes tons of warnings such as:

  WARNING: braces {} are not necessary for single statement blocks
  #354: FILE: drivers/staging/vt6655/wmgr.c:354:
  +       for (ii = 0; ii < WLAN_BSSID_LEN; ii++) {
  +               pMgmt->abyDesireBSSID[ii] = 0xFF;
  +       }

Please note: this patch only fixes bracing issues (and there is still a
lot to do); so if you run checkpatch it _will_ throw a lot of errors.
Use --test-only=braces

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:26:37 -07:00
Guido Martínez 4e8a7e5fc2 staging: vt6655: remove dead code
Remove dead code in many places on this driver.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:25:58 -07:00
Nicolas Del Piano 91ed9a7cdd Staging: vt6655: tether: fixed a brace coding style issue
Fixed a coding style issue.

Signed-off-by: Nicolas Del Piano <ndel314@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15 13:23:03 -07:00
Silvio Fricke b47eb6cd8f staging: vt6655: removed incorrect casting in ioctl.c
This patch fixes the following type of sparse warnings:

drivers/staging/vt6655/ioctl.c:308:104: warning: cast from restricted gfp_t
drivers/staging/vt6655/ioctl.c:579:109: warning: cast from restricted gfp_t

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:11:56 -07:00
Silvio Fricke 77be4f4788 staging: vt6655: removed incorrect casting in wpactl.c
This patch fixes the following type of sparse warnings:

drivers/staging/vt6655/wpactl.c:596:47: warning: cast from restricted gfp_t
drivers/staging/vt6655/wpactl.c:638:68: warning: cast from restricted gfp_t
drivers/staging/vt6655/wpactl.c:860:42: warning: cast from restricted gfp_t

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:11:56 -07:00
Jimmy Li 30d991dd44 Staging: vt6655: iwctl.c: fix a sparse warning
fix a sparse warning and do some clean up.
iwctl.c:1846:35: expected restricted gfp_t [usertype] flags

Signed-off-by: Jimmy Li <coder.liss@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:10:29 -07:00
Guido Martínez 3248c07c7b staging: vt6655: remove mention of nonexistent function CARDbSetBasicRate
Comments mention a function CARDbSetBasicRate, but it never existed in
the source tree. Remove all mention of it.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:09:32 -07:00
Guido Martínez c720dadab7 staging: vt6655: fix DBG_PRT and PRINT_K macros
Wrap both macros inside a 'do { ... } while(0)' to prevent breakage if
used within another 'if'. Also fix a usage of DBG_PRT with a missing
semicolon.

Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:09:32 -07:00
Cédric Cabessa f2ca407b96 staging: vt6655,vt6656: fix sparse error "unexpected unlock"
Signed-off-by: Cédric Cabessa <ced@ryick.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:07:42 -07:00
Ioana Ileana eb0eb66846 staging: vt6655: fix sparse warning
Added missing static qualifier

Signed-off-by: Ioana Ileana <ioana.ileana@telecom-paristech.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-18 16:07:42 -07:00
Himangi Saraogi 625fd1a991 staging:vt6655: Fix sparse warnings of using plain integer as NULL pointer
This patch fixes the following sparse warnings:
drivers/staging/vt6655/wmgr.c:970:42: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:971:41: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:972:38: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:973:43: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4110:37: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4111:41: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4112:34: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4113:30: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4114:35: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:4123:32: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1815:41: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1816:34: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1817:30: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:1818:35: warning: Using plain integer as NULL pointer
drivers/staging/vt6655/wmgr.c:2075:63: warning: Using plain integer as NULL pointer

The following coccinelle script was used to achieve this:
@rule1@
expression *x;
@@
(
- x = 0;
+ x = NULL;
|
- (x == 0)
+ (x == NULL)
|
- (x != 0)
+ (x != NULL)
)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:01:21 -07:00
Gulsah Kose 0a7ba6239c staging: vt6655: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in 80211mgr.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:45:52 -07:00
Jelena Bjelja e82efb2c11 staging: vt6655: Remove unnecessary braces in aes_ccmp.c
This patch fixes the checkpatch warnings:
	WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Jelena Bjelja <jelena.bjelja.ing@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 19:37:23 -07:00
Jelena Bjelja 9c45c42a54 staging:vt6655: Fix open brace placement related error
This patch fixes the following checkpatch error in aes_ccmp.c:
	ERROR: that open brace { should be on the previous line

Signed-off-by: Jelena Bjelja <jelena.bjelja.ing@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:35:57 -07:00
Ashley Smith 042bdadb85 staging: vt6655 : Fix placement of open brace
This patch fixes the checkpatch warning "that open brace { should be on
the previous line" for a non-function statement block.

Signed-off-by: Ashley Smith <ashley@eclipso.ch>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:20:58 -07:00
Malcolm Priestley 12ca22b0d6 staging: vt6655: 64 bit fix sizeof long TKIP mic
Change to u32 and fix debug message format

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:31:32 -08:00
Malcolm Priestley 35a9562b02 staging: vt6655: 64 bit fixes TKIP mic correct sizeof long.
Correct to endian base type __le32.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:31:31 -08:00
Malcolm Priestley d0daef301d staging: vt6655: 64 bit fixes :TKIP mode micheal.c sizeof long.
Fix MIC_vGetMIC and MIC_vInit to u32

Fix calling functions to u32

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:31:31 -08:00
Malcolm Priestley 4dbc77c098 staging: vt6655: 64 bit fixes: MACvSetKeyEntry correct sizeof long,
Use u32 to correct the pointer of pdwKey and the size of dwData.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:31:31 -08:00
Malcolm Priestley 829127b438 staging: vt6655: 64 bit Correct alignment of tx/rx structures.
Aligment of pointers on 64 bit is incorrect.

Align to 64 bit using aligned 8 bytes and remove structure packing.

This allows the device to run on both 32 and 64 bit

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08 22:31:31 -08:00
Christian Engelmayer 6d2398743f staging: vt6655: Fix memory leak in wpa_ioctl()
Fix a memory leak in the wpa_ioctl() error handling path so that 'param' is
also freed correctly in case of an unsupported ioctl.
Detected by Coverity: CID 144380.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13 15:19:41 -08:00
Martin Hofmann edd236afc8 vt6655: fix printk usage in wpactl.c
This patch fixes the usage of printk in wpactl.c concering one missing log level
occurence and some whitespaces before a newline.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:06:10 -08:00
Martin Hofmann 91d9b19aeb vt6655: remove typedefs in wpactl.h
wpactl.h contained some typedefs for enums. These were removed in this patch.
Also, a typedef for a type "unsigned long long" that was only instantiated in
one place was removed and its declaration altered.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:05:20 -08:00
Martin Hofmann 0027d9a7bd vt6655: fix indentation in wroute.c
This patch fixes indentation style belonging to function calls as well as some
run-away closing parentheses when calling functions.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Martin Hofmann ed07c0e39b vt6655: remove unnecessary braces in wroute.c
This patch removes some unnecessary braces concerning if-statements in the file
wroute.c

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Martin Hofmann 85d396b5fd vt6655: remove casts in wroute.c
The file wroute.c contained some silly casts. This patch removes them.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Martin Hofmann 4d60901849 vt6655: balance faulty parentheses in 80211hdr.h
The file 80211hdr.h contained the macro WLAN_GET_FC_PRVER(n). The big endian
fashion of this macro had unbalanced parentheses. This patch removes the
parentheses in question.

Signed-off-by: Martin Hofmann <martin.hofmann@studium.uni-erlangen.de>
Signed-off-by: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:04:46 -08:00
Dan Carpenter 1c5ebaae42 staging: vt6655: check too restrictive (off by one)
key_len == MAX_KEY_LEN is valid but we return an error.

Introduced-by: 6b7200fe0a ('Staging: vt6655: memory corruption in check in wpa_set_wpadev()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 11:02:13 -08:00
Paul Gortmaker 885a947e5b staging: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 10:08:14 -08:00
Jingoo Han 41e043fcfa staging: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02 22:32:35 -08:00
Greg Kroah-Hartman 06749f192b Merge v3.13-rc2 into staging-next
we want these fixes in here.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02 16:39:07 -08:00
Dan Carpenter cb4855b49d Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd()
We fixed this to use free_netdev() instead of kfree() but unfortunately
free_netdev() doesn't accept NULL pointers.  Smatch complains about
this, it's not something I discovered through testing.

Fixes: 3030d40b50 ('staging: vt6655: use free_netdev instead of kfree')
Fixes: 0a438d5b38 ('staging: vt6656: use free_netdev instead of kfree')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 09:14:29 -08:00
Teodora Baluta 2b0c2a48b6 staging: vt6655: delete explicit comparison to bool
This patch fixes all bool tests by deleting the comparison. Most of
these were detected using coccinelle and silence the following type of
coccinelle warnings for drivers/staging/vt6655/bssdb.c file:

WARNING: Comparison to bool

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 15:46:28 -08:00
Teodora Baluta a777289800 staging: vt6655: delete unnecessary whitespace before a quoted newline
This patch silences the following type of warnings:

WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 15:46:28 -08:00
Teodora Baluta 18278771f4 staging: vt6655: use netdev_* instead of printk
Checkpatch.pl gave the following warnings

WARNING: printk() should include KERN_ facility level

After fixing these with KERN_INFO facility level, it was suggested to
use netdev_ instead of printk() with KERN_INFO facility.
Used netdev_dbg for the statements inside of PLICE_DEBUG #ifdef, as
debugging shouldn't rely on compile options and netdev_info for one
printk which wasn't inside any #ifdef PLICE_DEBUG.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 15:46:28 -08:00
Teodora Baluta 88cc85075d staging: vt6655: remove unneeded semicolon
This patch deletes any unneeded semicolons in driver vt6655 as detected
by coccinelle.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Teodora Baluta 649520bbc5 staging: vt6655: fix comparison of bool to 0/1
This patch corrects comparison of bool to 0/1 for file
drivers/staging/vt6655/rxtx.c. The following type of coccinelle detected
warnings are silenced:

WARNING: Comparison of bool to 0/1

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Teodora Baluta 0fd682f644 staging: vt6655: fix assignment of bool to 0
This patch fixes the following warnings detected using coccinelle for
drivers/staging/wmgr.c file:

drivers/staging/vt6655/wmgr.c:2335:1-22: WARNING: Assignment of bool to 0/1
drivers/staging/vt6655/wmgr.c:2338:1-27: WARNING: Assignment of bool to 0/1

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Teodora Baluta 1208f14a37 staging: vt6655: delete explicit comparison to bool
This patch fixes the following type of coccinelle detected warnings for
driver vt6655:

WARNING: Comparison to bool

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:15:08 -08:00
Teodora Baluta 938db28b33 staging: vt6655: put brace on previous line
Place braces on same line for code statements. Fix the following
checkpatch.pl type of error for drivers/staging/vt6655/bssdb.c file:

ERROR: that open brace { should be on the previous line

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:13:30 -08:00
Teodora Baluta b4f66ad83b staging: vt6655: put trailing statements on next line
This patch fixes the following type of checkpatch.pl errors in
drivers/staging/vt6655/bssdb.c file:

ERROR: trailing statements should be on next line

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:03:18 -08:00
Teodora Baluta 347a0475a6 staging: vt6655: remove braces for single statement blocks
This patch removes braces for single statement blocks, clearing these
types of checkpatch.pl warnings:

WARNING: braces {} are not necessary for single statement blocks
WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:03:18 -08:00
Teodora Baluta 383956442d staging: vt6655: replace C99 comments wtih C89 comments
This patch replaces C99 comments with /* .. */ comments. Any commented
code is deleted.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:01:41 -08:00
Archana kumari 1e01f94317 staging: vt6655: fixed sparse warning for static declaration in wpa2.c
This patch fixes sparse warning for static declaration in wpa2.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 10:56:12 -08:00
Archana kumari 5c36d5ae2e staging: vt6655: fixed use of unnecessary braces in baseband.c
This patch fixes use of unnecessary braces in baseband.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:54:54 -07:00
Ebru Akagunduz 0aa82696fb Staging: vt6655: Fix Sparse Warning for Static Declarations in wpa.c
This patch fixes the Sparse Warning "symbol was not declared.
Should it be static?" in wpa.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:52:31 -07:00
Ebru Akagunduz 07bcc80037 Staging: vt6655: Fix Sparse Warning for Static Declarations in tkip.c
This patch fixes the Sparse Warning "symbol was
not declared. Should it be static?" in tkip.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:52:31 -07:00
Archana kumari c8e46f447d staging: vt6655: Fix C99 commenting style in michael.h
This patch fixes C99 commenting style in staging:vt6655:michael.h

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-19 14:51:05 -07:00
Archana kumari f1f9f35019 staging: vt6655:removed incorrect casting in hostap.c
This patch fixes the following type of sparse warnings:

drivers/staging/vt6655/hostap.c:733:42: warning: cast from restricted gfp_t
drivers/staging/vt6655/hostap.c:733:42: warning: incorrect type in argument 2 (different base types)
drivers/staging/vt6655/hostap.c:733:42:    expected restricted gfp_t [usertype] flags
drivers/staging/vt6655/hostap.c:733:42:    got int [signed] <noident>

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 13:32:35 -07:00
Archana kumari 8009ae1a08 staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the Sparse Warning "symbol was not declared. Should it be
static?" in aes_ccmp.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-17 09:09:36 -07:00
Rashika Kheria 1d612bd477 Staging: vt6655: Removal of Unused Function
This patch removes unused function 'RFbShutDown' from file rf.c

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:49:19 -07:00
Rashika Kheria 5da5804b9c Staging: vt6655: Fix Sparse Warning for Static Declarations
This patch fixes the following Sparse Warnings in rf.c:

drivers/staging/vt6655/rf.c:58:21: warning: symbol 'dwAL2230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:76:21: warning: symbol 'dwAL2230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:93:21: warning: symbol 'dwAL2230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:110:15: warning: symbol 'dwAL2230PowerTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:180:21: warning: symbol 'dwAL7230InitTable' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:203:21: warning: symbol 'dwAL7230InitTableAMode' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:222:21: warning: symbol 'dwAL7230ChannelTable0' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:288:21: warning: symbol 'dwAL7230ChannelTable1' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:352:21: warning: symbol 'dwAL7230ChannelTable2' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:431:6: warning: symbol 's_bAL7230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:474:6: warning: symbol 's_bAL7230SelectChannel' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:634:6: warning: symbol 'RFbAL2230Init' was not declared. Should it be static?
drivers/staging/vt6655/rf.c:681:6: warning: symbol 'RFbAL2230SelectChannel' was not declared. Should it be static?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-16 18:47:29 -07:00