Commit graph

599 commits

Author SHA1 Message Date
Greg Kroah-Hartman
a4961427e7 Revert "staging: ks7010: Fix build error"
This reverts commit 3e5bc68fa5 as it
causes build errors in linux-next.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-24 16:45:34 +08:00
YueHaibing
3e5bc68fa5 staging: ks7010: Fix build error
when CRYPTO is m and KS7010 is y, building fails:

drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13':
ks_hostif.c:(.text+0x560): undefined reference to `crypto_alloc_shash'
ks_hostif.c:(.text+0x580): undefined reference to `crypto_shash_setkey'
ks_hostif.c:(.text+0x5e0): undefined reference to `crypto_destroy_tfm'
ks_hostif.c:(.text+0x614): undefined reference to `crypto_shash_update'
ks_hostif.c:(.text+0x62c): undefined reference to `crypto_shash_update'
ks_hostif.c:(.text+0x648): undefined reference to `crypto_shash_finup'

Add CRYPTO and CRYPTO_HASH dependencies to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 8b523f2041 ("staging: ks7010: removed custom Michael MIC implementation.")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:46:17 +02:00
Nishka Dasgupta
0fce66606e staging: ks7010: Remove initialisation in ks7010_sdio.c
As the initial value of the return variable result is never used, it can
be removed.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 14:09:46 -07:00
Nishka Dasgupta
6ef7eef929 staging: ks7010: Merge multiple return variables in ks_hostif.c
The function hostif_data_request had two return variables, ret and
result. When ret is assigned a value, in all cases (except one) this
assignment is followed immediately by a goto to the end of the
function. In the last case, the goto takes effect only if ret < 0;
however, if ret >= 0 then this value of ret is not needed in the
remainder of that branch. On the other hand result is used (assigned a
value and returned) only in those branches where ret >= 0 or ret has
not been used at all.
As the values of ret and result are not both required at the same point
in any branch, result can be removed and its occurrences replaced with
ret.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 14:09:46 -07:00
Nishka Dasgupta
a7048b38ae staging: ks7010: Remove initialisation in ks_hostif.c
The initial value of return variable result is never used, so it can be
removed.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30 14:09:46 -07: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
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
Greg Kroah-Hartman
97ed8eab2a staging: add missing SPDX lines to Makefile files
There are a few remaining drivers/staging/*/Makefile files that do not
have SPDX identifiers in them.  Add the correct GPL-2.0 identifier to
them to make scanning tools happy.

Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 11:10:15 +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
Colin Ian King
7d6009f282 staging: ks7010: remove redundant auth_type check
The range check on auth_type is redundant as there is a prior
check on the auth_type values and the only way the block is entered
is if auth_type is one of TYPE_PMK1, TYPE_GMK1 and TYPE_GMK2. Hence
the auth_type check can be removed.

Detected by static analysis with cppcheck.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19 14:31:39 +01:00
Wentao Cai
08b9bee66e Staging: ks7010: Replace typecast to int
This patch fixes the checkpatch.pl warning:
WARNING: Unnecessary typecast of c90 int constant

Signed-off-by: Wentao Cai <etsai042@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-01 09:05:01 +01:00
Jeremy Sowden
8b523f2041 staging: ks7010: removed custom Michael MIC implementation.
Changed the driver to use the kernel's own implementation.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28 19:14:53 +01:00
Bhanusree Pola
13a7287edb Staging: ks7010: Match alignments with open parenthesis
Adjust parameters of "netdev_dbg" to match alignment with
open parenthesis.
Issue found using checkpatch.pl

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26 11:46:51 +01:00
Matt McCoy
45a50ab1d6 staging: ks7010: remove unnecessary parentheses
Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Matt McCoy <mattmccoy110@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-25 09:52:01 +01:00
Jeeeun Evans
dca6eaa8a2 staging: ks7010: remove unnecessary blank line
Cleanup extra line found by checkpatch.pl

Signed-off-by: Jeeeun Evans <jeeeunevans@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:35:10 +01:00
Maya Nakamura
8b8429b000 staging: ks7010: Remove extra blank line
Remove extra blank line. Issue found by checkpatch.pl.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Vaishali Thakkar <vthakkar@vaishalithakkar.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-19 21:10:45 +02:00
Aymen Qader
e7f8f1df63 staging: ks7010: Remove unnecessary null check
Remove the unnecessary socket buffer null check in hostif_data_request.
There is already an appropriate null check in the calling function:

(ks_wlan_net.c) ks_wlan_start_xmit

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:19:19 -07:00
Greg Kroah-Hartman
c88b94a9f4 Merge 4.18-rc7 into staging-next
We want the staging changes in here for testing and merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 10:13:15 +02:00
Sergio Paracuellos
eb37430d40 staging: ks7010: call 'hostif_mib_set_request_int' instead of 'hostif_mib_set_request_bool'
'hostif_mib_set_request_bool' function receives a bool as value and
send the received value with MIB_VALUE_TYPE_BOOL type. There is
one case where the value passed is not a boolean one but
'MCAST_FILTER_PROMISC' which is '2'. Call hostif_mib_set_request_int
instead for related multicast enumeration. This changes original
code behaviour but seems to be the right way to do this.

Fixes: 8ce76bff0e ("staging: ks7010: add new helpers to achieve mib set request and simplify code")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16 10:04:11 +02:00
Colin Ian King
15fc3e4a08 staging: ks7010: remove redundant variable eth_proto
Variable eth_proto is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'eth_proto' 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>
2018-07-11 13:12:34 +02:00
Sergio Paracuellos
b2d187cc76 staging: ks7010: avoid casting inside cpu_to_* assignments
cpu_to_*() functions already have a cast to u* built in,
so the cast is never required. Review and remove all of
them along the code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-20 14:47:14 +02:00
Nathan Chancellor
4a06e6fb97 staging: ks7010: Remove unused define
After commit 6d6612deaf ("staging: ks7010: Remove unnecessary limit
checks"), this define is not used anywhere. Remove it as well.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-15 09:31:38 +02:00
Sergio Paracuellos
b736906657 staging: ks7010: replace cast type in assignment in hostif_sme_set_pmksa
There is an assignment inside hostif_sme_set_pmksa function
which is being used together with cpu_to_le16 using uint16_t as cast
type. Replace it to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
88c8016232 staging: ks7010: use 'u16' for casts in assignments in hostif_sme_set_rsn
There are some assignments inside hostif_sme_set_rsn function
which are being used together with cpu_to_le16 using uint16_t
as cast type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
14b61a5205 staging: ks7010: change two parameter types in hostif_mic_failure_request
Parameters 'failure_count' and 'timer' was declared as unsigned
short and then there was being casted to u16 inside cpu_to_le16
to make the assignation. Just declare them as 'u16' and avoid
casting at all.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
dea2f1fb84 staging: ks7010: replace uint* type into the u* ones in hostif_bss_scan_request
In function hostif_bss_scan_request parameters 'scan_ssid' and
'scan_ssid_len' are declared as uint8_t. Change them to be 'u8'
instead which is preferred. Also update two casts inside the same
function to use 'u32' instead of 'uint32_t'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
9a1420e7a5 staging: ks7010: replace cast types in assignments in hostif_phy_information_request
There are some assignments inside hostif_phy_information_request
function which are being used together with cpu_to_le16 using
uint16_t as cast type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
bcbd1f1841 staging: ks7010: replace cast type in assignment in hostif_adhoc_set_request
There is an assignment inside hostif_adhoc_set_request function
which is being used together with cpu_to_le16 using uint16_t as cast
type. Replace it to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
78e2417181 staging: ks7010: replace cast type in assignments in hostif_infrastructure_set_request
There are some assignments inside hostif_infrastructure_set_request
function which are being used together with cpu_to_le16 using
uint16_t as cast type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
889d706330 staging: ks7010: use u16 as type for casting in hostif_ps_adhoc_set_request
There is an assignment inside hostif_ps_adhoc_set_request function
which is being used together with cpu_to_le16 using uint16_t as cast
type. Replace it to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:07 +02:00
Sergio Paracuellos
22bef06649 staging: ks7010: replace casts to use type u16 in init_request
There are soem assignments inside init_request function which
are being used together with cpu_to_le16 using uint16_t as cast
type. Replace all of them to use 'u16' instead.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
5503fd5afd staging: ks7010: use u16 as cast type in hostif_start_request
Use u16 as cast type in hostif_start_request function replacing
uint16_t which was being used.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
f7761114be staging: ks7010: avoid no needed cast in ks_wlan_cap
In ks_wlan_cap there is a cast to uint16_t to use cpu_to_le16
with variable 'capability' which is already defined as u16.
Avoid this cast to clean code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
81ad5837d0 staging: ks7010: change parameter type in hostif_mib_get_request
Second parameter 'mib_attribute' in function hostif_mib_get_request
is declared as unsigned long and inside the function a cast to uint32_t
is being used. Just pass a u32 instead and avoid the casting.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
521d3f26bc staging: ks7010: change some cast type from uint16_t to u16 in hostif_data_request
There are some castings inside the function hostif_data_request
which are being using with uint16_t type. Fields which have being
assigned are declared as u16. So update casts types to u16 in all
of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
bc0b3f43ca staging: ks7010: use u16 as type for casting in hostif_data_indication_wpa
Field 'counter' in mic_failure struct is being assigned casting
value using uint16_t. Replace with u16 which is the correct type
of the field and the preferred one.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
4cf2df756f staging: ks7010: replace not standard uint type to unsigned int
The field 'wakeup_count' in 'ks_wlan_private' struct is declared
as 'uint' which is not a standard type. Replace in favour of
'unsigned int' which it is.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
f647b8e1ff staging: ks7010: replace uint8_t with u8 in ks_wlan_set_rx_gain
In function ks_wlan_set_rx_gain a cast to uint8_t is being used
to assign reception gain. 'rx_gain' field is defined as u8 so
replace the cast to the correct type

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
ace98ed095 staging: ks7010: replace uint8_t with u8 in ks_wlan_set_tx_gain
In function ks_wlan_set_tx_gain a cast to uint8_t is being used
to assign transmission gain. 'tx_gain' field is defined as u8 so
replace the cast to the correct type.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
255d4e1ddc staging: ks7010: change uint8_t casts to u8 in ks_wlan_set_rate
There are some casts to uint8_t in ks_wlan_set_rate function to
assign values of the bitrate. Just change it to u8 which is the one
defined for the field 'body' of the struct which is in use.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
89467e74aa staging: ks7010: change parameter type in ks_wlan_hw_rx function
The parameter 'size' in function ks_wlan_hw_rx is declared as
uint16_t and can be declared as size_t which makes more sense.
It is being passed to hif_align_size function which also expects
a size_t as parameter so just change its type. Also update two
casts in calls to this function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
83911837f8 staging: ks7010: change cast from uint16_t to u16
Header size and event fields of header are declared
as __le16 and being casted using uint16_t in cpu_to_le16.
Change cast to use preferred u16.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
62a37b72ce staging: ks7010: replace unsigned char type with u8
Variable 'byte' in ks7010_upload_firmware function is declared
as unsigned char and is only being used to read hardware
registers which are expected in sdio_read_byteb function as u8.
Change 'byte' variable type to u8 which is preferred.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
449f9eefa1 staging: ks7010: remove no necessary blank line
There was two blank lines between definitions and statements
in ks7010_upload_firmware function. Remove one of them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:06 +02:00
Sergio Paracuellos
154d3c2e05 staging: ks7010: remove not used definition WPA_CAPABILITY_PREAUTH
The WPA_CAPABILITY_PREAUTH definition is not being used at all so
just remove it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 14:07:05 +02:00
Nathan Chancellor
6d6612deaf staging: ks7010: Remove unnecessary limit checks
uwrq is an unsigned 32-bit integer, it cannot be less than zero.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-08 13:44:56 +02:00
Sergio Paracuellos
d82e514003 staging: ks7010: review local variable types in hostif_phy_information_confirm
This commit changes types for local variables declared in
hostif_phy_information_confirm function to use the preferred
one 'u8' and 'u32'. Its values are get using get_byte and get_dword
functions which returns 'u8' and 'u32' so it makes sense.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 18:58:41 -07:00
Sergio Paracuellos
677e281d53 staging: ks7010: use u32 instead of unsigned int in hostif_bss_scan_confirm
Local variable 'result_code' is declared as unsigned int in
hostif_bss_scan_confirm function. Its value is got calling
get_dword which returns an 'u32' so change its type to u32
which is preferred

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 18:58:41 -07:00
Sergio Paracuellos
ab0bb2a403 staging: ks7010: use u16 instead of unsigned short in hostif_connect_indication
Local variable 'connect_code' is declared as unsigned short in
hostif_connect_indication function. Its value is got calling
get_word which returns an 'u16' so change its type to u16
which is preferred.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 18:58:41 -07:00
Sergio Paracuellos
19e8a0d730 staging: ks7010: use u16 instead of unsigned short in hostif_data_indication
Local variable 'auth_type' is declared as unsigned short in
hostif_data_indication function. Its value is got calling get_word
which returns an 'u16' so change its type to u16 which is preferred.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 18:58:41 -07:00