[PATCH v3 09/24] staging: ks7010: fix function return code path

2017-04-09 Thread Tobin C. Harding
ode within function with a jump to label. Invert conditional, jump to label if new conditional evaluates to true, reduce indentation in subsequent code. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 33 +++-- 1 file changed, 15 inserti

[PATCH v3 16/24] staging: ks7010: fix checkpatch UNNECESSARY_ELSE

2017-04-09 Thread Tobin C. Harding
Checkpatch emits WARNING: else is not generally useful after a break or return. Two warnings of this type are emitted for this code block, in both cases 'else' statements are unnecessary. Remove unnecessary 'else' statements, reduce indentation in subsequent code. Signed-off-

[PATCH v3 15/24] staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT

2017-04-09 Thread Tobin C. Harding
Checkpatch emits CHECK: Alignment should match open parenthesis. Align argument to open parenthesis. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers

[PATCH v3 14/24] staging: ks7010: utilize local variable

2017-04-09 Thread Tobin C. Harding
local pointer variable instead of dereferencing struct. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 9ee83a7

[PATCH v3 12/24] staging: ks7010: move null check before dereference

2017-04-09 Thread Tobin C. Harding
Function parameter is cast to a local pointer which is then dereferenced before it is checked to be non-NULL. Move pointer null check to be before the pointer is dereferenced. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH v3 22/24] staging: ks7010: remove unused macro

2017-04-09 Thread Tobin C. Harding
Macro CHECK_ALINE is defined and never used. Remove unused macro. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 47adc77..a505c4e 100644

[PATCH v3 24/24] staging: ks7010: move check and break to top of loop

2017-04-09 Thread Tobin C. Harding
issues. Do not change program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c ind

[PATCH v3 18/24] staging: ks7010: add task to TODO file

2017-04-09 Thread Tobin C. Harding
Driver uses custom Michael MIC implementation. There is already an implementation within the kernel. There is at least one other driver already using the kernel implementation (drivers/net/wireless/intersil/orinoco). Add task to TODO file. Signed-off-by: Tobin C. Harding --- drivers/staging

[PATCH v3 23/24] staging: ks7010: remove multi-way decision

2017-04-09 Thread Tobin C. Harding
to the readability. Add goto label. Remove multi-way decision by jumping to label. Reduce indentation in subsequent code. Do not change program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 48 -- 1 file changed, 25

[PATCH v3 21/24] staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE

2017-04-09 Thread Tobin C. Harding
Checkpatch emits WARNING: Avoid multiple line dereference. Fix up layout of function call, move dereference to single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH v3 19/24] staging: ks7010: rename identifier packet to skb

2017-04-09 Thread Tobin C. Harding
;skb' for variables of type 'struct sk_buff *'. Rename identifier 'packet' to 'skb'. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 42 +++--- drivers/staging/ks7010/ks_hostif.h | 2 +- 2 files changed,

[PATCH v3 20/24] staging: ks7010: fix checkpatch LOGICAL_CONTINUATIONS

2017-04-09 Thread Tobin C. Harding
Checkpatch emits multiple CHECK: Logical continuations should be on the previous line. Move logical continuations to the end of the previous line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 58 ++ 1 file changed, 28 insertions

Re: [PATCH] staging: ks7010: Adjust dev_err() calls in ks7010_sdio_probe()

2017-04-11 Thread Tobin C. Harding
On Tue, Apr 11, 2017 at 03:15:32PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 11 Apr 2017 14:54:35 +0200 > > The use of the logging function "dev_err" was introduced here on 2016-09-26. > > I find the following implementation details worth for another look. > * Reduce ex

Re: [PATCH v3 04/24] staging: ks7010: rename identifier rc to ret

2017-04-11 Thread Tobin C. Harding
On Tue, Apr 11, 2017 at 04:03:07PM +0200, Greg Kroah-Hartman wrote: > On Mon, Apr 10, 2017 at 01:15:41PM +1000, Tobin C. Harding wrote: > > Driver uses identifier 'rc' to hold the value for error return > > code. The rest of the driver predominately uses 'ret' fo

[PATCH 02/18] staging: ks7010: remove unused completion

2017-04-11 Thread Tobin C. Harding
Driver SDIO code initializes a completion that is never used. It can be safely removed. Remove unused completion. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 1 - drivers/staging/ks7010/ks7010_sdio.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers

[PATCH 05/18] staging: ks7010: remove unused spin_lock

2017-04-11 Thread Tobin C. Harding
Driver SDIO private data structure description includes a spin_lock that is never used. This data structure only contains a pointer to the sdio_func and a pointer to the main device private data. A spin_lock is not required here. Remove unused spin_lock. Signed-off-by: Tobin C. Harding

[PATCH 00/18] staging: ks7010: refactor SDIO code

2017-04-11 Thread Tobin C. Harding
names 'ks7010_sdio.c' to 'sdio.c' and 'ks7010_sdio.h' to 'sdio.h'. Patch is the result of running the following two commands. $ git mv ks7010_sdio.c sdio.c $ git mv ks7010_sdio.h sdio.h Code is untested. Builds on x86_64 and PowerPC. Tobin C. Harding (

[PATCH 03/18] staging: ks7010: remove unused read_buf

2017-04-11 Thread Tobin C. Harding
Driver SDIO code allocates memory for a buffer that is never used. It can be safely removed. Remove unused buffer, including allocation and freeing of memory. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 14 +++--- drivers/staging/ks7010/ks7010_sdio.h | 1

[PATCH 04/18] staging: ks7010: remove unused structure description

2017-04-11 Thread Tobin C. Harding
Driver SDIO header describes a structure that is never used. It can be safely removed. Remove unused structure description. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.h b

[PATCH 08/18] staging: ks7010: rename wakeup work struct

2017-04-11 Thread Tobin C. Harding
e and used the 'work' suffix for a work_struct identifier. Rename work_struct structure 'ks_wlan_wakeup_task' to 'wakeup_work'. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 14 +++--- drivers/staging/ks7010/ks_wlan.h | 2

[PATCH 06/18] staging: ks7010: remove argument identifiers

2017-04-11 Thread Tobin C. Harding
extra meaning to the code. Removing them makes the code easier to read. Remove unnecessary identifiers from function parameters of function prototype passed as a parameter. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- drivers/staging/ks7010/ks7010_sdio.h | 2

[PATCH 09/18] staging: ks7010: move tasklet_struct to ks_wlan_private

2017-04-11 Thread Tobin C. Harding
device private data, the code would be easier to read if the device private data struct description was not spread over two files. Move tasklet_struct out of sdio header file and into the device private data structure description. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH 07/18] staging: ks7010: clean up SDIO header comments

2017-04-11 Thread Tobin C. Harding
SDIO header file does not use kernel doc format struct comments. Adding them aids readability and enables documentation to be built from the source code. Other comments may be tidied up as we do this. Add kernel format struct comments. Tidy up comments. Signed-off-by: Tobin C. Harding

[PATCH 01/18] staging: ks7010: replace defines with enums

2017-04-11 Thread Tobin C. Harding
. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.h | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h index a1c7551..43b9990 100644 --- a/drivers

[PATCH 12/18] staging: ks7010: clean up SDIO source comments

2017-04-11 Thread Tobin C. Harding
SDIO code currently has a number of unneeded comments. Following kernel coding style we do not need extraneous comments, especially on code where it is clear what is being done. Spelling typos can be fixed. Remove unnecessary comments, fix typos in comments. Signed-off-by: Tobin C. Harding

[PATCH 10/18] staging: ks7010: move hw info into dev private data

2017-04-11 Thread Tobin C. Harding
kqueue_struct pointer 'ks7010sdio_wq' to 'wq'. struct ks_sdio_card pointer 'sdio_card' to 'ks_sdio_card'. Remove structure description hw_info_t. Fix init/destroy calls. Fix all call sites, SDIO private data access calls, and queuing calls. Signed-off

[PATCH 13/18] staging: ks7010: remove err_ from non-error path label

2017-04-11 Thread Tobin C. Harding
goto label includes 'err_' suffix but is executed on non-error paths. Remove err_ suffix from goto label. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7010/ks7

[PATCH 11/18] staging: ks7010: add struct comment to ks_sdio_card

2017-04-11 Thread Tobin C. Harding
ks_sdio_card structure description does not have a kernel doc format comment. Add kernel doc format comment to struct ks_sdio_card. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/staging/ks7010

[PATCH 15/18] staging: ks7010: fix checkpatch LINE_SPACING

2017-04-11 Thread Tobin C. Harding
Checkpatch emits CHECK: Please don't use multiple blank lines. Remove multiple blank lines. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_s

[PATCH 14/18] staging: ks7010: fix checkpatch SPACE_BEFORE_TAB

2017-04-11 Thread Tobin C. Harding
Checkpatch emits WARNING: please, no space before tabs. Remove space before tabs. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010

[PATCH 18/18] staging: ks7010: rename SDIO files

2017-04-11 Thread Tobin C. Harding
is achieved using the following commands. $ git mv ks7010_sdio.c sdio.c $ git mv ks7010_sdio.h sdio.h Rename 'ks7010_sdio.c' to 'sdio.c' Rename 'ks7010_sdio.h' to 'sdio.h' Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/Makefile |2

[PATCH 17/18] staging: ks7010: fix checkpatch SPLIT_STRING

2017-04-11 Thread Tobin C. Harding
Checkpatch emits WARNING: quoted string split across lines. Concatenate string onto single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers

[PATCH 16/18] staging: ks7010: refactor SDIO read/write helpers

2017-04-11 Thread Tobin C. Harding
useful data on the error path, at worst is uninitialized and holds garbage. Split read/write helper functions into two functions each, one for single byte IO and one for multi-byte IO. Fix all call sites. Do not change the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

Re: [PATCH] staging: ks7010: Adjust dev_err() calls in ks7010_sdio_probe()

2017-04-12 Thread Tobin C. Harding
On Wed, Apr 12, 2017 at 12:27:10PM +0200, Greg Kroah-Hartman wrote: > On Wed, Apr 12, 2017 at 08:39:15AM +1000, Tobin C. Harding wrote: > > On Tue, Apr 11, 2017 at 03:15:32PM +0200, SF Markus Elfring wrote: > > > From: Markus Elfring > > > Date: Tue, 11 Apr 2017 14:5

[PATCH 00/15] staging: ks7010: refactor SDIO code

2017-04-17 Thread Tobin C. Harding
io.h'. Patch is the result of running the following two commands. $ git mv ks7010_sdio.c sdio.c $ git mv ks7010_sdio.h sdio.h Code is untested. Builds on x86_64 and PowerPC. Tobin C. Harding (15): staging: ks7010: create reg_status_type enum type staging: ks7010: replace defines with enum typ

[PATCH 01/15] staging: ks7010: create reg_status_type enum type

2017-04-17 Thread Tobin C. Harding
/BUSY pair that are currently used within the SDIO source. Change source to use new enum types. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 6 +++--- drivers/staging/ks7010/ks7010_sdio.h | 14 ++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git

[PATCH 05/15] staging: ks7010: rename wakeup work struct

2017-04-17 Thread Tobin C. Harding
e and used the 'work' suffix for a work_struct identifier. Rename work_struct structure 'ks_wlan_wakeup_task' to 'wakeup_work'. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 14 +++--- drivers/staging/ks7010/ks_wlan.h | 2

[PATCH 04/15] staging: ks7010: clean up SDIO header comments

2017-04-17 Thread Tobin C. Harding
SDIO header file does not use kernel doc format struct comments. Adding them aids readability and enables documentation to be built from the source code. Other comments may be tidied up as we do this. Add kernel format struct comments. Tidy up comments. Signed-off-by: Tobin C. Harding

[PATCH 10/15] staging: ks7010: remove err_ from non-error path label

2017-04-17 Thread Tobin C. Harding
goto label includes 'err_' suffix but is executed on non-error paths. Remove err_ suffix from goto label. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7010/ks7

[PATCH 03/15] staging: ks7010: fix complete_handler

2017-04-17 Thread Tobin C. Harding
currently unnecessarily complex, storing and passing extraneous pointer parameters. Remove unnecessary parameters, unnecessary casting to/from 'void *'. Fix all call sites involving complete_handler(). Signed-off-by: Tobin C. Harding --- drivers/staging/ks701

[PATCH 02/15] staging: ks7010: replace defines with enum types

2017-04-17 Thread Tobin C. Harding
. Replace (integer progression) preprocessor constants with enumeration type. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010

[PATCH 11/15] staging: ks7010: fix checkpatch SPACE_BEFORE_TAB

2017-04-17 Thread Tobin C. Harding
Checkpatch emits WARNING: please, no space before tabs. Remove space before tabs. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010

[PATCH 13/15] staging: ks7010: refactor SDIO read/write helpers

2017-04-17 Thread Tobin C. Harding
useful data on the error path, at worst is uninitialized and holds garbage. Split read/write helper functions into two functions each, one for single byte IO and one for multi-byte IO. Fix all call sites. Do not change the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH 07/15] staging: ks7010: move hw info into dev private data

2017-04-17 Thread Tobin C. Harding
kqueue_struct pointer 'ks7010sdio_wq' to 'wq'. struct ks_sdio_card pointer 'sdio_card' to 'ks_sdio_card'. Remove structure description hw_info_t. Fix init/destroy calls. Fix all call sites, SDIO private data access calls, and queuing calls. Signed-off

[PATCH 06/15] staging: ks7010: move tasklet_struct to ks_wlan_private

2017-04-17 Thread Tobin C. Harding
device private data, the code would be easier to read if the device private data struct description was not spread over two files. Move tasklet_struct out of sdio header file and into the device private data structure description. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH 14/15] staging: ks7010: fix checkpatch SPLIT_STRING

2017-04-17 Thread Tobin C. Harding
Checkpatch emits WARNING: quoted string split across lines. Concatenate string onto single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers

[PATCH 12/15] staging: ks7010: fix checkpatch LINE_SPACING

2017-04-17 Thread Tobin C. Harding
Checkpatch emits CHECK: Please don't use multiple blank lines. Remove multiple blank lines. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_s

[PATCH 09/15] staging: ks7010: clean up SDIO source comments

2017-04-17 Thread Tobin C. Harding
SDIO code currently has a number of unneeded comments. Following kernel coding style we do not need extraneous comments, especially on code where it is clear what is being done. Spelling typos can be fixed. Remove unnecessary comments, fix typos in comments. Signed-off-by: Tobin C. Harding

[PATCH 08/15] staging: ks7010: add struct comment to ks_sdio_card

2017-04-17 Thread Tobin C. Harding
ks_sdio_card structure description does not have a kernel doc format comment. Add kernel doc format comment to struct ks_sdio_card. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/staging/ks7010

[PATCH 15/15] staging: ks7010: rename SDIO files

2017-04-17 Thread Tobin C. Harding
is achieved using the following commands. $ git mv ks7010_sdio.c sdio.c $ git mv ks7010_sdio.h sdio.h Rename 'ks7010_sdio.c' to 'sdio.c' Rename 'ks7010_sdio.h' to 'sdio.h' Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/Makefile |2

ks7010 endianness question

2017-04-18 Thread Tobin C. Harding
Hi Wolfram, May I please ask you with an ks7010 driver endianness question? Comments on the hostif_hdr data structure (ks_hostif.h) state that the target uses little endian byte order. /* * HOST-MAC I/F data structure * Byte alignmet Little Endian */ struct hostif_hdr { u16 size;

Re: ks7010 endianness question

2017-04-18 Thread Tobin C. Harding
On Wed, Apr 19, 2017 at 01:34:46PM +1000, Tobin C. Harding wrote: > Hi Wolfram, > > May I please ask you with an ks7010 driver endianness question? > > Comments on the hostif_hdr data structure (ks_hostif.h) state that the > target uses little endian byte order. > > /

Re: [PATCH] staging: ks7010: Change capability field to __le16

2017-04-24 Thread Tobin C. Harding
On Thu, Apr 20, 2017 at 09:02:26PM +0200, Johan Svensson wrote: > > On 2017-04-18 20:38, Greg KH wrote: > > On Tue, Apr 18, 2017 at 08:24:01PM +0200, Johan Svensson wrote: > >> Change capability field to __le16 in struct ap_info_t, > >> struct link_ap_info_t, and struct local_ap_t. > >> This fixes

Re: [PATCH] staging: ks7010: Change capability field to __le16

2017-04-25 Thread Tobin C. Harding
On Mon, Apr 24, 2017 at 08:44:38PM +1000, Tobin C. Harding wrote: > On Thu, Apr 20, 2017 at 09:02:26PM +0200, Johan Svensson wrote: > > > > On 2017-04-18 20:38, Greg KH wrote: > > > On Tue, Apr 18, 2017 at 08:24:01PM +0200, Johan Svensson wrote: > > >> Change

[PATCH 00/19] staging: ks7010: refactor host interface

2017-04-25 Thread Tobin C. Harding
18 renames header and source files 'ks_hostif' to 'hostif'. Patch 19 renames header and source files 'ks7010_sdio' to 'sdio'. Patch series was created using `git format-patch -M ...` Series is untested, builds on x86_64 and PowerPC. Tobin C. Harding

[PATCH 03/19] staging: ks7010: remove unused local variable eap_key

2017-04-25 Thread Tobin C. Harding
Code declares and assigns to a local variable that is never used, it can be safely removed. Remove unused local variable. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ks7010

[PATCH 01/19] staging: ks7010: rename constant SLP_SLEEP to SLP_ASLEEP

2017-04-25 Thread Tobin C. Harding
Constant SLP_SLEEP is ambiguous, if it were named SLP_ASLEEP the code would be less ambiguous and easier to read. Rename constand SLP_SLEEP to SLP_ASLEEP. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- drivers/staging/ks7010/ks_hostif.c | 4 +- drivers

[PATCH 04/19] staging: ks7010: move skb null check near allocation

2017-04-25 Thread Tobin C. Harding
. This aids the readability of the code and makes explicit the error path. Check for NULL directly after allocating the sk_buff, return if allocation fails. Reduce indentation of subsequent code. Do not change the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH 11/19] staging: ks7010: fix checkpatch LINE_SPACING

2017-04-25 Thread Tobin C. Harding
Checkpatch emits CHECK: Please don't use multiple blank lines. Remove multiple blank lines. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c

[PATCH 12/19] staging: ks7010: make abbreviation mgmt uniform

2017-04-25 Thread Tobin C. Harding
r. 'mgmt' is widely accepted as an abbreviation of 'management'. 'power' can be spelled out in full, the extra two characters aids readability without an excessive cost. Make abbreviation of 'management' uniform across the driver, function names, preprocesso

[PATCH 10/19] staging: ks7010: add enum sleep_mode_type

2017-04-25 Thread Tobin C. Harding
, further aiding readability. Add enumeration type sleep_mode_type. Update code that handles sleep mode to use the new enumeration type. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 7 --- drivers/staging/ks7010/ks_hostif.h | 8 +--- drivers/staging/ks7010

[PATCH 15/19] staging: ks7010: clean up macro ps_confirm_wait_inc

2017-04-25 Thread Tobin C. Harding
Macro includes commented out code. Removing dead code line enables braces to be removed. Macro is easier to read if the code is clean. Clean up macro ps_confirm_wait_inc. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 13/19] staging: ks7010: remove cast from netdev_priv()

2017-04-25 Thread Tobin C. Harding
The returned pointer from netdev_priv() (void *) does not need to be cast. Remove unnecessary cast of void * returned by netdev_priv(). Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 184 --- 1 file changed, 64 insertions(+), 120

[PATCH 02/19] staging: ks7010: remove unnecessary address check

2017-04-25 Thread Tobin C. Harding
. Remove unnecessary duplicate address check. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index ee262b2..2dd3047 100644 --- a/drivers/staging/ks7010

[PATCH 05/19] staging: ks7010: remove magic numbers

2017-04-25 Thread Tobin C. Harding
d/or expression using existing kernel constant. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/eap_packet.h | 2 ++ drivers/staging/ks7010/ks_hostif.c | 25 - 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ks7010/eap_pack

[PATCH 07/19] staging: ks7010: clean memory allocation

2017-04-25 Thread Tobin C. Harding
the magic numbers onto a single line opens the way for further refactoring. Clean memory allocation code, remove debug statements. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/stag

[PATCH 16/19] staging: ks7010: add enum multicast_filter_type

2017-04-25 Thread Tobin C. Harding
: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index 384d876..e679765 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging

[PATCH 18/19] staging: ks7010: rename ks_hostif to hostif

2017-04-25 Thread Tobin C. Harding
host interface code, however, the driver uses the abbreviation 'hostif' for host interface. Best to be uniform within the driver. Rename ks_hostif.c to hostif.c Rename ks_hostif.h to hostif.h Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/Makefile | 2 +

[PATCH 19/19] staging: ks7010: rename ks_hostif to hostif

2017-04-25 Thread Tobin C. Harding
SDIO code. Rename ks7010_sdio.c to sdio.c Rename ks7010_sdio.h to sdio.h Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/Makefile | 2 +- drivers/staging/ks7010/ks_wlan.h | 2 +- drivers/staging/ks7010/{ks7010_sdio.c => sdio.c} | 2 +- drivers/s

[PATCH 06/19] staging: ks7010: remove duplicate code

2017-04-25 Thread Tobin C. Harding
. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 6f90e23..d5ec487 100644 --- a/drivers

[PATCH 09/19] staging: ks7010: abstract connection status

2017-04-25 Thread Tobin C. Harding
t the status integer check. Update all sites that do the check manually to use the newly defined functions. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- drivers/staging/ks7010/ks_hostif.c | 24 drivers/staging/ks7010/ks_wlan.h

[PATCH 08/19] staging: ks7010: add hostif_generic_request()

2017-04-25 Thread Tobin C. Harding
helper function to allocate the memory and set the initial hostif_hdr members code duplication is reduced. Add function to allocate memory for a host interface request. Set 'size' and 'event' members. Remove duplicate code using newly defined function. Signed-off-by: Tobin C. H

[PATCH 17/19] staging: ks7010: fix enumeration tags

2017-04-25 Thread Tobin C. Harding
Driver header declares enumeration types without tags. Using informative tags makes the code easier to understand and eliminates the need to comment the enum. Add tags to enumeration types. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 9 - 1 file changed, 4

[PATCH 14/19] staging: ks7010: continue from loop on unmatched mac

2017-04-25 Thread Tobin C. Harding
tatement conditional, continue loop if new conditional evaluates to true. Reduce subsequent code indentation level. Do not change program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

Re: [PATCH] staging: ks7010: fix block comment style in ks_wlan_net.c

2017-04-25 Thread Tobin C. Harding
On Tue, Apr 25, 2017 at 10:59:25PM +0200, Ilia Sergachev wrote: > This is a patch to the ks_wlan_net.c file that fixes up the following warning > found by the checkpatch.pl tool: > WARNING: Block comments use a trailing */ on a separate line Good work resubmitting this following Greg's comments. M

Re: [PATCH v2] Staging: ks7010: style fix

2017-04-26 Thread Tobin C. Harding
On Wed, Apr 26, 2017 at 10:38:54AM +0200, Ilia Sergachev wrote: > Fix the style of block comments. > Move trailing */ to a separate line. > Checkpatch was showing: > WARNING: Block comments use a trailing */ on a separate line. You are doing well Ilia. A few nitpicks - Your first subject was bett

Re: [PATCH v3] staging: ks7010: fix block comment style

2017-04-26 Thread Tobin C. Harding
On Wed, Apr 26, 2017 at 01:00:23PM +0200, Ilia Sergachev wrote: > Checkpatch was showing: > WARNING: Block comments use a trailing */ on a separate line. > > Move trailing */ to a separate line. > > Signed-off-by: Ilia Sergachev Reviewed-by: Tobin C. Harding >

Re: [PATCH RFC] remove custom Michael MIC implementation

2017-04-26 Thread Tobin C. Harding
On Fri, Mar 31, 2017 at 12:42:22PM +0200, Wolfram Sang wrote: > Hi, > > > The card I have is a Spectec FCC ID: S2Y-WLAN-11B-G which I believe is > > a SDW-823 and should use the ks7010 driver. > > Sorry, likely not. It is an early SDW-821 and has a MediaTek chipset for > which no driver is known:

Re: [PATCH 19/19] staging: ks7010: rename ks_hostif to hostif

2017-04-26 Thread Tobin C. Harding
On Wed, Apr 26, 2017 at 10:55:24AM +1000, Tobin C. Harding wrote: [snip] Please drop this patch. thanks, Tobin. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 18/19] staging: ks7010: rename ks_hostif to hostif

2017-04-26 Thread Tobin C. Harding
On Wed, Apr 26, 2017 at 10:55:23AM +1000, Tobin C. Harding wrote: [snip] Please drop from the series this patch on wards (patch 18 and patch 19). Is it easier for you if I resubmit the whole series? Reason : I just found the original GPL driver source released in 2009 by Renesas and file

Re: [PATCH 00/19] staging: ks7010: refactor host interface

2017-04-26 Thread Tobin C. Harding
On Wed, Apr 26, 2017 at 10:55:05AM +1000, Tobin C. Harding wrote: [snip] Please drop this series. Will re-submit. Apologies for the noise, bad newbie - no biscuit. thanks, Tobin. ___ devel mailing list de...@linuxdriverproject.org http

[PATCH 01/16] staging: ks7010: remove unnecessary address check

2017-04-26 Thread Tobin C. Harding
. Remove unnecessary duplicate address check. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 7151f16..2216409 100644 --- a/drivers/staging/ks7010

[PATCH 03/16] staging: ks7010: move skb null check near allocation

2017-04-26 Thread Tobin C. Harding
. This aids the readability of the code and makes explicit the error path. Check for NULL directly after allocating the sk_buff, return if allocation fails. Reduce indentation of subsequent code. Do not change the program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010

[PATCH 02/16] staging: ks7010: remove unused local variable eap_key

2017-04-26 Thread Tobin C. Harding
Code declares and assigns to a local variable that is never used, it can be safely removed. Remove unused local variable. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/ks7010

[PATCH 04/16] staging: ks7010: remove magic numbers

2017-04-26 Thread Tobin C. Harding
d/or expression using existing kernel constant. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/eap_packet.h | 2 ++ drivers/staging/ks7010/ks_hostif.c | 25 - 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ks7010/eap_pack

[PATCH 00/16] staging: ks7010: refactor host interface

2017-04-26 Thread Tobin C. Harding
submission - remove file renames (patch 18 and patch 19) - remove spurious refactoring that had slipped into patch 'staging: ks7010: add enum sleep_mode_type' Tobin C. Harding (16): staging: ks7010: remove unnecessary address check staging: ks7010: remove unused local variable eap_key

[PATCH 06/16] staging: ks7010: clean memory allocation

2017-04-26 Thread Tobin C. Harding
the magic numbers onto a single line opens the way for further refactoring. Clean memory allocation code, remove debug statements. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/stag

[PATCH 05/16] staging: ks7010: remove duplicate code

2017-04-26 Thread Tobin C. Harding
. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 8cfda60..8755bd9 100644 --- a/drivers

[PATCH 07/16] staging: ks7010: add hostif_generic_request()

2017-04-26 Thread Tobin C. Harding
helper function to allocate the memory and set the initial hostif_hdr members code duplication is reduced. Add function to allocate memory for a host interface request. Set 'size' and 'event' members. Remove duplicate code using newly defined function. Signed-off-by: Tobin C.

[PATCH 14/16] staging: ks7010: clean up macro ps_confirm_wait_inc

2017-04-26 Thread Tobin C. Harding
Macro includes commented out code. Removing dead code line enables braces to be removed. Macro is easier to read if the code is clean. Clean up macro ps_confirm_wait_inc. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH 11/16] staging: ks7010: make abbreviation mgmt uniform

2017-04-26 Thread Tobin C. Harding
r. 'mgmt' is widely accepted as an abbreviation of 'management'. 'power' can be spelled out in full, the extra two characters aids readability without an excessive cost. Make abbreviation of 'management' uniform across the driver, function names, preprocesso

[PATCH 13/16] staging: ks7010: continue from loop on unmatched mac

2017-04-26 Thread Tobin C. Harding
tatement conditional, continue loop if new conditional evaluates to true. Reduce subsequent code indentation level. Do not change program logic. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 09/16] staging: ks7010: add enum sleep_mode_type

2017-04-26 Thread Tobin C. Harding
, further aiding readability. Add enumeration type sleep_mode_type. Update code that handles sleep mode to use the new enumeration type. Signed-off-by: Tobin C. Harding --- Change since previous submission - remove spurious refactoring. drivers/staging/ks7010/ks_hostif.c | 7 --- drivers

[PATCH 08/16] staging: ks7010: abstract connection status

2017-04-26 Thread Tobin C. Harding
t the status integer check. Update all sites that do the check manually to use the newly defined functions. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- drivers/staging/ks7010/ks_hostif.c | 24 drivers/staging/ks7010/ks_wlan.h

[PATCH 16/16] staging: ks7010: fix enumeration tags

2017-04-26 Thread Tobin C. Harding
Driver header declares enumeration types without tags. Using informative tags makes the code easier to understand and eliminates the need to comment the enum. Add tags to enumeration types. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 9 - 1 file changed, 4

[PATCH 15/16] staging: ks7010: add enum multicast_filter_type

2017-04-26 Thread Tobin C. Harding
: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h index f1fdd840..41ae74a 100644 --- a/drivers/staging/ks7010/ks_hostif.h +++ b/drivers/staging

[PATCH 10/16] staging: ks7010: fix checkpatch LINE_SPACING

2017-04-26 Thread Tobin C. Harding
Checkpatch emits CHECK: Please don't use multiple blank lines. Remove multiple blank lines. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c

[PATCH 12/16] staging: ks7010: remove cast from netdev_priv()

2017-04-26 Thread Tobin C. Harding
The returned pointer from netdev_priv() (void *) does not need to be cast. Remove unnecessary cast of void * returned by netdev_priv(). Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 184 --- 1 file changed, 64 insertions(+), 120

Re: [PATCH] staging/ks7010: Fix type assignment for struct hostif_hdr

2017-04-30 Thread Tobin C. Harding
On Sat, Apr 29, 2017 at 07:54:30PM +0200, Cezary Gapinski wrote: > Sparse spits out a warnings about __le16 and unsigned short assignment. > Change the type of size and event members of struct hostif_hdr > to __le16 and correct conversion to the proper cpu type. I believe that this patch is correc

Re: [bug report] staging: ks7010: add driver from Nanonote extra-repository

2017-04-30 Thread Tobin C. Harding
On Fri, Apr 28, 2017 at 04:27:29PM +0200, Wolfram Sang wrote: > On Fri, Apr 28, 2017 at 04:41:33PM +0300, Dan Carpenter wrote: > > Adding Tobin to CC, he is way more into the driver than I am these > days... I've mocked up a patch set to address this issue (along with some further refactoring of

<    1   2   3   4   5   6   >