summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/device_main.c
AgeCommit message (Collapse)Author
2017-12-20vt6655: Fix a possible sleep-in-atomic bug in vt6655_suspendJia-Ju Bai
[ Upstream commit 42c8eb3f6e15367981b274cb79ee4657e2c6949d ] The driver may sleep under a spinlock, and the function call path is: vt6655_suspend (acquire the spinlock) pci_set_power_state __pci_start_power_transition (drivers/pci/pci.c) msleep --> may sleep To fix it, pci_set_power_state is called without having a spinlock. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25staging: vt6655: align function parameters to open parenthesisMarko Stankovic
Alignment styles are used interchangeably, align parameters to open parenthesis and fix issues reported by checkpatch.pl Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25staging: vt6655: remove unnecessary blank linesMarko Stankovic
Fix unnecessary blank lines issues reported by checkpatch.pl Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25staging: vt6655: replace NULL comparison with '!' operatorMarko Stankovic
Fix comparison to NULL issues reported by checkpatch.pl Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-12-06staging: vt6655: Add spaces around +PrasannaKumar Muralidharan
Add spaces around + for better readability of the code. Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: vt6655: Removes the FSF mailing address.Varsha Rao
This patch fixes the checkpatch issue by removing the Free Software Foundation's mailing address from the sample GPL notice. Because the FSF has changed address in the past, and may change again. Linux already includes a copy of the GPL. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: vt6655: Removes unnecessary blank lines.Varsha Rao
This patch fixes the checkpatch issue of multiple blank lines, by removing them. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-18staging: vt6655: device_main: Replace NULL comparison with !xNamrata A Shettar
Replace NULL comparison to resolve checkpatch issue. - x == NULL => !x Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-18staging: vt6655: device_main: Replace explicit NULL comparisonNamrata A Shettar
Replace NULL comparison to resolve checkpatch issue. - x == NULL => !x Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging: vt6655: Fix checkpatch warningAnson Jacob
Fix warning by checkpatch.pl Add * for block comments on subsequent lines Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-03-10Staging: vt6655: Remove & from function name.Sandhya Bankar
Remove & from function name,when function name passed as an argument to another function. Function name is used as pointer without &. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11Staging: vt6655: Add check dma_mapping_errorHaneen Mohammed
This patch checks for dma_mapping_error() after using dma_map_single. If the dma map fails we release skb buff allocated by dev_alloc_skb() to avoid possible causes of resource leak. Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: vt6655: mac.c replace void __iomem * with struct vnt_privateMalcolm Priestley
Moving void __iomem down one level in the following functions MACbIsRegBitsOn MACbIsRegBitsOff MACbIsIntDisable MACvSetShortRetryLimit MACvSetLongRetryLimit MACvGetLongRetryLimit MACvSetLoopbackMode MACvSaveContext MACvRestoreContext MACbSoftwareReset MACbSafeSoftwareReset MACbSafeRxOff MACbSafeTxOff MACbSafeStop MACbShutdown MACvInitialize MACvSetCurrRx0DescAddr MACvSetCurrRx1DescAddr MACvSetCurrTXDescAddr MACvSetCurrTx0DescAddrEx MACvSetCurrAC0DescAddrEx MACvSetCurrSyncDescAddrEx MACvSetCurrATIMDescAddrEx MACvTimer0MicroSDelay MACvOneShotTimer1MicroSec MACvSetMISCFifo MACbPSWakeup MACvSetKeyEntry MACvDisableKeyEntry Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: vt6655: rename pOpts and sOpts to opts.Malcolm Priestley
bring pointers and members into line. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: vt6655: remove static inline alloc_td_info.Malcolm Priestley
Since this only contains one function and used only twice remove inline altogether. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: vt6655: remove static inline alloc_rd_info.Malcolm Priestley
Since this only contains one function and only used twice remove inline altogether. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: vt6655: replace typedef struct __device_optMalcolm Priestley
with struct vnt_options and members rx_descs0 for nRxDescs0 rx_descs1 for nRxDescs1 tx_descs for nTxDescs int_works short_retry long_retry bbp_type flags Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: vt6655: device_main Replace uIdx with idx.Malcolm Priestley
Removing camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: vt6655: device_tx_srv rename pTDMalcolm Priestley
Following the convention elsewhere for vnt_tx_desc rename desc. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: vt6655: device_main replace pTDInfo with td_info.Malcolm Priestley
Removing camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: vt6655: device_main replace pRD with rd.Malcolm Priestley
Removing camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: vt6655: device_alloc_rx_buf replace pRDInfo with rd_info.Malcolm Priestley
Removing camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: vt6655: device_main.c replace pDesc with desc.Malcolm Priestley
Removing camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04staging: vt6655: device_main replace pDevice with priv.Malcolm Priestley
Removing camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: vt6655: don't stop TX queue unless buffer full.Malcolm Priestley
Presently the TX buffer stops while filling the buffer. However, this does not make use of the available buffer space, it also lags the speed of the TX troughtput. Only stop the queue when the buffer becomes full. The Interupt handler will start the queue again when a buffer is available. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: Move code in device_get_pci_infoMalcolm Priestley
Function always returns true and now only a few lines move to vt6655_probe. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: device_get_pci_info pcid already assigned.Malcolm Priestley
pcid has already been assigned earlier in vt6655_probe. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: device_get_pci_info remove call to set master.Malcolm Priestley
a call to PCI_COMMAND is used to set master. However, a call to pci_set_master earlier in function which does the same thing. So remove the calls and variable b. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: device_get_pci_info remove variable cis_addr.Malcolm Priestley
cis_addr is never used remove its call to pci_resource_start. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: device_get_pci_info remove unused pci_read_config_*Malcolm Priestley
These values are read from pci but never used. Removing variables byRevId, SubSystemID, SubVendorID and pci_cmd. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: remove and move vt6655_init_infoMalcolm Priestley
move code to vt6655_probe. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: vt6655_init_info remove memset.Malcolm Priestley
vnt_private is allocated with kzalloc so is already zero. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: remove unused multicast_limit.Malcolm Priestley
multicast_limit is assigned a vale that is never used. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: Remove typedef struct __chip_info_tblMalcolm Priestley
Only two values that are assigned from this table. DEVICE_FLAGS_TX_ALIGN and the value of io_size which is used as the size of ioremap which is 256. Remove all variables, DEVICE_FLAGS_TX_ALIGN check, apply io_size value and chip_info_table. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: remove get_chip_name and info message.Malcolm Priestley
This prints "VIA Networking Solomon-A/B/G Wireless LAN Adapter" which has already printed once in vt6655_probe. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging: vt6655: vt6655_probe remove PCI debug infoMalcolm Priestley
Remove unnecessary debug PCI info that can be obtained by lspci. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagSRxDescMalcolm Priestley
with struct vnt_rx_desc and all members the same. volatile is removed from pointers as this generates warning message. Only the first four members of vnt_rx_desc need to be volatile. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagDEVICE_RD_INFOMalcolm Priestley
with struct vnt_rd_info volatile is removed because it will generate a warning (in any case this member is not) and renaming rd_info. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagRDES1Malcolm Priestley
with struct vnt_rdes1 and members wReqCount -> req_count wReserved -> reserved Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagRDES0Malcolm Priestley
with struct vnt_rdes0 replacing members as follows wResCount -> res_count f15Reserved -> f15_reserved f1Owner -> owner big endian f8Reserved1 -> f8_reserved1 f7Reserved -> f7_reserved Narrowing endian differences to inside structure. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: vt6655: Replace typedef struct tagSTxDescMalcolm Priestley
Replace with struct vnt_tx_desc with all members the same. volatile is removed from pointers as this generates warning message. Only the first four members of vnt_tx_desc need to be volatile. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: vt6655: replace typedef struct tagDEVICE_TD_INFO and structureMalcolm Priestley
Create struct vnt_td_info with members mic_hdr skb buf buf_dma dwReqCount -> req_count byFlags -> flags In struct tagSTxDesc volatile is removed because it will generate a warning (in any case this member is not) and renaming td_info. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: vt6655: struct tagDEVICE_TD_INFO resize dwReqCount.Malcolm Priestley
dwReqCount is no bigger than u16 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: vt6655: replaced typedef struct tagTDES1Malcolm Priestley
Create struct vnt_tdes1 that replaces members wReqCount -> req_count byTCR -> tcr byReserved -> reserved Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14staging: vt6655: desc.h replace typedef struct tagTDES0Malcolm Priestley
create struct vnt_tdes0 replacing used members byTSR0 -> tsr0 byTSR1 -> tsr1 f1Owner -> owner Narrowing endian differences to inside structure. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-10Merge 4.2-rc6 into staging-nextGreg Kroah-Hartman
We want the IIO and staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULLMalcolm Priestley
conf->beacon_rate can be NULL on association. So check conf->beacon_rate BSS_CHANGED_BEACON_INFO needs to flagged in changed as the beacon_rate will appear later. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v3.19+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: vt6655: always set 32 bit dma maskMalcolm Priestley
The device is limited to 32 bit address space. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: vt6655: remove unused tagDEVICE_RD_INFO -> curr_descMalcolm Priestley
variable is assigned a value that is never used. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>