1
0
Fork 0
Commit Graph

1166 Commits (192a3697600382c5606fc1b2c946e737c5450f88)

Author SHA1 Message Date
Christophe JAILLET 84b79c4853 staging: rtl8192u: Do not use GFP_KERNEL in atomic context
[ Upstream commit acac75bb45 ]

'rtl8192_irq_rx_tasklet()' is a tasklet initialized in
'rtl8192_init_priv_task()'.
>From this function it is possible to allocate some memory with the
GFP_KERNEL flag, which is not allowed in the atomic context of a tasklet.

Use GFP_ATOMIC instead.

The call chain is:
  rtl8192_irq_rx_tasklet            (in r8192U_core.c)
    --> rtl8192_rx_nomal            (in r8192U_core.c)
      --> ieee80211_rx              (in ieee80211/ieee80211_rx.c)
        --> RxReorderIndicatePacket (in ieee80211/ieee80211_rx.c)

Fixes: 79a5ccd972 ("staging: rtl8192u: fix large frame size compiler warning")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/20200813173458.758284-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:57:36 +01:00
Colin Ian King 2698fab038 staging: rtl8192u: fix a dubious looking mask before a shift
[ Upstream commit c4283950a9 ]

Currently the masking of ret with 0xff and followed by a right shift
of 8 bits always leaves a zero result.  It appears the mask of 0xff
is incorrect and should be 0xff00, but I don't have the hardware to
test this. Fix this to mask the upper 8 bits before shifting.

[ Not tested ]

Addresses-Coverity: ("Operands don't affect result")
Fixes: 8fc8598e61 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200716154720.1710252-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:16:13 +02:00
Navid Emamdoost 29d575fe17 staging: rtl8192u: fix multiple memory leaks on error path
[ Upstream commit ca312438cf ]

In rtl8192_tx on error handling path allocated urbs and also skb should
be released.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20190920025137.29407-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-31 16:43:10 +01:00
Stephen Brennan a1617c8c3d staging: rtl8192u: Fix indentation
Checkpatch reports WARNING:SUSPECT_CODE_INDENT in several places. Fix
this by aligning code properly with tabs.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190828043542.3753-1-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-28 22:22:13 +02:00
Sumera Priyadarsini 48d911f29e staging: rtl8192u: Add or remove blank lines as required
This patch fixes the file r8190_rtl8256.c to avoid the following
checkpatch.pl warnings:
	CHECK: Blank lines aren't necessary before a close brace '}'
	CHECK: Please use a blank line after function/struct/union/enum declarations
	CHECK: Please don't use multiple blank line

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190826182227.30738-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27 19:01:26 +02:00
Sumera Priyadarsini 8c10170fe1 staging: rtl8192u: Add or remove spaces to fix style issues
This patch fixes the file r8190_rtl8256.c to avoid the following
checkpatch.pl warnings:
	CHECK: spaces preferred around that '<<' (ctx:VxV)
	CHECK: spaces preferred around that '-' (ctx:VxV)
	CHECK: No space is necessary after a cast

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190826180909.27775-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-27 19:01:26 +02:00
Sumera Priyadarsini cadcc6b20d staging: rtl8192u: Add space around binary operators
This patch fixes the file r8180_93cx6.c to avoid the checkpatch.pl warnings:

	CHECK: spaces preferred around that '<<' (ctx:VxV)
	CHECK: spaces preferred around that '-' (ctx:VxV)

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190822193535.14357-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25 10:27:39 +02:00
Stephen Brennan 684c215dd0 staging: rtl8192u: remove code under TO_DO_LIST
Several blocks of code are guarded by #ifdef TO_DO_LIST. If this is
defined, compilation fails. No machinery exists to define this, and no
documenation on the in-progress feature exists. Since this code is dead,
let's delete it.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190823162410.10038-1-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25 10:27:39 +02:00
Sumera Priyadarsini 76fe9cfb09 staging: rtl8192u: Remove unnecessary blank lines
This patch fixes the file r8180_93cx6.c to avoid the checkpatch.pl warning:

	CHECK: Please don't use multiple blank lines

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20190822145545.19894-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25 10:27:14 +02:00
Colin Ian King 5e718a12e1 staging: rtl8192u: remove redundant assignment to pointer crypt
The pointer crypt is being set with a value that is never read,
the assignment is redundant and hence can be removed.

Thanks to Dan Carpenter for sanity checking that this was indeed
redundant.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20190822084609.8971-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-25 10:24:46 +02:00
Stephen Brennan f401441ded staging: rtl8192u: fix spacing in ieee80211
Checkpatch emits several errors, warnings, and checks about spacing.
Apply checkpatch's suggested spacing rules.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190821143540.4501-4-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21 09:20:23 -07:00
Stephen Brennan 2b1d4c425a staging: rtl8192u: fix macro alignment in ieee80211
Several macros display unaligned, due to mixes of tabs and spaces. These
can be fixed by making spacing consistent, do this.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190821143540.4501-3-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21 09:20:20 -07:00
Stephen Brennan ee16d7d3e0 staging: rtl8192u: fix OPEN_BRACE errors in ieee80211
Checkpatch emits several errors regarding braces being on the incorrect
line. These can be fixed by moving the brace, do this. In a few cases,
some comments were moved to facilitate this.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190821143540.4501-2-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21 09:16:32 -07:00
YueHaibing 68772c84f7 staging: rtl8192u: ieee80211: remove set but not used variable 'data_len'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:
 In function ieee80211_ccmp_encrypt:
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_ccmp.c:162:6:
 warning: variable data_len set but not used [-Wunused-but-set-variable]

It is not used since commit eb0e7bf3ca ("staging:
rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190821122250.71404-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-21 09:15:43 -07:00
Christina Quast eb0e7bf3ca staging: rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Use crypto API ccm(aes)
Use ccm(aes) aead transform instead of invoking the AES block cipher
block by block.

Signed-off-by: Christina Quast <contact@christina-quast.de>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Link: https://lore.kernel.org/r/20190816065936.12214-2-contact@christina-quast.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-18 08:51:11 +02:00
Colin Ian King 7d5e9e350e staging: rtl8192u: fix up indentation of a statement
There is a statement that is indented one level too deeply, remove
the extraneous tab.

Addresses-Coverity: ("Identation does not match nesting level")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190815084034.13885-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-15 14:20:31 +02:00
Stephen Brennan 1aee09b8fa staging: rtl8192u: fix spacing errors
Used checkpatch's --fix-inplace option for types SPACING, OPEN_BRACE,
ELSE_AFTER_BRACE. Manually edited the resulting changes to correct for
mistaken fixes and complete fixes that were only partially applied.

Signed-off-by: Stephen Brennan <stephen@brennan.io>
Link: https://lore.kernel.org/r/20190811225120.7308-1-stephen@brennan.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12 16:41:37 +02:00
Navid Emamdoost 09acf29c82 staging: rtl8192u: null check the kzalloc
In rtl8192_init_priv_variable allocation for priv->pFirmware may fail,
so a null check is necessary.priv->pFirmware is accessed later in
rtl8192_adapter_start. I added the check and made appropriate changes
to propagate the errno to the caller.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>

Link: https://lore.kernel.org/r/20190731141925.29268-1-navid.emamdoost@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-01 18:38:08 +02:00
J. Bruce Fields e59fc52529 staging: rtl8192*: display ESSIDs using %pE
Everywhere else in the kernel ESSIDs are printed using %pE, and I can't
see why there should be an exception here.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Link: https://lore.kernel.org/r/1562799574-13315-1-git-send-email-bfields@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25 14:38:52 +02:00
Colin Ian King 4b2c85cacd drivers/staging/rtl8192u: fix indentation issue, remove extra tab
A statement is indented one level too deeply; clean this up by
removing a tab.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190723145022.11608-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25 09:58:26 +02:00
Nishka Dasgupta feb20855a3 staging: rtl8192u: Replace function rtl8192_rx_enable()
Remove function rtl8192_rx_enable as all it does is call
rtl8192_rx_initiate.
Rename rtl8192_rx_initiate to rtl8192_rx_enable and change its type from
static to non-static to maintain compatibility with call sites of
rtl8192_rx_enable.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190701091552.12696-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:32:09 +02:00
Christian Müller 0dbc8368ed drivers/staging/rtl8192u: style nonstyled comments
The coding-styles.rst states, that multiline comments should
allways contain a leading "*" in each line.
For multiline comments in general they

/*
 * should look
 * like this.
 */

For multiline comments in either net/ or drivers/net/ however,
they should

/* omit
 * the first
 * empty line.
 */

Since this file is part of a networking driver, the goal for it would
be to reside in drivers/net/ one day.

This patch changes comments, that were in neither form of the two listed
above, to have the style that is specified for drivers/net/.

Signed-off-by: Christian Müller <muellerch-privat@web.de>
Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
Link: https://lore.kernel.org/r/20190701082707.25198-2-muellerch-privat@web.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:32:09 +02:00
Christian Müller d8718e45e2 drivers/staging/rtl8192u: drop first comment line
As stated in coding-styles.rst multiline comments should be structured in a way,
that the actual comment starts on the second line of the commented portion. E.g:

/*
 * Multiline comments
 * should look like
 * this.
 */

However, there is an exception to files in drivers/net/ and net/, where
multiline comments are prefered to look like this:

/* Mutliline comments for
 * drivers/net/ should look
 * like this.
 */

The comments in this file initially looked like the first example.
But since this file is part of a networking driver and thus should
be moved to drivers/net/ one day, this patch adjusts the comments
such that they are fitting to the style imposed for drivers/net/.

Signed-off-by: Christian Müller <muellerch-privat@web.de>
Signed-off-by: Felix Trommer <felix.trommer@hotmail.de>
Link: https://lore.kernel.org/r/20190701082707.25198-1-muellerch-privat@web.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-03 18:32:09 +02:00
Nishka Dasgupta 3ac7843e12 staging: rtl8192u: Remove function dm_backup_dynamic_mechanism_state()
Remove unused function dm_backup_dynamic_mechanism_state.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:11:23 +02:00
Nishka Dasgupta e6e70326d6 staging: rtl8192u: Change type of rtl8192_rx_initiate()
Change type of function rtl8192_rx_initiate from int to void as it
always returns 0 and this value is never used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 09:11:23 +02:00
Hariprasad Kelam 1011f2b09a staging: rtl8192u: ieee80211: Remove redundant memset
alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:15 +02:00
Nathan Chancellor e6e0a03574 staging: rtl8192u: Remove an unnecessary NULL check
Clang warns:

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2663:47: warning:
address of array 'param->u.wpa_ie.data' will always evaluate to 'true'
[-Wpointer-bool-conversion]
            (param->u.wpa_ie.len && !param->u.wpa_ie.data))
                                    ~~~~~~~~~~~~~~~~~^~~~

This was exposed by commit deabe03523 ("Staging: rtl8192u: ieee80211:
Use !x in place of NULL comparisons") because we disable the warning
that would have pointed out the comparison against NULL is also false:

drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2663:46: warning:
comparison of array 'param->u.wpa_ie.data' equal to a null pointer is
always false [-Wtautological-pointer-compare]
            (param->u.wpa_ie.len && param->u.wpa_ie.data == NULL))
                                    ~~~~~~~~~~~~~~~~^~~~    ~~~~

Remove it so clang no longer warns.

Link: https://github.com/ClangBuiltLinux/linux/issues/487
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-22 14:45:36 +02:00
Puranjay Mohan 3cc7037b43 Staging: rtl8192u: ieee80211: Replace function names in strings with "%s", __func__
Use "%s", __func__ in place of strings which contain function names.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-22 14:32:40 +02:00
Puranjay Mohan a7bfc177d8 Staging: rtl8192u: ieee80211: Fix if-else coding style issue
Fix following checkpatch.pl warning by adding braces around if
statement:
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 08:16:40 +02:00
Puranjay Mohan deabe03523 Staging: rtl8192u: ieee80211: Use !x in place of NULL comparisons
Fix the following checkpatch.pl warning :
CHECK: Comparison to NULL could be written "!x"
by changing (x == NULL) to !x and (x != NULL) to x.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20 09:31:46 +02:00
Puranjay Mohan c3fb338afa Staging: rtl8192u: ieee80211: Fix coding style issues related to if else
Fix positions of braces for if-else statements.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20 07:40:43 +02:00
Puranjay Mohan 5ba1a1dae3 Staging: rtl8192u: ieee80211: Use !x in place of NULL comparison
Fix comparison to NULL, chang to !x operation.
Issue found using checkpatch.pl

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20 07:40:42 +02:00
Puranjay Mohan c61ec9e618 Staging: rtl8192u: ieee80211: Add spaces around '&&' operator
Fix coding style errors by adding spaces around '&&' operators.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20 07:40:42 +02:00
Puranjay Mohan d542d407cd Staging: rtl8192u: ieee80211: Fix coding style errors
Fix coding style errors related to braces for if-else statements.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20 07:40:41 +02:00
Puranjay Mohan d310c5a1cc Staging: rtl8192u: ieee80211: Fix spelling mistake
Correct spelling mistakes at two places in comments.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20 07:40:41 +02:00
Puranjay Mohan 8b0c4a7ca1 Staging: rtl8192u: ieee80211: Fix coding style warning
Remove braces around a single if statement to fix following
checkpatch.pl warning.
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20 07:40:41 +02:00
Linus Torvalds e0dccbdf5a Staging / IIO driver patches for 5.2-rc1
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.
 
 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.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXNHGMQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynQRACgwtlC6DFsEFwCplYxQXP5uzuIVTMAoJ61xzC0
 Qim7K31f5ulaa3GJuhzo
 =zEY5
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

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-05-07 13:31:29 -07:00
Puranjay Mohan eca4e5f58b Staging: rtl8192u: ieee80211: Fix if-else indentation warning
Add tabs after if and else statements to
fix the following warnings from checkpatch.pl

WARNING: suspect code indent for conditional statements (8, 8)
+	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
+	pBA->param_set.field.buffer_size = 1;

WARNING: suspect code indent for conditional statements (8, 8)
+	else
+	pBA->param_set.field.buffer_size = 32;

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02 19:43:18 +02:00
Puranjay Mohan 922fe878c7 Staging: rtl8192u: ieee80211: Fix indentation errors by removing extra spaces
Remove extra spaces before statements to fix
following indentation warnings reported by checkpatch.pl.

WARNING: Statements should start on a tabstop
+	 struct rtl_80211_hdr_3addr *delba = NULL;

WARNING: Statements should start on a tabstop
+	 struct rtl_80211_hdr_3addr *rsp = NULL;

WARNING: Statements should start on a tabstop
+	 struct rtl_80211_hdr_3addr *req = NULL;

WARNING: Statements should start on a tabstop
+	 struct rtl_80211_hdr_3addr *Delba = NULL;

WARNING: Statements should start on a tabstop
+	 struct rtl_80211_hdr_3addr *BAReq = NULL;

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-02 19:43:18 +02:00
Vandana BN 0580db2cb6 staging: rtl8192u: ieee80211: Resolve ERROR reported by checkpatch
This patch resolves coding style space ERRORs reported by checkpatch

ERROR: spaces required around that '>' (ctx:VxV)
ERROR: space required after that ',' (ctx:VxO)
ERROR: space required before that '&' (ctx:OxV)
ERROR: spaces required around that '!=' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxW)
ERROR: space required before the open parenthesis '('
ERROR: spaces required around that '?' (ctx:VxE)
ERROR: spaces required around that ':' (ctx:VxE)
ERROR: spaces required around that '==' (ctx:VxV)
Signed-off-by: Vandana BN <bnvandana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-01 18:18:03 +02:00
Vatsala Narang 41dff4d6b8 staging: rtl8192u: ieee80211: Fix spelling mistake
Replace explicitely with explicitly to get rid of checkpatch warning.

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-30 15:03:42 +02:00
Vatsala Narang 8dd4305041 staging: rtl8192u: ieee80211: Replace bit shifting with BIT macro
Change suggested by coccinelle.

Replace bit shifting on 1 with the BIT(x) macro.
Coccinelle script:

@@
expression c;
@@

-(1 << c)
+BIT(c)

Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-30 15:03:42 +02:00
Eric Biggers 877b5691f2 crypto: shash - remove shash_desc::flags
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-25 15:38:12 +08:00
Caio Salvador Rohwedder cd62878c9d staging: rtl8192u: ieee80211: add space around '==' and before '('
Fix checkpatch coding style errors on rtl819x_TSProc.c
- space required before the open parenthesis '('
- spaces required around that '=='

Signed-off-by: Caio Salvador Rohwedder <caiosalvador96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Gabriel Siqueira 9e6aac6796 staging: rtl8192u: Add missing space
Fix checkpatch error: "ERROR: space required after that close brace '}'".

Signed-off-by: Gabriel Siqueira <gabriel.gabrielhs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16 13:31:58 +02:00
Greg Kroah-Hartman 21baa36d92 staging: rtl8192u: add proper SPDX identifiers on files that did not have them.
There were a few files for the rtl8192u 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.

Cc: John Whitmore <johnfwhitmore@gmail.com>
Cc: Bhanusree Pola <bhanusreemahesh@gmail.com>
Cc: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Cc: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 11:10:17 +02:00
Greg Kroah-Hartman 99b75a4e32 staging: add missing SPDX lines to Kconfig files
There are a few remaining drivers/staging/*/Kconfig files that do not
have SPDX identifiers in them.  Add the correct GPL-2.0 identifier to
them to make scanning tools happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 11:10:15 +02:00
Payal Kshirsagar 37b299c7c4 staging: rtl8192u: ieee80211: ieee80211_crypt_tkip.c: Replace bit shifting with BIT macro
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02 19:57:11 +02:00
Payal Kshirsagar 9f383969ae staging: rtl8192u: ieee80211: ieee80211_crypt_ccmp.c: Replace bit shifting with BIT macro
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02 19:57:11 +02:00
Payal Kshirsagar 9361076277 staging: rtl8192u: ieee80211: ieee80211_rx.c: Replace bit shifting with BIT macro
Challenge suggested by coccinelle.
Prefer using BIT and replace bit shifting with the BIT(x) macro.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02 19:57:10 +02:00