aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/usbpipe.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-07-22staging: vt6656: change alignment to match parenthesisBenjamin Sherman1-1/+1
Change indentation to match parentheses. This complies with the Linux kernel coding style and improves readability. Signed-off-by: Benjamin Sherman <benjamin@bensherman.io> Link: https://lore.kernel.org/r/20190716045754.fivh5n44bybe2uce@valkyrie-mobile.localdomain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21staging: vt6656: clean function's error path in usbpipe.cQuentin Deslandes1-50/+65
Avoid discarding called function's returned value. Store it instead in order to act accordingly. Update error path to return 0 on success and a negative errno value on error. Signed-off-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16staging: vt6656: Remove unnecessary 'out of memory' messageDileep Sankhla1-3/+0
This patch removes the unnecessary out of memory message fixing the following checkpatch.pl warning in usbpipe.c: WARNING: Possible unnecessary 'out of memory' message Signed-off-by: Dileep Sankhla <sankhla.dileep96@gmail.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>
2017-07-16staging: vt6656: Align function parametersSimon Sandström1-2/+2
Fixes checkpatch.pl warnings "Alignment should match open parenthesis". Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: vt6656: use off stack for in buffer USB transfers.Malcolm Priestley1-2/+15
Since 4.9 mandated USB buffers to be heap allocated. This causes the driver to fail. Create buffer for USB transfers. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v4.9+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: vt6656: use off stack for out buffer USB transfers.Malcolm Priestley1-2/+12
Since 4.9 mandated USB buffers be heap allocated this causes the driver to fail. Since there is a wide range of buffer sizes use kmemdup to create allocated buffer. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: <stable@vger.kernel.org> # v4.9+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06Staging: vt6656: Fix spaces and char limitJitendra Kumar Khasdev1-2/+2
This is a patch to usbpipe.c to fix space and char limit warning found by checkpatch tool. Signed-off-by: Jitendra Khasdev <jkhasdev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16staging: vt6656: Alignment should match open parenthesisArushi Singhal1-6/+6
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis" Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-30staging: vt6656: usbpipe.c: Fix checkpatch warningAnson Jacob1-2/+3
Fix checkpatch.pl warning for line over 80 characters Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20staging: vt6656: simplify tests of successful urb statusAlison Schofield1-3/+3
Use if (status) in tests for successful urb status. This replaces (status != 0) and (status == STATUS_SUCCESS). (STATUS_SUCCESS is defined for NDIS status in this driver, but was being misused) Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14staging: vt6656: move local var init into declarationAlison Schofield1-9/+4
Improve readability by initializing local variables at declaration. In one instance, vnt_start_interrupt_urb_complete(), also use that local variable in subsequent switch. Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: vt6656: replace explicit NULL comparison with ! operatorAlison Schofield1-1/+1
Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle: @@ expression e; statement s0, s1; @@ if ( ( + ! e - == NULL || ... ) ) s0 else s1 Signed-off-by: Alison Schofield <amsfield22@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-19staging: vt6656: remove address from GPL textOthmar Pasteka1-4/+0
Cleanup errors from checkpatch.pl. Signed-off-by: Othmar Pasteka <pasteka@kabsi.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: vt6656: remove RX complete locking.Malcolm Priestley1-6/+0
The lock in vnt_submit_rx_urb_complete is blocked by TX activity. The lock comes from a time when RX needed to be synchronized with other parts of the driver because the WLAN API was in driver. Since this is now dealt with in mac80211 the lock is unnecessary. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17staging: vt6656: Boolean tests don't need comparisons.Abdul Hussain1-1/+1
This patch remove true and false from boolean tests. Signed-off-by: Abdul Hussain <habdul@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16staging: vt6656: remove unnecessary bracesRagnar B. Johannsson1-3/+2
Removes unnecessary braces to comply with coding style. Signed-off-by: Ragnar B. Johannsson <ragnar@igo.is> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: vt6656: remove comments of old functions nolonger present.Malcolm Priestley1-1/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: vt6656: remove return from all void functionsMalcolm Priestley1-6/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24staging: vt6656: use test_bit to check flags statusMalcolm Priestley1-3/+3
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24staging: vt6656: struct vnt_private merge flag and macrosMalcolm Priestley1-3/+3
merge u32 flag into unsigned long Flags Replacing fMP_DISCONNECTED with DEVICE_FLAGS_DISCONNECTED Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24staging: vt6656: remove macro MP_IS_READYMalcolm Priestley1-1/+1
Just test FLag and remove not. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24staging: vt6656: Remove flags fMP_POST_READS and fMP_POST_WRITESMalcolm Priestley1-1/+1
MP_IS_READY(fMP_DISCONNECTED) is used to block thread in vnt_tx_context Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: usbpipe.c clean up USB_CTL_WAITMalcolm Priestley1-1/+1
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: usbpipe remove unneeded commentsMalcolm Priestley1-6/+0
We know what the endpoints are Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: Remove ununsed macro URB_ASYNC_UNLINKMalcolm Priestley1-4/+0
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: remove static declaration vnt_tx_context_completeMalcolm Priestley1-35/+32
Moving vnt_tx_context in visibility of vnt_tx_context_complete Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: Remove static declaration vnt_submit_rx_urb_completeMalcolm Priestley1-31/+31
Moving vnt_submit_rx_urb in visibility of vnt_submit_rx_urb_complete Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21staging: vt6656: Remove static declaration vnt_start_interrupt_urb_completeMalcolm Priestley1-28/+27
Moving vnt_start_interrupt_urb in visibility of vnt_start_interrupt_urb_complete Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18staging: vt6656: struct vnt_private pInterruptURB rename to interrupt_urbMalcolm Priestley1-3/+3
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18staging: vt6656: struct vnt_rcb remove camel caseMalcolm Priestley1-5/+5
Camel case changes pDevice -> priv pUrb -> urb bBoolInUse -> in_use Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18staging: vt6656: struct vnt_rcb remove unused membersMalcolm Priestley1-1/+0
Remove Next and Ref Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: usbpipe irrelevant function descriptionsMalcolm Priestley1-100/+0
All these have no or vague meaning. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: rename s_nsBulkInUsbIoCompleteRead to vnt_submit_rx_urb_completeMalcolm Priestley1-3/+3
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: rename PIPEnsBulkInUsbRead to vnt_submit_rx_urbMalcolm Priestley1-1/+1
The function just submits to rx urbs. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: rename s_nsBulkOutIoCompleteWrite to vnt_tx_context_completeMalcolm Priestley1-4/+4
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: rename PIPEnsSendBulkOut to vnt_tx_context.Malcolm Priestley1-1/+1
We are just tx the context Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: rename s_nsInterruptUsbIoCompleteRead to vnt_start_interrupt_urb_completeMalcolm Priestley1-3/+3
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: usbpipe rename PIPEnsInterruptRead to vnt_start_interrupt_urbMalcolm Priestley1-1/+1
Drop Read and PIPE. The function starts the interrupt urb. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15staging: vt6656: int rename INTnsProcessData to vnt_int_process_dataMalcolm Priestley1-1/+1
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: vt6656: s_nsBulkInUsbIoCompleteRead check that used sk_buff is clean and ready to reuse.Malcolm Priestley1-0/+3
skb_push the headroom and trimmed back to 0 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08stagingL vt6656: implement fall back rates reporting.Malcolm Priestley1-17/+6
The driver reports the rate tried in struct vnt_interrupt_data tsr* variables which is available in INTnsProcessData via interrupt urb context. Instead of closing apTD tx context in s_nsBulkOutIoCompleteWrite by setting in_use to false. Keep the context open and allow vnt_int_report_rate to close it. If the tx_retry value is correct it will report back the sucessful RATE tried. struct vnt_usb_send_context add pkt_no which is index of apTD Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: vt6656: Include re_alloc_skb within lock.Malcolm Priestley1-14/+11
Remove variable re_alloc_skb and merge code within urb->actual_length. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-08staging: vt6656: s_nsBulkOutIoCompleteWrite fix bug of 5GHZ a rates idxMalcolm Priestley1-1/+6
On 2GHz band the values of wCurrentRate match the idx rates. However, on 5GHz they do not because in channel.c vnt_rates_a do not match idx. Instead use the info->control.rates[0].idx the value that was tried. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-29staging: vt6656: Remove rx handing from RXvWorkItemMalcolm Priestley1-10/+15
In s_nsBulkInUsbIoCompleteRead reuse or reallocate sb_buff and resubmit urb. In device_alloc_bufs allocate memory to rcb individually and call PIPEnsBulkInUsbRead to submit the urbs Change handling to free rcb in device_free_rx_bufs Remove calls to workqueue. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: vt6656: device.h remove dead strutures and variablesMalcolm Priestley1-2/+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 tx functionsMalcolm Priestley1-17/+11
Create vnt_fill_txkey as mac80211 replacement for s_vFillTxKey. Create vnt_tx_packet which a merger of s_bPacketToWirelessUsb, nsDMA_tx_packet and csMgmt_xmit using mac80211 signalling. Create vnt_beacon_xmit as mac80211 replacement for csBeacon_xmit. Changing header in vnt_beacon_buffer to struct ieee80211_mgmt deleting some of old code. vnt_beacon_make is needed to make beacon for vnt_beacon_xmit. Create vnt_beacon_enable as mac80211 call to enable beacon. vnt_fill_ieee80211_rts is modified to use struct ieee80211_hdr instead of struct ethhdr and access to tx_context. In s_nsBulkOutIoCompleteWrite modify context handling 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-2/+2
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-26staging: vt6656: dead code remove control.c/hMalcolm Priestley1-0/+1
Replace control.h headers with usbpipe.h Also add to usbpipe.c its header Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>