aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6655/dpc.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-12-03staging: vt6655: refactor camelcase uCurrRSSI to current_rssiAlberto Merciai1-1/+1
Replace camelcase variable "uCurrRSSI" (current Received Signal Strength Indicator) into linux kernel coding style equivalent variable "current_rssi". Signed-off-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com> Link: https://lore.kernel.org/r/20211127100807.3113388-1-alb3rt0.m3rciai@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-13staging: vt6655: fix camelcase in byLocalIDTommaso Merciai1-1/+1
Replace camel case variable name for variable byLocalID with snake case equivalent. Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com> Link: https://lore.kernel.org/r/20211010220014.148785-1-tomm.merciai@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: vt6655: remove filename from dpc.cLucas Henneman1-2/+0
This patch resolves checkpatch's warning, "It's generally not useful to have the filename in the file" for dpc.c. Signed-off-by: Lucas Henneman <lucas.henneman@linaro.org> Link: https://lore.kernel.org/r/20210723144340.15787-9-lucas.henneman@linaro.org 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: vt6655: Remove redundant license textGreg Kroah-Hartman1-10/+0
Now that the SPDX tag is in all vt6655 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: vt6655: add SPDX identifiers to all vt6655 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 vt6655 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-10-16staging: vt6655: Removes the FSF mailing address.Varsha Rao1-4/+0
This patch fixes the checkpatch issue by removing the Free Software Foundation's mailing address from the sample GPL notice. Because the FSF has changed address in the past, and may change again. Linux already includes a copy of the GPL. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagSRxDescMalcolm Priestley1-1/+1
with struct vnt_rx_desc and all members the same. volatile is removed from pointers as this generates warning message. Only the first four members of vnt_rx_desc need to be volatile. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagDEVICE_RD_INFOMalcolm Priestley1-1/+1
with struct vnt_rd_info volatile is removed because it will generate a warning (in any case this member is not) and renaming rd_info. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagRDES1Malcolm Priestley1-1/+1
with struct vnt_rdes1 and members wReqCount -> req_count wReserved -> reserved Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging: vt6655: replace typedef struct tagRDES0Malcolm Priestley1-1/+1
with struct vnt_rdes0 replacing members as follows wResCount -> res_count f15Reserved -> f15_reserved f1Owner -> owner big endian f8Reserved1 -> f8_reserved1 f7Reserved -> f7_reserved Narrowing endian differences to inside structure. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22staging: vt6655: Fix wReqCount to __le16Malcolm Priestley1-1/+1
Should be __le16 and do and correct endian conversion. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: vt6655: remove deprecated use of pci apiQuentin Lambert1-2/+2
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-02-07staging: vt6655: vnt_rx_data add track rsr and new_rsr errorsMalcolm Priestley1-1/+10
If not rsr & RSR_CRCOK report RX_FLAG_FAILED_FCS_CRC If not rsr & (RSR_IVLDTYP | RSR_IVLDLEN) drop packet If not NEWRSR_DECRYPTOK on new_rsr drop packet. 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 Priestley1-6/+0
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>
2014-10-29staging: vt6655: dpc.c/h remove dead functionsMalcolm Priestley1-1286/+0
s_byGetRateIdx s_vGetDASA s_vProcessRxMACHeader s_bAPModeRxCtl s_bAPModeRxData s_bHandleRxEncryption s_bHostWepRxEncryption s_vProcessRxMACHeader s_byGetRateIdx s_vGetDASA device_receive_frame s_bAPModeRxCtl Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: dead code remove legacy hostap.c/hMalcolm Priestley1-1/+0
hoatap is now supported by mac80211 in nl80211 mode Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: vnt_rx_data: uCurrRSSI should have the value of *rssiMalcolm Priestley1-1/+1
Fixes issue of byBBVGANew is wrong in device_intr Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: vt6655: mac80211 conversion: add new rx functionsMalcolm Priestley1-0/+123
vnt_receive_frame which replaces device_receive_frame and vnt_rx_data which handles mac80211 rx data structures ieee80211_hw, ieee80211_vif and variable rx_rate are added in structure vnt_private Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28staging: vt6655: dpc.c: Comment fixesVeronika Kabatova1-116/+125
Replace C99 "//" comments by "/* */", remove not needed comments about adding code Signed-off-by: Veronika Kabatova <veronicca114@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: remove unneeded parentheses around the right hand side of an assignmentJiayi Ye1-1/+1
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses are not needed. The Coccinelle semantic patch was used to find cases. @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: vt6655: dpc.c: replace memcpy() by ether_addr_copy() using coccinelleAya Mahfouz1-1/+2
This patch focuses on fixing the following warning generated by checkpatch.pl for the file dpc.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ - memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description and functionality, all Ethernet addresses should align to the u16 datatype. Here is the output of pahole for the relevant datastructures: struct tagS802_11Header { short unsigned int wFrameCtl; /* 0 2 */ short unsigned int wDurationID; /* 2 2 */ unsigned char abyAddr1[6]; /* 4 6 */ unsigned char abyAddr2[6]; /* 10 6 */ unsigned char abyAddr3[6]; /* 16 6 */ short unsigned int wSeqCtl; /* 22 2 */ unsigned char abyAddr4[6]; /* 24 6 */ /* size: 30, cachelines: 1, members: 7 */ /* last cacheline: 30 bytes */ }; struct iw_michaelmicfailure { __u32 flags; /* 0 4 */ struct sockaddr src_addr; /* 4 16 */ __u8 tsc[8]; /* 20 8 */ /* size: 28, cachelines: 1, members: 3 */ /* last cacheline: 28 bytes */ }; struct sockaddr { sa_family_t sa_family; /* 0 2 */ char sa_data[14]; /* 2 14 */ /* size: 16, cachelines: 1, members: 2 */ /* last cacheline: 16 bytes */ }; There is one thing to note though, sa_data is a char array of size 14. And the number of bytes copied using memcpy() or ether_addr_copy() is 6. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11staging: vt6655: Use net_device_stats from struct net_deviceTobias Klauser1-1/+1
Instead of using an own copy of struct net_device_stats in struct vnt_private, use stats from struct net_device. Also remove the thus unnecessary device_get_stats(), as it would now just return netdev->stats, which is the default in dev_get_stats(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30staging: vt6655: Replace typedef enum _CARD_OP_MODE eOPMode with enum nl80211_iftype op_mode.Malcolm Priestley1-1/+1
Using the nl80211 header. Using enum changes OP_MODE_ADHOC -> NL80211_IFTYPE_ADHOC OP_MODE_AP -> NL80211_IFTYPE_AP OP_MODE_INFRASTRUCTURE -> NL80211_IFTYPE_STATION OP_MODE_UNKNOWN -> NL80211_IFTYPE_UNSPECIFIED Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30staging: vt6655: remove remaining comments of PLICE_DEBUGMalcolm Priestley1-4/+3
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: vt6655: Convert DBG_PRT to pr_<level>Joe Perches1-62/+67
DBG_PRT uses are unnecessarily complex. Convert DBG_PRT msglevel to pr_<level>. This changes the KERN_<level> type of several uses. It also enables dynamic_debug for the pr_debug conversions. This patch can be a prelude to converting these pr_<level> uses to dev_<level> as appropriate. Other changes: Realign arguments of these conversions. Remove now unused static int msglevel declarations. Remove now unused DBG_PRT #define. Compile tested only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16staging: vt6655: bssdb/datarate/dpc/power/rxtx use struct vnt_privateMalcolm Priestley1-11/+12
Replacing PSDevice. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16staging: vt6655: Replace and remove typedef QWORD/ DQWORDMalcolm Priestley1-5/+4
Replace the variables with u64/__le64. The endian variant is needed in some places endian correction is needed. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: vt6655: deadcode remove undefined macro THREAD code.Malcolm Priestley1-6/+1
Removing _RxManagementQueue, InitRxManagementQueue, MlmeThread, mlme_kill, EnQueue and DeQueue. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30staging: vt6655: remove undefined TASK_LET codeMalcolm Priestley1-24/+0
Removing all code within and function MngWorkItem. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: vt6655: Remove spaces before quoted newlinesGuillaume Clement1-6/+7
This fixes several spaces added just before a newline in debug strings, reported by checkpatch. Signed-off-by: Guillaume Clement <gclement@baobob.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27staging: vt6655: Add missing blank lines after declarationsGuillaume Clement1-0/+3
This patch fixes the missing blank lines after declarations in vt6655 reported by checkpatch. Signed-off-by: Guillaume Clement <gclement@baobob.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: vt6655: fix sparse warning for static declarationsJames A Shackleford1-1/+2
This patch fixes the following sparse warnings: dpc.c:65:21: warning: symbol 'acbyRxRate' was not declared. Should it be static? dpc.c:272:9: warning: symbol 'MngWorkItem' was not declared. Should it be static? dpc.c:288:1: warning: symbol 'device_receive_frame' was not declared. Should it be static? Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15staging: vt6655: fix checkpatch bracing issuesGuido Martínez1-35/+31
This patchs fixes tons of warnings such as: WARNING: braces {} are not necessary for single statement blocks #354: FILE: drivers/staging/vt6655/wmgr.c:354: + for (ii = 0; ii < WLAN_BSSID_LEN; ii++) { + pMgmt->abyDesireBSSID[ii] = 0xFF; + } Please note: this patch only fixes bracing issues (and there is still a lot to do); so if you run checkpatch it _will_ throw a lot of errors. Use --test-only=braces Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-15staging: vt6655: remove dead codeGuido Martínez1-70/+6
Remove dead code in many places on this driver. Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: vt6655: 64 bit fixes TKIP mic correct sizeof long.Malcolm Priestley1-16/+16
Correct to endian base type __le32. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-08staging: vt6655: 64 bit fixes :TKIP mode micheal.c sizeof long.Malcolm Priestley1-2/+2
Fix MIC_vGetMIC and MIC_vInit to u32 Fix calling functions to u32 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10staging: vt6655: remove unneeded semicolonTeodora Baluta1-3/+3
This patch deletes any unneeded semicolons in driver vt6655 as detected by coccinelle. Signed-off-by: Teodora Baluta <teobaluta@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10staging: vt6655: delete explicit comparison to boolTeodora Baluta1-17/+17
This patch fixes the following type of coccinelle detected warnings for driver vt6655: WARNING: Comparison to bool Signed-off-by: Teodora Baluta <teobaluta@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17Staging: Convert uses of compare_ether_addr to ether_addr_equalJoe Perches1-3/+4
Preliminary to removing compare_ether_addr altogether: Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Additionally: Used is_zero_ether_addr, removed now unused variable Converted uses of &foo[0] to foo Done via cocci script: (and a little typing) $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25staging: vt6655: Remove unnecessary blank linesJoe Perches1-53/+0
Remove a bunch of useless vertical whitespace. Convert 3 or more consecutive newlines to 2. Remove blank lines after open brace and before close brace. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25staging: vt6655: Remove commented out if()sJoe Perches1-1/+0
Commented out code is just noise. Remove them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25staging: vt6655: Convert to kernel brace styleJoe Perches1-48/+24
Move braces around to be more kernel like. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25staging: vt6655: Remove commented out printksJoe Perches1-14/+1
These are just noise in the code so remove them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-18staging:vt6655:dpc: Whitespace cleanupsJoe Perches1-1220/+1220
Neatening only. git diff -w shows no differences. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04staging: "vt6655" Fix typos in comments.Justin P. Mattock1-1/+1
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09staging: vt6655: Remove all commented macrosMarcos Paulo de Souza1-1/+0
These macros were reported by forgotten-macros tool (https://github.com/marcosps/forgotten_macros). Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-08-23staging: vt6655: simplify MAC printing by using %pMAndy Shevchenko1-24/+6
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25staging: Remove unnecessary semicolons when if (foo) {...};Joe Perches1-5/+5
Done via perl script: $ cat remove_semi_if.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(if\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02Staging: vt6655: replace BOOL with in kernel boolCharles Clément1-24/+24
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>