summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656
AgeCommit message (Collapse)AuthorFilesLines
2020-04-13staging: vt6656: Remove unnecessary local variable initializationOscar Carter1-1/+1
Don't initialize the rate variable as it is set a few lines later. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Link: https://lore.kernel.org/r/20200407163915.7491-3-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: rxtx remove rate change and current_rate.Malcolm Priestley2-12/+4
There is no longer any need to change power in vnt_tx_packet. Remove current_rate in vnt_tx_packet and struct vnt_private as it is no longer used elsewhere. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/3ba896aa-5ab2-affb-9ce5-7df8a9b3190a@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6556: vnt_rf_setpower convert to use ieee80211_channel.Malcolm Priestley4-58/+43
ieee80211_channel contains all the necessary information to change power according to tx mode required. vnt_rf_setpower is moved and so that vnt_rf_set_txpower the only caller becomes static. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/9eab9af8-fde9-1dc6-fced-95c7a36ecc01@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: set all cck rates to default.Malcolm Priestley1-34/+4
mac80211 rate control decides which cck rates to use so all of them should be set enabled at the appropriate bit rate. This means vnt_get_cck_rate is no longer required. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/dec847da-5bad-1920-f275-741f7f704fb3@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: set all ofdm rates to defaultMalcolm Priestley1-50/+4
mac80211 rate control decides which odfm rates to use so all of them should be set enabled at the appropriate bit rate. This means vnt_get_ofdm_rate is no longer required. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/9a52d7f4-dd3e-efdc-eef8-bb794f7dea6d@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: replace al2230_power_table array with formula.Malcolm Priestley1-75/+4
The power table can replaced with calculation 0x0404090 | (power << 12) removing array and length macro. variable power never goes beyond the maximum setting. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/e277409a-4509-d09c-515d-59b952f8310d@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: Define EnCFG_BBType_MASK as OR between previous definesOscar Carter1-1/+1
Define the EnCFG_BBType_MASK bit as an OR operation between two previous defines instead of using the OR between two new BIT macros. Thus, the code is more clear. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Link: https://lore.kernel.org/r/20200402170103.22520-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: add error code handling to unused variableJohn B. Wyatt IV1-8/+12
Add error code handling to unused 'ret' variable that was never used. Return an error code from functions called within vnt_radio_power_on. Issue reported by coccinelle (coccicheck). Suggested-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Suggested-by: Stefano Brivio <sbrivio@redhat.com> Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Signed-off-by: John B. Wyatt IV <jbwyatt4@gmail.com> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Link: https://lore.kernel.org/r/20200330233900.36938-1-jbwyatt4@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: Refactor the vnt_update_pre_ed_threshold functionOscar Carter1-235/+100
Create three arrays with the threshold data use in the switch statement of the vnt_update_pre_ed_threshold function. These three arrays contains elements of struct vnt_threshold new type. Create a for loop in the vnt_update_pre_ed_threshold function to do exactly the same that the if-elseif-else statements in the switch statement. Also, remove the if check against the !cr_201 && !cr_206 due to now it is replace by the NULL check against the threshold pointer. When this pointer is NULL means that the cr_201 and cr_206 variables have not been assigned, that is the same that the old comparison against cr_201 and cr_206 due to these variables were initialized with 0. The statistics of the old baseband object file are: section size addr .text 3415 0 .data 576 0 .bss 0 0 .rodata 120 0 .comment 45 0 .note.GNU-stack 0 0 .note.gnu.property 28 0 Total 4184 The statistics of the new baseband object file are: section size addr .text 2209 0 .data 576 0 .bss 0 0 .rodata 344 0 .comment 45 0 .note.GNU-stack 0 0 .note.gnu.property 28 0 Total 3202 With this refactoring it increase a little the readonly data but it decrease much more the .text section. This refactoring decrease the footprint and makes the code more clear. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Link: https://lore.kernel.org/r/20200328181706.14276-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13staging: vt6656: Use defines in preamble_type variablesOscar Carter2-7/+7
Use the PREAMBLE_SHORT and PREAMBLE_LONG defines present in the file "baseband.h" to assign values to preamble_type variables. Also, use the same defines to make comparisons against these variables. In this way, avoid the use of numerical literals or boolean values and make the code more clear. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Link: https://lore.kernel.org/r/20200328141738.23810-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-27staging: vt6656: Use DIV_ROUND_UP macro instead of specific codeOscar Carter1-17/+4
Use DIV_ROUND_UP macro instead of specific code with the same purpose. Also, remove the unused variables. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Link: https://lore.kernel.org/r/20200326175902.14467-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-21staging: vt6656: Use BIT() macro in vnt_mac_reg_bits_* functionsOscar Carter3-4/+7
The last parameter in the functions vnt_mac_reg_bits_on and vnt_mac_reg_bits_off defines the bits to set or unset. So, it's more clear to use the BIT() macro instead of an hexadecimal value. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Link: https://lore.kernel.org/r/20200320181326.12156-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-21staging: vt6656: Use BIT() macro instead of hex valueOscar Carter3-152/+155
Use the BIT() macro instead of the hexadecimal value to define the different bits in registers. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Link: https://lore.kernel.org/r/20200320171056.7841-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-19staging: vt6656: Use ARRAY_SIZE instead of hardcoded sizeOscar Carter1-3/+4
Use ARRAY_SIZE to replace the hardcoded size so we will never have a mismatch. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Link: https://lore.kernel.org/r/20200318174015.7515-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17staging: vt6656: Use BIT_ULL() macro instead of bit shift operationOscar Carter1-2/+2
Replace the bit left shift operation with the BIT_ULL() macro and remove the unnecessary mask off operation against the bit_nr variable. This mask is only there for legacy reasons. Originally it was 31 (0x1f) and the bit_nr variable spread across an mc_filter array with two u32 elements. Now, this mask is not needed because its value is 0x3f and the mc_filter variable is an u64 type. In this situation, the 26 bit right shift operation against the value returned by the ether_crc function set the bit_nr variable to the following value: bit 31 to bit 6 -> All 0 (due to the bit shift operation happens over an unsigned type). bit 5 to bit 0 -> The 6 msb bits of the value returned by the ether_crc function. The purpose of the 0x3f mask against the bit_nr variable is to reset (set to 0) the 26 msb bits (bit 31 to bit 6), but these bits are yet 0. So, the mask off operation is now unnecessary. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Link: https://lore.kernel.org/r/20200314161441.4870-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-10staging: vt6656: struct vnt_rcb remove unused in_use.Malcolm Priestley3-17/+3
The variable merely toggles true to false and is unused. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/130a4078-2502-a381-46c4-b473815e153b@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-10staging: vt6656: Remove vnt_interrupt_buffer in_use flag.Malcolm Priestley2-26/+3
mac80211 is the only user of in_use to start it and should not be true when so. So internal toggling of this variable is not relevant. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/69585034-4318-4bec-7d9b-f64a167df237@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-10staging: vt6656: remove blank linePayal Kshirsagar1-1/+0
To avoid style issues, remove multiple blank lines. Signed-off-by: Payal Kshirsagar <payalskshirsagar1234@gmail.com> Acked-by: Julia Lawall <julia.lawall@inria.fr> Link: https://lore.kernel.org/r/20200309073424.4920-1-payalskshirsagar1234@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: Remove unnecessary local variables initializationOscar Carter1-5/+5
Don't initialize variables that are then set a few lines later. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Link: https://lore.kernel.org/r/20200301135028.11753-1-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: Move vnt_rx_data to usbpipe.cMalcolm Priestley5-151/+101
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-03-04staging: vt6656: Delete int.c/h file and move functions to usbpipeMalcolm Priestley6-160/+111
Move functions vnt_int_process_data and vnt_int_report_rate to usbpipe.c and vnt_interrupt_data to usbpipe.h These form part of the USB structure. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/bc21d3d7-81be-4ec1-030e-4e7a45f98238@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: Remove function vnt_int_process_data.Malcolm Priestley4-13/+3
call vnt_start_interrupt_urb directly from vnt_start. Move debug message to vnt_start_interrupt_urb. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/dff3a1d0-4d24-d9ea-2a15-c81fd544bc79@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: vnt_int_start_interrupt remove spin lock.Malcolm Priestley1-5/+0
This formed part of the legacy driver and potentially multi users. The driver now has only one user mac80211 remove this lock. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/871a78d4-6d3e-f34b-d0ae-6123803c6faf@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: vnt_vt3184_init remove stack copy to array.Malcolm Priestley1-4/+1
use u8 pointer addr directly and remove stack array. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/49f34764-c90c-8c5f-b4f2-a3668b13e519@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: use vnt_vt3184_agc array directlyMalcolm Priestley1-13/+2
vnt_vt3184_agc is always the same regardless of rf type so use the array directly removing from stack buffer. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/4b455ee4-7ac7-e1ff-4a10-2d99f2e30714@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: Remove STATUS enums from TX pathMalcolm Priestley3-14/+4
Returning standard error code or status variable. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/21bf299b-63e0-9f65-c7db-6e0b72e0f1d8@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04staging: vt6656: Use mac80211 duration for tx headersMalcolm Priestley1-49/+8
mac80211 already provides the correct duration simply copy it to the tx headers removing the need for driver to find it with vnt_get_duration_le. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/0cdde611-119b-b223-e8c8-b59fb497a7b9@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-24Merge 5.6-rc3 into staging-nextGreg Kroah-Hartman1-1/+1
We need the staging fixes in here, and it resolves a merge issue in the MAINTAINERS file. 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-02-09staging: vt6656: Remove fall back functions and headers.Malcolm Priestley3-267/+0
Fall back is no longer used in driver so remove all functions and headers. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/33732aad-5905-c173-ea81-431265e4f7e7@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-09staging: vt6656: Fix return for unsupported cipher modes.Malcolm Priestley2-4/+5
mac80211 expect to see -EOPNOTSUPP on unsupported ciphers so these can be done on stack. correct all the returns to do this. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/b65a3b23-735f-f679-0f16-a54c3266b5ae@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-09staging: vt6656: Disable and remove fall back rates from driver.Malcolm Priestley3-70/+1
The fall back rates are not properly implemented in driver and form part of the legacy driver. mac80211 has no indication that this is happening and it does appear the driver does function considerably better without them so remove them. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/47cc31e5-226b-f84f-3655-51a269735130@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-22staging: vt6656: Remove memory buffer from vnt_download_firmware.Malcolm Priestley3-14/+4
The memory buffer is being done twice here as vnt_control_out passes it straight to kmemdup. Remove buffer and add const to the variable in vnt_control_out to pass the pointer to it. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/be025ed0-204d-e957-4bc9-963e841fcb2c@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 Priestley2-25/+17
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 Priestley2-17/+19
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 Priestley2-16/+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-13Merge 5.5-rc6 into staging-nextGreg Kroah-Hartman7-6/+35
We need the staging fixes in here as well. 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>
2020-01-10staging: vt6656: Fix false Tx excessive retries reporting.Malcolm Priestley1-2/+4
The driver reporting IEEE80211_TX_STAT_ACK is not being handled correctly. The driver should only report on TSR_TMO flag is not set indicating no transmission errors and when not IEEE80211_TX_CTL_NO_ACK is being requested. Cc: stable <stable@vger.kernel.org> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/340f1f7f-c310-dca5-476f-abc059b9cd97@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-10staging: vt6656: use NULLFUCTION stack on mac80211Malcolm Priestley2-9/+6
It appears that the drivers does not go into power save correctly the NULL data packets are not being transmitted because it not enabled in mac80211. The driver needs to capture ieee80211_is_nullfunc headers and copy the duration_id to it's own duration data header. Cc: stable <stable@vger.kernel.org> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/610971ae-555b-a6c3-61b3-444a0c1e35b4@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-10staging: vt6656: correct packet types for CTS protect, mode.Malcolm Priestley2-4/+10
It appears that the driver still transmits in CTS protect mode even though it is not enabled in mac80211. That is both packet types PK_TYPE_11GA and PK_TYPE_11GB both use CTS protect. The only difference between them GA does not use B rates. Find if only B rate in GB or GA in protect mode otherwise transmit packets as PK_TYPE_11A. Cc: stable <stable@vger.kernel.org> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/9c1323ff-dbb3-0eaa-43e1-9453f7390dc0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-03staging: vt6656: set usb_set_intfdata on driver fail.Malcolm Priestley3-0/+3
intfdata will contain stale pointer when the device is detached after failed initialization when referenced in vt6656_disconnect Provide driver access to it here and NULL it. Cc: stable <stable@vger.kernel.org> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/6de448d7-d833-ef2e-dd7b-3ef9992fee0e@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-03staging: vt6656: remove bool from vnt_radio_power_on retMalcolm Priestley1-1/+1
The driver uses logical only error checking a bool true would flag error. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/cc52b67c-9ef8-3e57-815a-44d10701919e@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-03staging: vt6656: limit reg output to block sizeMalcolm Priestley3-2/+24
vnt_control_out appears to fail when BBREG is greater than 64 writes. Create new function that will relay an array in no larger than the indicated block size. It appears that this command has always failed but was ignored by driver until the introduction of error checking. Cc: stable <stable@vger.kernel.org> # v5.3+ Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/a41f0601-df46-ce6e-ab7c-35e697946e2a@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-03staging: vt6656: correct return of vnt_init_registers.Malcolm Priestley1-1/+1
The driver standard error returns remove bool false conditions. Cc: stable <stable@vger.kernel.org> # v5.3+ Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/072ec0b3-425f-277e-130c-1e3a116c90d6@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-03staging: vt6656: Fix non zero logical return of, usb_control_msgMalcolm Priestley1-2/+6
Starting with commit 59608cb1de1856 ("staging: vt6656: clean function's error path in usbpipe.c") the usb control functions have returned errors throughout driver with only logical variable checking. However, usb_control_msg return the amount of bytes transferred this means that normal operation causes errors. Correct the return function so only return zero when transfer is successful. Cc: stable <stable@vger.kernel.org> # v5.3+ Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/08e88842-6f78-a2e3-a7a0-139fec960b2b@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-03staging: vt6656: remove unnecessary parenthesisAmir Mahdi Ghorbanian1-4/+4
Remove unnecessary parenthesis to abide by kernel coding-style. Signed-off-by: Amir Mahdi Ghorbanian <indigoomega021@gmail.com> Link: https://lore.kernel.org/r/20191230155520.GA27072@user-ThinkPad-X230 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-07staging: vt6656: reorganize characters so the lines are under 80 chGabriela Bittencourt1-4/+4
Cleans up warnings of "line over 80 characters" Signed-off-by: Gabriela Bittencourt <gabrielabittencourt00@gmail.com> Link: https://lore.kernel.org/r/20191006194030.8854-1-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-07staging: vt6656: remove duplicated blank lineGabriela Bittencourt1-1/+0
Cleans up checks of "don't use multiple blank line" Signed-off-by: Gabriela Bittencourt <gabrielabittencourt00@gmail.com> Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk> Link: https://lore.kernel.org/r/20191006195854.9843-1-gabrielabittencourt00@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>