summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/dpc.c
AgeCommit message (Collapse)AuthorFilesLines
2020-03-04staging: vt6656: Move vnt_rx_data to usbpipe.cMalcolm Priestley1-124/+0
vnt_rx_data is a USB function and vnt_submit_rx_urb_complete is the only caller therefore removing dpc.c/h files and becoming static. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/d3937276-5a47-7184-e263-84d9c9cb5c7a@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-10staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.Malcolm Priestley1-1/+1
bb_pre_ed_rssi is an u8 rx_dm always returns negative signed values add minus operator to always yield positive. fixes issue where rx sensitivity is always set to maximum because the unsigned numbers were always greater then 100. Fixes: 63b9907f58f1 ("staging: vt6656: mac80211 conversion: create rx function.") Cc: stable <stable@vger.kernel.org> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/aceac98c-6e69-3ce1-dfec-2bf27b980221@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-22staging: vt6656: Just check NEWRSR_DECRYPTOK for RX_FLAG_DECRYPTED.Malcolm Priestley1-16/+2
At present the driver does a number of checks for RX_FLAG_DECRYPTED. Remove all these and just pass check NEWRSR_DECRYPTOK mac80211 will handle the processing of the sk_buff and dispose of it. This means that mac80211 can do unsupported encryption modes on stack. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/75bbaa08-2465-b057-64ce-b67933409bc6@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-22staging: vt6656: Use vnt_rx_tail struct for tail variables.Malcolm Priestley1-25/+8
Place tsf_time, sq, new_rsr, rssi, rsr and sq3 packed in the structure. Unused variables are removed along with skb_data and structure is placed beyond vnt_rx_header + pay_load_with_padding on skb->data. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/6ac6eae0-7b71-fefe-9230-da3b345b634b@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-22staging: vt6656: create vnt rx header for sk_buff.Malcolm Priestley1-17/+12
vnt_rx_header contains the structure of the original variables wbk_status, rx_sts, rx_rate and pay_load_len packed. Replace all the old variables for the ones in this. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/094ee227-b114-ee75-67f7-bf07f8de099f@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-22staging: vt6656: Simplify RX finding bit ratesMalcolm Priestley1-15/+6
The bit rate can be found by multiplying the rate value by 5. Use rx_bitrate to compared to sband bitrates removing the need to find it by hw_value. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/50d3c4b8-6d17-4fae-ce9c-88a50614450f@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-10staging: vt6656: Move ieee80211_rx_status off stack.Malcolm Priestley1-11/+10
ieee80211_rx_status off stack to IEEE80211_SKB_RXCB (skb->cb) removing the need to copy on to it. skb->cb is always present as a clean buffer so simply fill it in. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/a66caba4-0c17-41af-a58f-3cdbb3243fb0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-11staging: vt6655: remove some redundant variablesColin Ian King1-3/+1
Variables rx_sts, sq, frame and is_pspoll are being assigned but are never used hence they are redundant and can be removed. Cleans up clang warnings: warning: variable 'sq' set but not used [-Wunused-but-set-variable] warning: variable 'rx_sts' set but not used [-Wunused-but-set-variable] warning: variable 'frame' set but not used [-Wunused-but-set-variable] warning: variable 'is_pspoll' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: vt6656: Remove redundant license textGreg Kroah-Hartman1-11/+0
Now that the SPDX tag is in all vt6656 files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Forest Bond <forest@alittletooquiet.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: vt6656: add SPDX identifiers to all vt6656 driver filesGreg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the vt6656 driver files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Forest Bond <forest@alittletooquiet.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-28staging: vt6656: Remove unused variable 'rx_sts'Martin Alonso1-2/+1
As suggested by Joe Perches, rx_sts is not used anywhere and could be removed. Signed-off-by: Martin Alonso <martin.alonso@zoho.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging:vt6656:dpc.c:Fix spacesRithvik Patibandla1-3/+3
The following patch fixes two checks thrown by checkpatch.pl, "Spaces preferred around '+'" and "No space is necessary after a cast" Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21staging:vt6656:dpc.c:Fix parantheses alignmentRithvik Patibandla1-4/+4
This patch fixes "Alignment should match open parantheses" check thrown by checkpatch.pl Signed-off-by: Rithvik Patibandla <rithvikp98@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-19staging: vt6656: remove address from GPL textOthmar Pasteka1-3/+0
Cleanup errors from checkpatch.pl. Signed-off-by: Othmar Pasteka <pasteka@kabsi.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: vt6656: dpc remove unneeded headersMalcolm Priestley1-3/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: vt6656: remove comments of old functions nolonger present.Malcolm Priestley1-5/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byBBPreEDRSSI with bb_pre_ed_rssiMalcolm Priestley1-2/+2
Remove type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private replace byBBType with bb_typeMalcolm Priestley1-1/+1
Removing type prefix and camel case. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private rename uCurrRSSI to current_rssiMalcolm Priestley1-1/+1
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: struct vnt_private rename byLocalID to local_idMalcolm Priestley1-1/+1
Removing camel case Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: vt6656: vnt_rx_data add track rsr and new_rsr errorsMalcolm Priestley1-2/+15
Add rsr and new_rsr error packet error drop. if NEWRSR_DECRYPTOK fails drop packet altogether. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29staging: vt6656: dead code remove RXvWorkItem and RXvFreeRCBMalcolm Priestley1-68/+0
Remove work_struct and queue variables Remove EnqueueRCB and DequeueRCB macros Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: remove old rx receive listMalcolm Priestley1-2/+2
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dpc remove dead code RXvMngWorkItemMalcolm Priestley1-46/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dead codead remove bssdb.h headerMalcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: remove dead code datarateMalcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: decode remove tether.c/hMalcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dead code remove iowpa.hMalcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dead code remove micheal.c/hMalcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dead code remove tkip.c/hMalcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dead code remove wctlMalcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dead code remove wmgr.cMalcolm Priestley1-1/+0
The header will removed later Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: dpc remove dead code.Malcolm Priestley1-803/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: mac80211 conversion: create rx function.Malcolm Priestley1-1/+136
Add mac80211 header and depends. Create new function vnt_rx_data to receive 80211 packets which is based on RXbBulkInProcessData and rx them into mac80211 The function also relays dbm, tsf_time(as mactime) and sets byBBPreEDRSSI and uCurrRSSI. skb is modified slightly to skb_put the maxium tail room in PIPEnsBulkInUsbRead and trim back in vnt_rx_data. dev_alloc_skb is used to reallocate the sk_buff. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25staging: vt6656: Convert remaining locks to spin_lock_irqsave.Malcolm Priestley1-2/+3
Convert all remaining locks to 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-05-23staging: vt6656: dead code remove diversity codeMalcolm Priestley1-7/+0
bDiversityRegCtlON is always false. In later vendor driver code has been commented out. Remove diversity timers and variables. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: vt6656: remove dead code tcrc.c/hMalcolm Priestley1-1/+0
Functions are now dead and of no use. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19staging; vt6656: dead code aes_ccmp.Malcolm Priestley1-1/+0
After dead code dpc hostapd remove aes.c/h Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19staging: vt6656: dpc.c remove hostapdMalcolm Priestley1-222/+1
Remove dead functions s_bAPModeRxCtl s_bAPModeRxData Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19staging: vt6656: Remove hostapd functions.Malcolm Priestley1-207/+3
Remove throughout driver bEnableHostapd bEnable8021x bEnableHostWEP struct net_device *apdev tx_80211 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-19staging: vt6656: Remove dead code hostap.Malcolm Priestley1-1/+0
It is based on viawget, proprietary version of wpa supplicant. The code is not compatible with the current version of hostapd. It may be possible to implement when the driver is fully converted to mac80211. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15staging: vt6656: lock changes: RXvMngWorkItem.Malcolm Priestley1-7/+16
Narrow atomic locks in RXvMngWorkItem. We must lock the DequeueRCB and RXvFreeRCB so that they are in sync. vMgrRxManagePacket can nolonger be atomically called. There is no need for an overall lock. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28staging: vt6656: Replace dev_alloc_skb with netdev_alloc_skb.Malcolm Priestley1-6/+3
Remove code that points to netdev (pDevice/priv->dev) Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28staging: vt6656: Clean up RXvFreeRCB.Malcolm Priestley1-26/+27
Clean up white space, comments and camel case. Camel case changes pRCB -> rcb bReAllocSkb -> re_alloc_skb pDevice -> priv Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28staging: vt6656: Clean up RXvWorkItemMalcolm Priestley1-16/+20
Remove white space and camel case. Camel case changes pDevice -> priv ntStatus -> status pRCB -> rcb Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18staging: vt6656: Replace typedef enum _CARD_OP_MODEMalcolm Priestley1-1/+1
Replace typedef enum _CARD_OP_MODE eOPMode with op_mode enum nl80211_iftype enum changes OP_MODE_INFRASTRUCTURE -> NL80211_IFTYPE_STATION OP_MODE_AP -> NL80211_IFTYPE_AP OP_MODE_DEF -> NL80211_IFTYPE_UNSPECIFIED OP_MODE_ADHOC -> NL80211_IFTYPE_ADHOC Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13staging: vt6656: sparse fixes: dpc.c missing dpc.hMalcolm Priestley1-0/+1
sparse warnings dpc.c:249:5: warning: symbol 'RXbBulkInProcessData' was not declared. Should it be static? dpc.c:1295:6: warning: symbol 'RXvWorkItem' was not declared. Should it be static? dpc.c:1321:6: warning: symbol 'RXvFreeRCB' was not declared. Should it be static? dpc.c:1356:6: warning: symbol 'RXvMngWorkItem' was not declared. Should it be static? Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17staging: vt6656: Remove unused scStatistic data/functions from driver.Malcolm Priestley1-43/+0
None of these stats reach user. So delete them from driver mib.c and mib.h becomes dead code as result of this patch. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-10staging: vt6656: s_uCalculateLinkQual use netstats rx valuesMalcolm Priestley1-0/+3
Use netstats rx_packets and rx_frame_errors. Add frame errors to RXbBulkInProcessData The current scStatistic.RxFcsErrCnt only records USB errors not frame errors. The scStatistic.RxOkCnt only recorded successful USB transfers not actual successfully received packets. So a more accurate reading is to use netstats rx_packets and rx_frame_errors. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10staging: vt6656: Fix (most) sparse warnings regarding static functions/variablesValentina Manea1-1/+1
This fixes sparse warnings for functions and variables, e.g.: * drivers/staging/vt6656/card.c:69:11: warning: symbol 'cwRXBCNTSFOff' was not declared. Should it be static? Some warnings were false positives, such as: * drivers/staging/vt6656/dpc.c:249:5: warning: symbol 'RXbBulkInProcessData' was not declared. Should it be static? Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>