summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/device_main.c
AgeCommit message (Collapse)Author
2015-07-22staging: vt6655: Remove unused tagDEVICE_TD_INFO curr_descMalcolm Priestley
The 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>
2015-07-22staging: vt6655: remove unnecessary variable skb_dmaMalcolm Priestley
skb_dma flips from 0 to the contents buf_dma. This is nolonger necessary so use buf_dma directly and remove skb_dma altogether. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: vt6655: dead code tx path remove dma_unmap_singleMalcolm Priestley
When pTDInfo->skb_dma not equal to pTDInfo->buf_dma, pTDInfo->skb_dma equals zero. as mentioned in comment pre-allocated buf_dma can't be unmapped so remove dead code. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: vt6655: Remove ununsed macro ASSERTMalcolm Priestley
VIAWET_DEBUG is not defined so macro is empty. Remove the macro. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-20Merge 4.2-rc3 into staging-nextGreg Kroah-Hartman
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging:vt6655: remove checks around dev_kfree_skbManinder Singh
dev_kfree_skb checks for NULL pointer itself, Thus no need of explicit NULL check. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: vt6655: check ieee80211_bss_conf bssid not NULLMalcolm Priestley
Sometimes bssid can go null on failed association. 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-14staging: vt6655: Fix missing power saving supportMalcolm Priestley
Add IEEE80211_HW_SUPPORTS_PS to ieee80211_hw flags enabling this feature. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: vt6655: vnt_tx_packet don't wakeup from power saving.Malcolm Priestley
mac80211 changes the wake state before attempting to tx data Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-26Merge tag 'staging-4.2-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here's the big, really big, staging tree patches for 4.2-rc1. Loads of stuff in here, almost all just coding style fixes / churn, and a few new drivers as well, one of which I just disabled from the build a few minutes ago due to way too many build warnings. Other than the one "disable this driver" patch, all of these have been in linux-next for quite a while with no reported issues" * tag 'staging-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1163 commits) staging: wilc1000: disable driver due to build warnings Staging: rts5208: fix CHANGE_LINK_STATE value Staging: sm750fb: ddk750_swi2c.c: Insert spaces before parenthesis Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines Staging: sm750fb: ddk750_swi2c.c: Insert spaces around operators Staging: sm750fb: ddk750_swi2c.c: Replace spaces with tabs Staging: sm750fb: ddk750_swi2c.h: Shorten lines to under 80 characters Staging: sm750fb: ddk750_swi2c.h: Replace spaces with tabs Staging: sm750fb: modedb.h: Shorten lines to under 80 characters Staging: sm750fb: modedb.h: Replace spaces with tabs staging: comedi: addi_apci_3120: rename 'this_board' variables staging: comedi: addi_apci_1516: rename 'this_board' variables staging: comedi: ni_atmio: cleanup ni_getboardtype() staging: comedi: vmk80xx: sanity check context used to get the boardinfo staging: comedi: vmk80xx: rename 'boardinfo' variables staging: comedi: dt3000: rename 'this_board' variables staging: comedi: adv_pci_dio: rename 'this_board' variables staging: comedi: cb_pcidas64: rename 'thisboard' variables staging: comedi: cb_pcidas: rename 'thisboard' variables staging: comedi: me4000: rename 'thisboard' variables ...
2015-06-17staging: vt6655: use module_pci_driver helperMalcolm Priestley
Remove vt6655_init_module and vt6655_cleanup_module and replace module_pci_driver Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: vt6655: remove suspend struct notifier_block.Malcolm Priestley
The only thing this does is vt6655_suspend which is already been called upon suspend. Remove function device_notify_reboot and structure device_notifier. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10mac80211: convert HW flags to unsigned long bitmapJohannes Berg
As we're running out of hardware capability flags pretty quickly, convert them to use the regular test_bit() style unsigned long bitmaps. This introduces a number of helper functions/macros to set and to test the bits, along with new debugfs code. The occurrences of an explicit __clear_bit() are intentional, the drivers were never supposed to change their supported bits on the fly. We should investigate changing this to be a per-frame flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-06-01staging: vt6655: device_rx_srv check sk_buff is NULLMalcolm Priestley
There is a small chance that pRD->pRDInfo->skb could go NULL while the interrupt is processing. Put NULL check on loop to break out. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: vt6655: replace and resize dwIsrMalcolm Priestley
dwIsr is not used outside vnt_interrupt_process and should be u32. Move to function and resize to u32. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: vt6655: vnt_interrupt_process remove camel case.Malcolm Priestley
pDevice -> priv Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: vt6655: vnt_interrupt_process remove page 0 selectMalcolm Priestley
Page 1 is fully proctected by lock there is no need to check for it. Page 0 is selected at other times. Remove byOrgPageSel and its calls from function. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: vt6655: use workqueue for interrupt handlingMalcolm Priestley
Introduce vnt_interrupt to handle interrupt and use workqueue to queue and queue on vif. Convert device_intr to void call vnt_interrupt_process from vnt_interrupt_work providing vif is valid. This removes troublesome heavy code from the interupt handler and allows to remove atomic from other areas of driver. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: vt6655: Remove call to STAvUpdateIsrStatCounter.Malcolm Priestley
This function does not provide any data to users. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: vt6655: implement ieee80211_low_level_statsMalcolm Priestley
Collect low level stats from mib counter for mac80211 call. Replacing the unused function STAvUpdate802_11Counter. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ethernet/cadence/macb.c drivers/net/phy/phy.c include/linux/skbuff.h net/ipv4/tcp.c net/switchdev/switchdev.c Switchdev was a case of RTNH_H_{EXTERNAL --> OFFLOAD} renaming overlapping with net-next changes of various sorts. phy.c was a case of two changes, one adding a local variable to a function whilst the second was removing one. tcp.c overlapped a deadlock fix with the addition of new tcp_info statistic values. macb.c involved the addition of two zyncq device entries. skbuff.h involved adding back ipv4_daddr to nf_bridge_info whilst net-next changes put two other existing members of that struct into a union. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-18Merge 4.1-rc4 into staging-nextGreg Kroah-Hartman
We want the fixes in here for testing and merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: vt6655: lock MACvWriteBSSIDAddress.Malcolm Priestley
This function selects page 1 and cause intermittent problems on interrupt handler. lock call with spin_lock_irqsave. 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-05-08staging: vt6655: CARDbUpdateTSF bss timestamp correct tsf counter value.Malcolm Priestley
The TSF counter is not set correctly. Use sync_tsf for last beacon value and get tsf local value. Remove qwLocalTSF variable and call CARDbGetCurrentTSF. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NICMalcolm Priestley
The state of m_td0TD0.f1Owner should change after the buff_addr has been filled otherwise the device grabs the buffer too early. m_td0TD0.f1Owner is protected by memory barriers on both sides of change. iTDUsed is best incremented after MACvTransmit. It appears that f1Owner actually polls to do the memory transfer. A back port patch will be needed for v3.19 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v4.0+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: vt6655: Fix 80211 control and management status reporting.Malcolm Priestley
Currently only TD_FLAGS_NETIF_SKB are reported back to mac80211. Move vnt_int_report_rate to report all frame types. 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-05-08staging: vt6655: implement IEEE80211_TX_STAT_NOACK_TRANSMITTEDMalcolm Priestley
Make use of this macro for non ack frames. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v4.0 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: vt6655: device_free_tx_buf use only ieee80211_tx_status_irqsafeMalcolm Priestley
TD_FLAGS_NETIF_SKB is only for data. Fixes issue of ack frames not being reported. 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-04-30staging: vt6655: device_intr check for vif on while loopMalcolm Priestley
vif should never be or go null while in loop. Fixes race condition where interrupts are late and when interface is not present. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-24mac80211: remove support for IFF_PROMISCJohannes Berg
This support is essentially useless as typically networks are encrypted, frames will be filtered by hardware, and rate scaling will be done with the intended recipient in mind. For real monitoring of the network, the monitor mode support should be used instead. Removing it removes a lot of corner cases. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-03-23Merge 4.0-rc5 into staging-testingGreg Kroah-Hartman
We want the staging tree fixes that are upstream here as well to prevent merge conflicts from people trying to clean up code. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: vt6655: remove deprecated use of pci apiQuentin Lambert
Replace occurences of the pci api by appropriate call to the dma api. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09vt6655: Fix late setting of byRFType.Malcolm Priestley
byRFType is not set prior to registration of mac80211 causing unpredictable operation after channel scans. With byRFType unset all channels are enabled this causes tx power to be set to values not present its eeprom. Move setting of this variable to vt6655_probe. byRFType must have a mask set. byRevId not used by driver and is removed. 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-03-09staging: vt6655: vnt_tx_packet fix dma_idx selection.Malcolm Priestley
There is still a problem that dma_idx is causing packets to go onto the wrong tx path. Protect dma_idx fully with the present first lock and use pTDInfo->byFlags TD_FLAGS_NETIF_SKB to set MACvTransmit. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06staging: vt6655: Cleanup C99 commentsAlex W Slater
Fix checkpatch.pl errors: "ERROR: do not use C99 // comments" Signed-off-by: Alex W Slater <alex.slater.dev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: vt6655: Fix TD_FLAGS_NETIF_SKB only on TYPE_AC0DMAMalcolm Priestley
Allow only TD_FLAGS_NETIF_SKB on ring buffer TYPE_AC0DMA for data only transfers for correct reporting of tx rates. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: vt6655: parse bb vga code out of device_intr.Malcolm Priestley
Reordering the code and reversing the priv->byBBVGANew verses priv->byBBVGACurrent check and using dev_dbg for pr_debug. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: vt6655: move setting of PSTxDesc->buff_addr to vnt_tx_packetMalcolm Priestley
Keep setting of this part of the structure with the others. Only pTDInfo needs carried in the buffer structure. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: vt6655: device_init_registers alway set initial antenna modeMalcolm Priestley
BBvSetTxAntennaMode and BBvSetRxAntennaMode need to be set correcty on start up Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: vt6655: remove antenna diversity functionsMalcolm Priestley
The vendor had disabled these functions in their last version. On test this can be troublesome, so remove this from the driver along with its macros and timers. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: vt6655: set_channel replace parameter with ieee80211_channelMalcolm Priestley
replacing uConnectionChannel for hw_value as set in vnt_init_bands. This allows other signaling of ieee80211_channel to move deeper into driver. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: vt6655: fix space prohibted before that ','Ahmad Hassan
This patch fixes the following checkpatch.pl error: fix space prohibited before that ',' Signed-off-by: Ahmad Hassan <ahmad.hassan612@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-19Merge 3.19-rc5 into staging-nextGreg Kroah-Hartman
We want the staging fixes in this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: vt6655: vnt_tx_packet Fix corrupted tx packets.Malcolm Priestley
Move PSTxDesc->m_td1TD1 to inside spin locks. if m_td1TD1.byTCR has TCR_EDP and TCR_STP are set, the interrupt handler will try and complete the buffer before it is completed. Usually on the tail of a burst of tx packets. This results in a partially completed packet being transmitted or worse sitll dead lock when skb is freed by the interrupt handler. Set head_td->m_td1TD1.byTCR to 0 in first lock of vnt_tx_packet to stop interrupt handler completing the buffer. Move Set TSR1 & ReqCount in s_cbFillTxBufHead to the second lock. cbReqCount is carried to the second lock in pTDInfo->dwReqCount without the padding removed. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: vt6655: fix sparse warnings: incorrect argument typeMike Krinkin
this patch fixes following sparse warnings: drivers/staging/vt6655/device_main.c:1503:25: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/device_main.c:1503:25: expected void [noderef] <asn:2>*<noident> drivers/staging/vt6655/device_main.c:1503:25: got struct vnt_private * drivers/staging/vt6655/device_main.c:1503:25: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/device_main.c:1503:25: expected void [noderef] <asn:2>*<noident> drivers/staging/vt6655/device_main.c:1503:25: got struct vnt_private * drivers/staging/vt6655/device_main.c:1505:25: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/device_main.c:1505:25: expected void [noderef] <asn:2>*<noident> drivers/staging/vt6655/device_main.c:1505:25: got struct vnt_private * drivers/staging/vt6655/device_main.c:1505:25: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/device_main.c:1505:25: expected void [noderef] <asn:2>*<noident> drivers/staging/vt6655/device_main.c:1505:25: got struct vnt_private * Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: vt6655: [BUG] Protect MACvSelectPage1 with lock.Malcolm Priestley
The device must not flip to page 1 while in interrupt lock causing loss of connection or dead lock. Protect from changes to page by adding lock where user can change the page in CARDvSetRSPINF, vnt_configure and set_channel Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-12staging: vt6655: Declare vnt_init() staticSören Brinkmann
Fix sparse warning: drivers/staging/vt6655/device_main.c:1672:5: warning: symbol 'vnt_init' was not declared. Should it be static? Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: vt6655: card.c move __iomem into functions.Malcolm Priestley
Removing dereferencing from callers Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: vt6655: card Remove function vUpdateIFSMalcolm Priestley
vUpdateIFS does the same operations of CARDbSetPhyParameter there is not need to call this function. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: vt6655: change typedef enum _VIA_PKT_TYPE to macroMalcolm Priestley
Replacing for u8 type and removing cast for byBBType. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>