linux/drivers/staging/ks7010
Tobin C. Harding 0e24eb8abf staging: ks7010: abstract connection status
Host interface connection status is handled using a 32 bit type. Top
byte is used as for FORCE_DISCONNECT status, low bits are used for
connect/disconnect status. Driver masks and checks integers to
ascertain status. If functions are defined to do the masking and
equality check then the details of how the status integer is used are
abstracted away. This makes the code easier to read. Also future
updates to the status handling will be easier because the code is in
one place.

Driver currently uses the CONNECT_STATUS and DISCONNECT_STATUS as
values, as apposed to opaque values. Because of this driver code
checks for equality with CONNECT_STATUS and DISCONNECT_STATUS as
apposed to negating a single check (ie 'foo != CONNECT_STATUS). In
order to maintain the current functionality we define two separate
functions is_connect_status() and is_disconnect_status().

Add functions to abstract the status integer check. Update all sites
that do the check manually to use the newly defined functions.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28 11:47:26 +02:00
..
eap_packet.h staging: ks7010: remove magic numbers 2017-04-28 11:45:49 +02:00
Kconfig staging: ks7010: remove custom firmware loader 2016-06-07 22:42:53 -07:00
ks7010_sdio.c staging: ks7010: abstract connection status 2017-04-28 11:47:26 +02:00
ks7010_sdio.h staging: ks7010: add struct comment to ks_sdio_card 2017-04-18 13:47:31 +02:00
ks_hostif.c staging: ks7010: abstract connection status 2017-04-28 11:47:26 +02:00
ks_hostif.h staging: ks7010: fix complete_handler 2017-04-18 13:33:17 +02:00
ks_wlan_ioctl.h staging: ks7010: add parentheses to complex macro 2017-03-14 06:20:57 +08:00
ks_wlan_net.c staging: ks7010: abstract connection status 2017-04-28 11:47:26 +02:00
ks_wlan.h staging: ks7010: abstract connection status 2017-04-28 11:47:26 +02:00
Makefile staging: ks7010: remove cfg file handling 2016-06-18 19:45:55 -07:00
michael_mic.c staging: ks7010: fix checkpatch SPACING 2017-03-21 08:52:33 +01:00
michael_mic.h staging: ks7010: fix spelling of Michael MIC 2017-03-14 08:04:51 +08:00
TODO staging: ks7010: add task to TODO file 2017-04-11 16:05:51 +02:00