Instead of creating a channel struct to temporarily hold the channel
info and passing it through multiple functions until the device is
created, just create the channel from the start.
This allows us to remove the channel_info struct.
I noticed 'chan_info.addr_type' was not being used, so I just deleted it.
Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Just use u8, as that's what you really want in a kernel driver.
Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use the "real" NULL value, don't try to be cute and define your own
value for something that the compiler obviously supports.
Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There's some "custom" data types defined that are never used in the
driver, so remove them before we work on converting the rest to be
"standard" data types.
Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
I have crossed off one item on the list, but found a few others that should
not get lost, so here is an update of the wilc1000 list
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This avoids the remaining warnings that one gets on a normal
build: unused variables, unused labels, and invalid printk
format strings.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The wilc1000 driver produces a lot of warnings about invalid
casts between const and non-const variables. This reworks
the code to avoid all those warnings, by marking variables
and function arguments const.
A lot of the types use WILC_Uint8, I change them to const u8
for style reasons, as I'm touching them anyway.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The various semaphore functions all directly translate into
sema_init(), down() and up(), so we can just remove the API.
This is a mostly automated conversion using simple sed scripts,
plus some manual changes to account for down() returning no
error.
As a positive side-effect, down() no longer hangs after
receiving a signal, as the original code did by looping around
down_interruptible.
The semaphores still need to be turned into mutexes as a
follow-up step.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The EXPORT_SYMTAB symbol has not been used in Linux for a very
long time, the driver does not need to set it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
All the remaining features from the OS abstraction layer
are not used at all in the driver, so we can just remove
the remaining references to them.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The driver has a simple wrapper around timer_list, and an
optional but unused feature to make the timer periodic.
This removes support for the periodic timer and simplifies
the code around timers.
A follow-up should replace the remaining wrapper with
open-coded timers.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The driver has a simple wrapper around msleep, as well as
a more advanced sleep function that is unused. This removes
the unused code and the options to turn the feature on or
off.
A follow-up should rework the code to use msleep directly.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The driver has its own API for semaphores. This should
be replaced with mutexes and completions, but for the moment
we can start by removing the obviously unused parts.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The driver contains its own abstraction for memory allocation,
most of it unused. This removes the unused parts, but the
rest should also be removed later.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The driver contains an abstraction for message queues, with
optional unused features, while the driver requires the main
feature.
This makes the msgqueue code unconditional as it's required
but removes the unused parts.
A later cleanup should remove the entire msgqueue code
and replace it with some normal kernel API.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The driver provides wrappers for a lot of string operations.
Some of them are unused, while others should be replaced
with normal kernel functions.
This replaces the unused ones for now, and leaves the other
ones for a later cleanup.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The abstraction for time in this driver is completely
unused, so remove it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The store method defined by LDLM_POOL_SYSFS_WRITER_STORE and
LDLM_POOL_SYSFS_WRITER_NOLOCK_STORE defines should
use size_t count, not unsigned long.
This produced a warning on i386 (and other 32bit architectures too,
I guess) where unsigned long is not 32 bit.
Reported by kbuild test bot.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add static declarations to statisfy sparse warnings in:
drivers/staging/unisys/visorbus/visorbus_main.c
warning: symbol 'visorbus_debug' was not declared
warning: symbol 'visorbus_forcematch' was not declared
warning: symbol 'visorbus_forcenomatch' was not declared
warning: symbol 'visorbus_devicetest' was not declared
warning: symbol 'visorbus_debugref' was not declared
warning: symbol 'visorbus_bus_groups' was not declared
warning: symbol 'devmajorminor_create_file' was not declared
warning: symbol 'devmajorminor_remove_file' was not declared
warning: symbol 'devmajorminor_remove_all_files' was not declared
warning: symbol 'unregister_devmajorminor_attributes' was not declared
Signed-off-by: Drew Fustini <pdp7pdp7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
WOL capability was reported in an awkward way - print it nicely.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Use netdev_* with log level depending on how serious error is
- Rework some messages to be more readable
- Pass net_device where needed for pretty prints
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This function never supported checking of MAC block.
Instead of printing several warnings - print it once and exit.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This messages are not needed, as failure is reported earlier in code.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
All get_key implementations return either -1 or small buffers, so
cast int->u16 is not a problem.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace :? with min_t for readability. Remove check that is always false.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This header is not used - remove it to make driver code smaller.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove alloc failed messages where not needed to make checkpatch.pl happy.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove the following private variables:
- force_mic_error - changes force_mic_error that is not used
- radio - changes sw_radio_on that is not used
- adhoc_peer_list - unimplemented
- firm_ver - unimplemented
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Take out MIFE_TYPE_HT_CAP processing into separate function -
rtllib_parse_mfie_ht_cap()
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fix most of simple LONG_LINE warnings. None of the changes should affect
behaviour of code, so several modifications are included in this patch:
- Code is reindented where needed
- Local variable names are compacted (priv -> p)
- Unnecessary casts are removed
- Nested ifs are replaced with logical and
- a = b = c = d expressions are split
- Replace if/then series with clamp_t()
- Removed unneeded scopes
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
Assert macro printed warning message (and was used once).
Remove it, and add netdev_warn() in place where it was called.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove rest of rtllib "debug" system - it is no longer used -
proper netdev_* functions are used in most cases.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use print_hex_dump_bytes() if VERBOSE_DEBUG is enabled.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Use netdev_dbg or netdev_vdbg instead of RTLLIB_DEBUG()
- Reformat some messages for better readability
- Remove RTLLIB_DEBUG messages that make no sense
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Extract frame_ctl once and use it as variable.
- Drop endian conversion in is_beacon() function
(used in simplified function only)
- Simplify debug messages
- Invert STYPE checks in debug messages - it is valid
as only BEACON and PROBE_RESP are allowed
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use netdev_dbg() instead of RTLLIB_DEBUG_WX().
Rewrite some messages to be more readable.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace all RTLLIB_DEBUG(RTLLIB_DL_ERR, *) calls with netdev_err()
for errors that really should be reported to user.
Use netdev_warn() for the rest.
Rephrase some of the messages to make them more readable/compact.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It is neither compiled nor used in rtl8192e.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Move MFIE_TYPE_GENERIC handler to rtllib_parse_mife_generic() function.
Code was not altered significantly, therefore in some places it generates
LONG_LINE checkpatch.pl warnings.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>