aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_crypt_tkip.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-04-26staging: rtl8192e: Remove u16 cast for u16 return valueSolomon Tan1-1/+1
Remove explicit u16 cast of the function Mk16 return value. The variable hi does not need to be casted explicitly to u16 as it will already be casted implicitly. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220423130150.161903-8-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-20staging: rtl8192e: Remove space after castSolomon Tan1-19/+19
This patch addresses the checkpatch.pl flag that there should not be a space after a cast. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220419124318.8028-1-wjsota@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-22staging: rtl8192e: indent statement properlyIan Kewish1-1/+1
Indent statement in an else branch. Reported by checkpatch: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8) Signed-off-by: Ian Kewish <iankewish@gmail.com> Link: https://lore.kernel.org/r/20210415180645.65699-1-iankewish@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-25mm: remove kzfree() compatibility definitionEric Biggers1-1/+1
Commit 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()") renamed kzfree() to kfree_sensitive(), but it left a compatibility definition of kzfree() to avoid being too disruptive. Since then a few more instances of kzfree() have slipped in. Just get rid of them and remove the compatibility definition once and for all. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-09-11staging/rtl8192e: switch to RC4 library interfaceArd Biesheuvel1-58/+12
Switch to the ARC4 library interface, to remove the pointless dependency on the skcipher API, from which we will hopefully be able to drop ecb(arc4) skcipher support. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-05-07Merge tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-5/+1
Pull staging / IIO driver updates from Greg KH: "Here is the big staging and iio driver update for 5.2-rc1. Lots of tiny fixes all over the staging and IIO driver trees here, along with some new IIO drivers. The "counter" subsystem was added in here as well, as it is needed by the IIO drivers and subsystem. Also we ended up deleting two drivers, making this pull request remove a few hundred thousand lines of code, always a nice thing to see. Both of the drivers removed have been replaced with "real" drivers in their various subsystem directories, and they will be coming to you from those locations during this merge window. There are some core vt/selection changes in here, that was due to some cleanups needed for the speakup fixes. Those have all been acked by the various subsystem maintainers (i.e. me), so those are ok. We also added a few new drivers, for some odd hardware, giving new developers plenty to work on with basic coding style cleanups to come in the near future. Other than that, nothing unusual here. All of these have been in linux-next for a while with no reported issues, other than an odd gcc warning for one of the new drivers that should be fixed up soon" [ I fixed up the warning myself - Linus ] * tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (663 commits) staging: kpc2000: kpc_spi: Fix build error for {read,write}q Staging: rtl8192e: Remove extra space before break statement Staging: rtl8192u: ieee80211: Fix if-else indentation warning Staging: rtl8192u: ieee80211: Fix indentation errors by removing extra spaces staging: most: cdev: fix chrdev_region leak in mod_exit staging: wlan-ng: Fix improper SPDX comment style staging: rtl8192u: ieee80211: Resolve ERROR reported by checkpatch staging: vc04_services: bcm2835-camera: Compress two lines into one line staging: rtl8723bs: core: Use !x in place of NULL comparison. staging: rtl8723bs: core: Prefer using the BIT Macro. staging: fieldbus: anybus-s: fix wait_for_completion_timeout return handling staging: kpc2000: fix up build problems with readq() staging: rtlwifi: move remaining phydm .h files staging: rtlwifi: strip down phydm .h files staging: rtlwifi: delete the staging driver staging: fieldbus: anybus-s: rename bus id field to avoid confusion staging: fieldbus: anybus-s: keep device bus id in bus endianness Staging: sm750fb: Change *array into *const array staging: rtl8192u: ieee80211: Fix spelling mistake staging: rtl8192u: ieee80211: Replace bit shifting with BIT macro ...
2019-04-25crypto: shash - remove shash_desc::flagsEric Biggers1-1/+0
The flags field in 'struct shash_desc' never actually does anything. The only ostensibly supported flag is CRYPTO_TFM_REQ_MAY_SLEEP. However, no shash algorithm ever sleeps, making this flag a no-op. With this being the case, inevitably some users who can't sleep wrongly pass MAY_SLEEP. These would all need to be fixed if any shash algorithm actually started sleeping. For example, the shash_ahash_*() functions, which wrap a shash algorithm with the ahash API, pass through MAY_SLEEP from the ahash API to the shash API. However, the shash functions are called under kmap_atomic(), so actually they're assumed to never sleep. Even if it turns out that some users do need preemption points while hashing large buffers, we could easily provide a helper function crypto_shash_update_large() which divides the data into smaller chunks and calls crypto_shash_update() and cond_resched() for each chunk. It's not necessary to have a flag in 'struct shash_desc', nor is it necessary to make individual shash algorithms aware of this at all. Therefore, remove shash_desc::flags, and document that the crypto_shash_*() functions can be called from any context. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-04-03staging: rtl8192e: add proper SPDX identifiers on files that did not have them.Greg Kroah-Hartman1-5/+1
There were a few files for the rtl8192e driver that did not have SPDX identifiers on them, so fix that up. At the same time, remove the "free form" text that specified the license of the file, as that is impossible for any tool to properly parse. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8192e: fix various indentation issuesColin Ian King1-1/+1
There are several statements that have indentation issues, fix these. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28lib80211: Remove VLA usage of skcipherKees Cook1-18/+16
In the quest to remove all stack VLA usage from the kernel[1], this replaces struct crypto_skcipher and SKCIPHER_REQUEST_ON_STACK() usage with struct crypto_sync_skcipher and SYNC_SKCIPHER_REQUEST_ON_STACK(), which uses a fixed stack size. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Cc: Johannes Berg <johannes@sipsolutions.net> Cc: linux-wireless@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-07-29staging: rtl8192e: ieee80211: Convert from ahash to shashKees Cook1-28/+28
This is an identical change to the wireless/lib80211 of the same name. In preparing to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct shash. By removing a layer of indirection this both improves performance and reduces stack usage. The stack allocation will be made a fixed size in a later patch to the crypto subsystem. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-17Merge tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-2/+1
Pull staging driver updates from Greg KH: "Here is the big staging driver pull request for 4.6-rc1. Lots of little things here, over 1600 patches or so. Notable is all of the good Lustre work happening, those developers have finally woken up and are cleaning up their code greatly. The Outreachy intern application process is also happening, which brought in another 400 or so patches. Full details are in the very long shortlog. All of these have been in linux-next with no reported issues" * tag 'staging-4.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1673 commits) staging: lustre: fix aligments in lnet selftest staging: lustre: report minimum of two buffers for LNet selftest load test staging: lustre: test for proper errno code in lstcon_rpc_trans_abort staging: lustre: filter remaining extra spacing for lnet selftest staging: lustre: remove extra spacing when setting variable for lnet selftest staging: lustre: remove extra spacing of variable declartions for lnet selftest staging: lustre: fix spacing issues checkpatch reported in lnet selftest staging: lustre: remove returns in void function for lnet selftest staging: lustre: fix bogus lst errors for lnet selftest staging: netlogic: Replacing pr_err with dev_err after the call to devm_kzalloc staging: mt29f_spinand: Replacing pr_info with dev_info after the call to devm_kzalloc staging: android: ion: fix up file mode staging: ion: debugfs invalid gfp mask staging: rts5208: Replace pci_enable_device with pcim_enable_device Staging: ieee80211: Place constant on right side of the test. staging: speakup: Replace del_timer with del_timer_sync staging: lowmemorykiller: fix 2 checks that checkpatch complained staging: mt29f_spinand: Drop void pointer cast staging: rdma: hfi1: file_ops: Replace ALIGN with PAGE_ALIGN staging: rdma: hfi1: driver: Replace IS_ALIGNED with PAGE_ALIGNED ...
2016-03-11staging: rtl8192e: rtllib_crypt_tkip: Remove unnecessary else after returnBhaktipriya Shridhar1-2/+1
This patch fixes the checkpatch warning that else is not generally useful after a break or return. This was done using Coccinelle: @@ expression e2; statement s1; @@ if(e2) { ... return ...; } -else s1 Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-01-27staging: rtl8192e: Replace uses of obsolete blkcipher and hashHerbert Xu1-45/+54
The interfaces blkcipher and hash are obsolete. This patch replaces them with skcipher and ahash respectively. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: rtl8192e: Fix PREFER_PR_LEVEL warningsMateusz Kulikowski1-36/+31
Fix most of remaining PREFER_PR_LEVEL warnings in rtllib. Replace printk() with netdev_* if possible, pr_* in other cases. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: rtl8192e: Fix PREFER_ETHER_ADDR_COPY warningsMateusz Kulikowski1-9/+10
Replace memcpy() with ether_addr_copy() where possible to make checkpatch.pl happy. Change was target tested (download 1Mb file over WPA2 network) with BUG trap for unaligned addresses in ether_addr_copy() Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01staging: rtl8192e: Make ethernet addresses properly alignedMateusz Kulikowski1-1/+2
Reorder ethernet addresses allocated on stack or in non-packed structures to keep them aligned(2). Use ETH_ALEN as array length in places where it was hardcoded to 6. Alignment verified using pahole where possible and target-tested with BUG_ON() trap in ether_addr_copy. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: rtl8192e: Comment cleanup (style/format)Mateusz Kulikowski1-5/+10
- Multiline comments use "network subsystem comment style" - Merge short multiline comments - Remove empty comments - Remove function name comment at the end of small (<1 screen) functions - Reformat 802.11 data frame format to use spaces and network format Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: rtl8192e: fix coding style warnings (printk -> netdev_*)Mateusz Kulikowski1-2/+2
Use netdev_*, dev_* or pr_* instead of printk where possible. KERN_DEBUG messages are left intact as pr_dbg has different behaviour. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20staging: rtl8192e: fix coding style issues (merge broken strings)Mateusz Kulikowski1-31/+31
Fix checkpatch.pl warnings: - 'WARNING: quoted string split across lines' - 'WARNING: break quoted strings at a space character' Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30staging: rtl8192e: fixed coding style issuesMatthew Casey1-0/+5
Fixed missing blank line after declarations issues Signed-off-by: Matthew Casey <mdcasey@chabloom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-09Staging rtl8192e: Fixing checkpatch error in rtllib_crypt_tkip.cAndreas Frembs1-1/+1
In rtllib_crypt_tkip.c we fixed the following checkpatch error: ERROR: space required after that ',' Signed-off-by: Andreas Frembs <andreas.frembs@studium.uni-erlangen.de> Signed-off-by: Matthias Schoepe <matthias.schoepe@studium.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_crypt_tkip.cRashika Kheria1-2/+2
This patch fixes the following Sparse warnings in rtllib_crypt_tkip.c- drivers/staging/rtl8192e/rtllib_crypt_tkip.c:755:12: warning: symbol 'rtllib_crypto_tkip_init' was not declared. Should it be static? drivers/staging/rtl8192e/rtllib_crypt_tkip.c:761:13: warning: symbol 'rtllib_crypto_tkip_exit' was not declared. Should it be static? Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10Staging: rtl8192e: Fix Sparse warning of cast to restricted __le16 in rtllib_crypt_tkip.cRashika Kheria1-1/+1
This patch fixes the following Sparse warnings in rtllib_crypt_tkip.c- drivers/staging/rtl8192e/rtllib_crypt_tkip.c:176:16: warning: cast to restricted __le16 Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-29hostap: Don't use create_proc_read_entry()David Howells1-22/+22
Don't use create_proc_read_entry() as that is deprecated, but rather use proc_create_data() and seq_file instead. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> cc: Jouni Malinen <j@w1.fi> cc: John W. Linville <linville@tuxdriver.com> cc: Johannes Berg <johannes@sipsolutions.net> cc: linux-wireless@vger.kernel.org cc: netdev@vger.kernel.org cc: devel@driverdev.osuosl.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-12-22staging/rtl8192e: Register against lib80211Sean MacLennan1-3/+3
Convert rtllib from registering the crypt drivers against rtllib_crypt and instead register the against lib80211. The crypto functions have R- prepended (R-CCMP, R-TKIP, R-WEP) so they will not clash with the lib80211 versions. We cannot use the lib80211 crypt drivers since the rtl8192e has some hardware support that is not handled by the lib80211 crypt drivers. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_opsSean MacLennan1-11/+8
Convert rtllib_crypt_data to lib80211_crypt_data and rtllib_crypt_ops to lib80211_crypt_ops. This is almost a 1:1 replacement, only extra_prefix_len and extra_postfix_len changed. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-13staging: remove version.h includes in rtl8192eDevendra Naga1-1/+0
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30rtl8192e: Split the driver upSean MacLennan1-5/+4
This patch splits the current r8192e_pci driver up into six different drivers: rtllib, rtllib_crypt, rtllib_crypt_ccmp, rtllib_crypt_tkip, rtllib_crypt_wep, and r8192e_pci. Now that they are proper modules, the init and exit functions do not need to be called directly. Also, the rtllib_*_null functions are not needed since they will be loaded on demand. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26staging: rtl8192e: Use kzalloc rather than kmalloc v2Thomas Meyer1-2/+1
Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: rtl8192e: Remove MAC_FMT and MAC_ARG for %pMLarry Finger1-11/+10
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XILarry Finger1-60/+64
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-24staging: rtl8192e: Convert typedef cb_desc to struct cb_descLarry Finger1-2/+2
Remove typedef from struct. Rename struct. Rename uses. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23staging: rtl8192e: Remove code dependent of JOHN_DUMPLarry Finger1-11/+0
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23rtl8192e: Remove WIRELESS_EXT macro checksMike McCormack1-24/+0
Signed-off-by: Mike McCormack <mikem@ring3k.org>
2011-08-23rtl8192e: Remove extra ifdefsMike McCormack1-187/+2
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Mike McCormack <mikem@ring3k.org>
2011-08-23From: wlanfae <wlanfae@realtek.com>Larry Finger1-0/+992
[PATCH 1/8] rtl8192e: Import new version of driver from realtek Signed-off-by: wlanfae <wlanfae@realtek.com> Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> ---