aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/device_main.c
AgeCommit message (Collapse)Author
2015-08-16staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULLMalcolm Priestley
commit 1f17124006b65482d9084c01e252b59dbca8db8f upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03staging: vt6655: device_rx_srv check sk_buff is NULLMalcolm Priestley
commit b5eeed8cb6097c8ea660b6598d36fdbb94065a22 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03staging: vt6655: check ieee80211_bss_conf bssid not NULLMalcolm Priestley
commit 8e8e9198920ddfa920191069ae02eba75d39e653 upstream. Sometimes bssid can go null on failed association. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> 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-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>
2014-11-26staging: vt6655: CARDbSetPhyParameter remove unused parametersMalcolm Priestley
wCapInfo byERPField, *pvSupportRateIEs *pvExtSupportRateIEs Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07staging: vt6655: baseband replace __iomem where caller is priv dereferenced.Malcolm Priestley
Replace with stucture vnt_private *priv in functions BBvSoftwareReset BBvSetTxAntennaMode BBvSetRxAntennaMode BBvSetDeepSleep BBvExitDeepSleep __iomem *dwIoBase will be moved into BBbWriteEmbedded and BBbReadEmbedded later. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: vt6655: change tx wake queueMalcolm Priestley
Wake queue in the dwIsr loop of device_intr instead of device_tx_srv. This fixes an issue when ISR_TXDMA0 or ISR_AC0DMA does not occur device_tx_srv is not called and the queue gets stuck in stopped condition. On test if the queue is stuck another MACvTransmitAC0 or MACvTransmit0 in vnt_tx_packet will clear it. Check on vif that both buffers are available and the queue is stopped. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: vt6655: device_set_options remove dead variablesMalcolm Priestley
uConnectionRate wRTSThreshold byOpMode b11hEnable uChannel Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: vt6655: device_init_registers remove uConnectionRateMalcolm Priestley
The device starts up with a default rate of 54M Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: vt6655: device_set_options remove unused ethernet addressesMalcolm Priestley
Removing these variables abyBroadcastAddr abySNAP_RFC1042 abySNAP_Bridgetunnel Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: vt6655: device_get_options remove unused device parametersMalcolm Priestley
IP_byte_align Channel PreambleType RTSThreshold ConnectionRate OPMode b80211hEnable Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: vt6655: remove fragmentation from driverMalcolm Priestley
fragmentation is now handled by mac80211. Remove functions device_alloc_frag_buf device_init_defrag_cb device_free_frag_buf Removing typedef struct tagSDeFragControlBlock frag_thresh sRxDFCB cbDFCB; cbFreeDFCB; uCurrentDFCBIdx; macros FRAG_THRESH_MIN FRAG_THRESH_MAX Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove wmgr.hMalcolm Priestley
on removal needs to be replaced by card.h in device.h Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: remove typedef void *TimerFunctionMalcolm Priestley
Covert functions TimerSQ3CallBack and TimerState1CallBack to the correct type for struct timer_list.function to remove the cast altogether. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove iocmd.hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove iowpa.hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove tether.hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove bssdb.h headerMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead remove wcmd.h and typedefsMalcolm Priestley
CMD_STATE CMD_CODE CMD_ITEM Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove vntwifi.hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove wctl.c/hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove tcrc.c/hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: deadcode remove wroute.c/hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code datarate.c/hMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove wpactl.c/hMalcolm Priestley
All these functions are now dead. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>