Re: [PATCH v4 1/2] staging: vt6655: check for memory allocation failures

2018-03-31 Thread Jia-Ju Bai



On 2018/3/30 13:51, Ji-Hun Kim wrote:

There are no null pointer checking on rd_info and td_info values which
are allocated by kzalloc. It has potential null pointer dereferencing
issues. Implement error handling code on device_init_rd*, device_init_td*
and vnt_start for the allocation failures.

Signed-off-by: Ji-Hun Kim 
---
Changes v2:
- Delete WARN_ON which can makes crashes on some machines.
- Instead of return directly, goto freeing function for freeing previously
   allocated memory in the for loop after kzalloc() failed.
- In the freeing function, add if statement for freeing to only allocated
   values.

Changes v3:
- Modify return type of device_init_rd*, device_init_td*. Then add returns
   error code at those functions and vnt_start as well.

Changes v4:
- Fix potential memory leaks from error handling code of device init
   functions in vnt_start().

  drivers/staging/vt6655/device_main.c | 121 ++-
  1 file changed, 89 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c 
b/drivers/staging/vt6655/device_main.c
index fbc4bc6..c9752df 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -124,10 +124,10 @@
  static void device_free_info(struct vnt_private *priv);
  static void device_print_info(struct vnt_private *priv);
  
-static void device_init_rd0_ring(struct vnt_private *priv);

-static void device_init_rd1_ring(struct vnt_private *priv);
-static void device_init_td0_ring(struct vnt_private *priv);
-static void device_init_td1_ring(struct vnt_private *priv);
+static int device_init_rd0_ring(struct vnt_private *priv);
+static int device_init_rd1_ring(struct vnt_private *priv);
+static int device_init_td0_ring(struct vnt_private *priv);
+static int device_init_td1_ring(struct vnt_private *priv);
  
  static int  device_rx_srv(struct vnt_private *priv, unsigned int idx);

  static int  device_tx_srv(struct vnt_private *priv, unsigned int idx);
@@ -528,18 +528,22 @@ static void device_free_rings(struct vnt_private *priv)
  priv->tx0_bufs, priv->tx_bufs_dma0);
  }
  
-static void device_init_rd0_ring(struct vnt_private *priv)

+static int device_init_rd0_ring(struct vnt_private *priv)
  {
int i;
dma_addr_t  curr = priv->rd0_pool_dma;
struct vnt_rx_desc *desc;
+   int ret = 0;
  
  	/* Init the RD0 ring entries */

for (i = 0; i < priv->opts.rx_descs0;
 i ++, curr += sizeof(struct vnt_rx_desc)) {
desc = >aRD0Ring[i];
desc->rd_info = kzalloc(sizeof(*desc->rd_info), GFP_KERNEL);
-
+   if (!desc->rd_info) {
+   ret = -ENOMEM;
+   goto error;
+   }
if (!device_alloc_rx_buf(priv, desc))
dev_err(>pcid->dev, "can not alloc rx bufs\n");
  
@@ -550,20 +554,29 @@ static void device_init_rd0_ring(struct vnt_private *priv)

if (i > 0)
priv->aRD0Ring[i-1].next_desc = cpu_to_le32(priv->rd0_pool_dma);
priv->pCurrRD[0] = >aRD0Ring[0];
+
+   return 0;
+error:
+   device_free_rd0_ring(priv);
+   return ret;
  }
  
-static void device_init_rd1_ring(struct vnt_private *priv)

+static int device_init_rd1_ring(struct vnt_private *priv)
  {
int i;
dma_addr_t  curr = priv->rd1_pool_dma;
struct vnt_rx_desc *desc;
+   int ret = 0;
  
  	/* Init the RD1 ring entries */

for (i = 0; i < priv->opts.rx_descs1;
 i ++, curr += sizeof(struct vnt_rx_desc)) {
desc = >aRD1Ring[i];
desc->rd_info = kzalloc(sizeof(*desc->rd_info), GFP_KERNEL);
-
+   if (!desc->rd_info) {
+   ret = -ENOMEM;
+   goto error;
+   }
if (!device_alloc_rx_buf(priv, desc))
dev_err(>pcid->dev, "can not alloc rx bufs\n");
  
@@ -574,6 +587,11 @@ static void device_init_rd1_ring(struct vnt_private *priv)

if (i > 0)
priv->aRD1Ring[i-1].next_desc = cpu_to_le32(priv->rd1_pool_dma);
priv->pCurrRD[1] = >aRD1Ring[0];
+
+   return 0;
+error:
+   device_free_rd1_ring(priv);
+   return ret;
  }
  
  static void device_free_rd0_ring(struct vnt_private *priv)

@@ -584,12 +602,12 @@ static void device_free_rd0_ring(struct vnt_private *priv)
struct vnt_rx_desc *desc = >aRD0Ring[i];
struct vnt_rd_info *rd_info = desc->rd_info;
  
-		dma_unmap_single(>pcid->dev, rd_info->skb_dma,

-priv->rx_buf_sz, DMA_FROM_DEVICE);
-
-   dev_kfree_skb(rd_info->skb);
-
-   kfree(desc->rd_info);
+   if (rd_info) {
+   dma_unmap_single(>pcid->dev, rd_info->skb_dma,
+   priv->rx_buf_sz, DMA_FROM_DEVICE);
+  

Re: [PATCH net-next] hv_netvsc: Clean up extra parameter from rndis_filter_receive_data()

2018-03-31 Thread David Miller
From: Haiyang Zhang 
Date: Fri, 30 Mar 2018 13:57:59 -0700

> From: Haiyang Zhang 
> 
> The variables, msg and data, have the same value. This patch removes
> the extra one.
> 
> Signed-off-by: Haiyang Zhang 

Applied.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 04/11] staging: vchiq_arm: Clear VLA warning

2018-03-31 Thread kbuild test robot
Hi Stefan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on v4.16-rc7 next-20180329]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Stefan-Wahren/staging-vchiq_core-Fix-missing-semaphore-release-in-error-case/20180401-055855
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:14,
from 
drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c:35:
   drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c: In function 
'vchiq_dump_service_use_state':
   include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of 
type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
#define KERN_SOH "\001"  /* ASCII Start Of Header */
 ^
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
  ^~~~
   drivers/staging//vc04_services/interface/vchiq_arm/vchiq_core.h:52:28: note: 
in expansion of macro 'KERN_INFO'
#define VCHIQ_LOG_PREFIX   KERN_INFO "vchiq: "
   ^
   drivers/staging//vc04_services/interface/vchiq_arm/vchiq_core.h:62:11: note: 
in expansion of macro 'VCHIQ_LOG_PREFIX'
   printk(VCHIQ_LOG_PREFIX fmt "\n", ##__VA_ARGS__); } while (0)
  ^~~~
>> drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c:3479:3: note: 
>> in expansion of macro 'vchiq_log_warning'
  vchiq_log_warning(vchiq_susp_log_level, "Too many active "
  ^
   drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c:3480:47: 
note: format string is defined here
   "services (%d).  Only dumping up to first %d services "
 ~^
 %ld

vim +/vchiq_log_warning +3479 
drivers/staging//vc04_services/interface/vchiq_arm/vchiq_arm.c

8dbc30957 Stefan Wahren2018-03-31  3422  
71bad7f08 popcornmix   2013-07-02  3423  void
71bad7f08 popcornmix   2013-07-02  3424  
vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
71bad7f08 popcornmix   2013-07-02  3425  {
71bad7f08 popcornmix   2013-07-02  3426 VCHIQ_ARM_STATE_T 
*arm_state = vchiq_platform_get_arm_state(state);
8dbc30957 Stefan Wahren2018-03-31  3427 static struct 
service_data_struct service_data[64];
71bad7f08 popcornmix   2013-07-02  3428 int i, j = 0;
71bad7f08 popcornmix   2013-07-02  3429 /* If there's more than 
64 services, only dump ones with
71bad7f08 popcornmix   2013-07-02  3430  * non-zero counts */
71bad7f08 popcornmix   2013-07-02  3431 int only_nonzero = 0;
71bad7f08 popcornmix   2013-07-02  3432 static const char *nz = 
"<-- preventing suspend";
71bad7f08 popcornmix   2013-07-02  3433  
71bad7f08 popcornmix   2013-07-02  3434 enum vc_suspend_status 
vc_suspend_state;
71bad7f08 popcornmix   2013-07-02  3435 enum vc_resume_status  
vc_resume_state;
71bad7f08 popcornmix   2013-07-02  3436 int peer_count;
71bad7f08 popcornmix   2013-07-02  3437 int vc_use_count;
71bad7f08 popcornmix   2013-07-02  3438 int active_services;
71bad7f08 popcornmix   2013-07-02  3439  
71bad7f08 popcornmix   2013-07-02  3440 if (!arm_state)
71bad7f08 popcornmix   2013-07-02  3441 return;
71bad7f08 popcornmix   2013-07-02  3442  
71bad7f08 popcornmix   2013-07-02  3443 
read_lock_bh(_state->susp_res_lock);
71bad7f08 popcornmix   2013-07-02  3444 vc_suspend_state = 
arm_state->vc_suspend_state;
71bad7f08 popcornmix   2013-07-02  3445 vc_resume_state  = 
arm_state->vc_resume_state;
71bad7f08 popcornmix   2013-07-02  3446 peer_count = 
arm_state->peer_use_count;
71bad7f08 popcornmix   2013-07-02  3447 vc_use_count = 
arm_state->videocore_use_count;
71bad7f08 popcornmix   2013-07-02  3448 active_services = 
state->unused_service;
8dbc30957 Stefan Wahren2018-03-31  3449 if (active_services > 
ARRAY_SIZE(service_data))
71bad7f08 popcornmix   2013-07-02  3450 only_nonzero = 
1;
71bad7f08 popcornmix   2013-07-02  3451  
8dbc30957 

[PATCH 11/11] staging: vchiq_core: Free kthreads in error case

2018-03-31 Thread Stefan Wahren
We need to free the kthreads in error case before leaving
vchiq_init_state() otherwise we leak resources.

Signed-off-by: Stefan Wahren 
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index d4f2458..7642ced 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -2562,7 +2562,7 @@ vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T 
*slot_zero,
vchiq_loud_error_header();
vchiq_loud_error("couldn't create thread %s", threadname);
vchiq_loud_error_footer();
-   return VCHIQ_ERROR;
+   goto fail_free_handler_thread;
}
set_user_nice(state->recycle_thread, -19);
 
@@ -2574,7 +2574,7 @@ vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T 
*slot_zero,
vchiq_loud_error_header();
vchiq_loud_error("couldn't create thread %s", threadname);
vchiq_loud_error_footer();
-   return VCHIQ_ERROR;
+   goto fail_free_recycle_thread;
}
set_user_nice(state->sync_thread, -20);
 
@@ -2588,6 +2588,13 @@ vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T 
*slot_zero,
local->initialised = 1;
 
return status;
+
+fail_free_recycle_thread:
+   kthread_stop(state->recycle_thread);
+fail_free_handler_thread:
+   kthread_stop(state->slot_handler_thread);
+
+   return VCHIQ_ERROR;
 }
 
 /* Called from application thread when a client or server service is created. 
*/
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/11] staging: vchiq_arm: Avoid long udelay

2018-03-31 Thread Stefan Wahren
vchiq_initialise() is used in non-interrupt context, so we can
replace udelay with usleep_range as suggested by timers-howto.txt.

Signed-off-by: Stefan Wahren 
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 00cfc50..285849b 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -215,7 +215,7 @@ VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T 
*instance_out)
state = vchiq_get_state();
if (state)
break;
-   udelay(500);
+   usleep_range(500, 600);
}
if (i == VCHIQ_INIT_RETRIES) {
vchiq_log_error(vchiq_core_log_level,
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/11] staging: vchiq_arm: Make index variable more self-explaining

2018-03-31 Thread Stefan Wahren
The chance to mixup i and j is very high. So rename variable j to a more
explaining one.

Signed-off-by: Stefan Wahren 
---
 .../staging/vc04_services/interface/vchiq_arm/vchiq_arm.c  | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index aee721e..1259c26 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3425,7 +3425,7 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
 {
VCHIQ_ARM_STATE_T *arm_state = vchiq_platform_get_arm_state(state);
static struct service_data_struct service_data[64];
-   int i, j = 0;
+   int i, found = 0;
/* If there's more than 64 services, only dump ones with
 * non-zero counts */
int only_nonzero = 0;
@@ -3461,11 +3461,11 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
if (service_ptr->srvstate == VCHIQ_SRVSTATE_FREE)
continue;
 
-   service_data[j].fourcc = service_ptr->base.fourcc;
-   service_data[j].clientid = service_ptr->client_id;
-   service_data[j].use_count = service_ptr->service_use_count;
-   j++;
-   if (j >= ARRAY_SIZE(service_data))
+   service_data[found].fourcc = service_ptr->base.fourcc;
+   service_data[found].clientid = service_ptr->client_id;
+   service_data[found].use_count = service_ptr->service_use_count;
+   found++;
+   if (found >= ARRAY_SIZE(service_data))
break;
}
 
@@ -3484,7 +3484,7 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
"with non-zero use-count", active_services,
ARRAY_SIZE(service_data));
 
-   for (i = 0; i < j; i++) {
+   for (i = 0; i < found; i++) {
vchiq_log_warning(vchiq_susp_log_level,
"- %c%c%c%c:%d service count %d %s",
VCHIQ_FOURCC_AS_4CHARS(service_data[i].fourcc),
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/11] staging: vchiq_arm: Rework second abort criterion

2018-03-31 Thread Stefan Wahren
In order to make the code easier to review, move the second
abort criterion into the loop and the incrementation into
a separate line.

Signed-off-by: Stefan Wahren 
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index f276437..aee721e 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3449,7 +3449,7 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
if (active_services > ARRAY_SIZE(service_data))
only_nonzero = 1;
 
-   for (i = 0; (i < active_services) && (j < ARRAY_SIZE(service_data)); 
i++) {
+   for (i = 0; i < active_services; i++) {
VCHIQ_SERVICE_T *service_ptr = state->services[i];
 
if (!service_ptr)
@@ -3463,7 +3463,10 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
 
service_data[j].fourcc = service_ptr->base.fourcc;
service_data[j].clientid = service_ptr->client_id;
-   service_data[j++].use_count = service_ptr->service_use_count;
+   service_data[j].use_count = service_ptr->service_use_count;
+   j++;
+   if (j >= ARRAY_SIZE(service_data))
+   break;
}
 
read_unlock_bh(_state->susp_res_lock);
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/11] staging: vchiq_core: Fix missing semaphore release in error case

2018-03-31 Thread Stefan Wahren
The bail out branch in case of a invalid tx_pos missed a semaphore
release. Dan Carpenter found this with a static checker.

Fixes: d1eab9dec610 ("staging: vchiq_core: Bail out in case of invalid tx_pos")
Reported-by: Dan Carpenter 
Signed-off-by: Stefan Wahren 
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 5d28fff..80f6168 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -601,6 +601,7 @@ reserve_space(VCHIQ_STATE_T *state, size_t space, int 
is_blocking)
}
 
if (tx_pos == (state->slot_queue_available * VCHIQ_SLOT_SIZE)) {
+   up(>slot_available_event);
pr_warn("%s: invalid tx_pos: %d\n", __func__, tx_pos);
return NULL;
}
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/11] staging: vchiq_core: Remove stackhog in process_free_queue

2018-03-31 Thread Stefan Wahren
This removes the stackhog in process_free_queue by allocating the
necessary memory within the recycle thread main function instead
of the stack.

Signed-off-by: Stefan Wahren 
---
 .../vc04_services/interface/vchiq_arm/vchiq_core.c   | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 80f6168..cc5b72f 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -620,10 +620,9 @@ reserve_space(VCHIQ_STATE_T *state, size_t space, int 
is_blocking)
 
 /* Called by the recycle thread. */
 static void
-process_free_queue(VCHIQ_STATE_T *state)
+process_free_queue(VCHIQ_STATE_T *state, BITSET_T *service_found, size_t 
length)
 {
VCHIQ_SHARED_STATE_T *local = state->local;
-   BITSET_T service_found[BITSET_SIZE(VCHIQ_MAX_SERVICES)];
int slot_queue_available;
 
/* Find slots which have been freed by the other side, and return them
@@ -656,7 +655,7 @@ process_free_queue(VCHIQ_STATE_T *state)
 
/* Initialise the bitmask for services which have used this
** slot */
-   BITSET_ZERO(service_found);
+   memset(service_found, 0, length);
 
pos = 0;
 
@@ -2183,11 +2182,20 @@ recycle_func(void *v)
 {
VCHIQ_STATE_T *state = (VCHIQ_STATE_T *) v;
VCHIQ_SHARED_STATE_T *local = state->local;
+   BITSET_T *found;
+   size_t length;
+
+   length = sizeof(*found) * BITSET_SIZE(VCHIQ_MAX_SERVICES);
+
+   found = kmalloc_array(BITSET_SIZE(VCHIQ_MAX_SERVICES), sizeof(*found),
+ GFP_KERNEL);
+   if (!found)
+   return -ENOMEM;
 
while (1) {
remote_event_wait(state, >recycle);
 
-   process_free_queue(state);
+   process_free_queue(state, found, length);
}
return 0;
 }
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/11] staging: vchiq_arm: Fix multiline dereferences

2018-03-31 Thread Stefan Wahren
Multiline dereferences aren't nice to review. So fix this checkpatch
warning.

Signed-off-by: Stefan Wahren 
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 0985fd4..00cfc50 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -2128,9 +2128,11 @@ vchiq_release(struct inode *inode, struct file *file)
 
while (user_service->msg_remove !=
user_service->msg_insert) {
-   VCHIQ_HEADER_T *header = user_service->
-   msg_queue[user_service->msg_remove &
-   (MSG_QUEUE_SIZE - 1)];
+   VCHIQ_HEADER_T *header;
+   int m = user_service->msg_remove &
+   (MSG_QUEUE_SIZE - 1);
+
+   header = user_service->msg_queue[m];
user_service->msg_remove++;
spin_unlock(_queue_spinlock);
 
@@ -2666,8 +2668,7 @@ start_suspend_timer(VCHIQ_ARM_STATE_T *arm_state)
 {
del_timer(_state->suspend_timer);
arm_state->suspend_timer.expires = jiffies +
-   msecs_to_jiffies(arm_state->
-   suspend_timer_timeout);
+   msecs_to_jiffies(arm_state->suspend_timer_timeout);
add_timer(_state->suspend_timer);
arm_state->suspend_timer_running = 1;
 }
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/11] staging: vchiq_core: Move all wake-ups to one point

2018-03-31 Thread Stefan Wahren
Move all calls of wake_up_process to one point, whichs makes the
following implementation of clean-up code easier.

Signed-off-by: Stefan Wahren 
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 6915904..d4f2458 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -2553,7 +2553,6 @@ vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T 
*slot_zero,
return VCHIQ_ERROR;
}
set_user_nice(state->slot_handler_thread, -19);
-   wake_up_process(state->slot_handler_thread);
 
snprintf(threadname, sizeof(threadname), "vchiq-recy/%d", state->id);
state->recycle_thread = kthread_create(_func,
@@ -2566,7 +2565,6 @@ vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T 
*slot_zero,
return VCHIQ_ERROR;
}
set_user_nice(state->recycle_thread, -19);
-   wake_up_process(state->recycle_thread);
 
snprintf(threadname, sizeof(threadname), "vchiq-sync/%d", state->id);
state->sync_thread = kthread_create(_func,
@@ -2579,6 +2577,9 @@ vchiq_init_state(VCHIQ_STATE_T *state, VCHIQ_SLOT_ZERO_T 
*slot_zero,
return VCHIQ_ERROR;
}
set_user_nice(state->sync_thread, -20);
+
+   wake_up_process(state->slot_handler_thread);
+   wake_up_process(state->recycle_thread);
wake_up_process(state->sync_thread);
 
vchiq_states[0] = state;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/11] staging: vchiq_arm: Clear VLA warning

2018-03-31 Thread Stefan Wahren
The kernel would like to have all stack VLA usage removed[1]. The array
here is fixed (declared with a const variable) but it appears like a VLA
to the compiler. Also, currently we are putting 768 bytes on the
stack. So save stack space and removes the VLA build warning by
making it static.

[1]: https://lkml.org/lkml/2018/3/7/621

CC: Tobin C. Harding 
Signed-off-by: Stefan Wahren 
---
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c| 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 24d456b..f276437 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3414,13 +3414,18 @@ vchiq_release_service(VCHIQ_SERVICE_HANDLE_T handle)
return ret;
 }
 
+struct service_data_struct {
+   int fourcc;
+   int clientid;
+   int use_count;
+};
+
 void
 vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
 {
VCHIQ_ARM_STATE_T *arm_state = vchiq_platform_get_arm_state(state);
+   static struct service_data_struct service_data[64];
int i, j = 0;
-   /* Only dump 64 services */
-   static const int local_max_services = 64;
/* If there's more than 64 services, only dump ones with
 * non-zero counts */
int only_nonzero = 0;
@@ -3431,11 +3436,6 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
int peer_count;
int vc_use_count;
int active_services;
-   struct service_data_struct {
-   int fourcc;
-   int clientid;
-   int use_count;
-   } service_data[local_max_services];
 
if (!arm_state)
return;
@@ -3446,10 +3446,10 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
peer_count = arm_state->peer_use_count;
vc_use_count = arm_state->videocore_use_count;
active_services = state->unused_service;
-   if (active_services > local_max_services)
+   if (active_services > ARRAY_SIZE(service_data))
only_nonzero = 1;
 
-   for (i = 0; (i < active_services) && (j < local_max_services); i++) {
+   for (i = 0; (i < active_services) && (j < ARRAY_SIZE(service_data)); 
i++) {
VCHIQ_SERVICE_T *service_ptr = state->services[i];
 
if (!service_ptr)
@@ -3479,7 +3479,7 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state)
vchiq_log_warning(vchiq_susp_log_level, "Too many active "
"services (%d).  Only dumping up to first %d services "
"with non-zero use-count", active_services,
-   local_max_services);
+   ARRAY_SIZE(service_data));
 
for (i = 0; i < j; i++) {
vchiq_log_warning(vchiq_susp_log_level,
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/11] staging: vc04_services: Use __func__ macro

2018-03-31 Thread Stefan Wahren
It's better to use the __func__ macro instead of open-code the function
name. This fixes the following checkpatch warning:

WARNING: Prefer using '"%s...", __func__' to using 'x',
this function's name, in a string

Signed-off-by: Stefan Wahren 
---
 .../interface/vchiq_arm/vchiq_2835_arm.c   |  4 ++--
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c  | 22 +++---
 .../vc04_services/interface/vchiq_arm/vchiq_core.c | 22 +++---
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index afdd3e9..2b214a3 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -582,8 +582,8 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo,
struct page **pages= pagelistinfo->pages;
unsigned int num_pages = pagelistinfo->num_pages;
 
-   vchiq_log_trace(vchiq_arm_log_level, "free_pagelist - %pK, %d",
-   pagelistinfo->pagelist, actual);
+   vchiq_log_trace(vchiq_arm_log_level, "%s - %pK, %d",
+   __func__, pagelistinfo->pagelist, actual);
 
/*
 * NOTE: dma_unmap_sg must be called before the
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 1259c26..0985fd4 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -563,7 +563,7 @@ add_completion(VCHIQ_INSTANCE_T instance, VCHIQ_REASON_T 
reason,
/* Out of space - wait for the client */
DEBUG_TRACE(SERVICE_CALLBACK_LINE);
vchiq_log_trace(vchiq_arm_log_level,
-   "add_completion - completion queue full");
+   "%s - completion queue full", __func__);
DEBUG_COUNT(COMPLETION_QUEUE_FULL_COUNT);
if (down_interruptible(>remove_event) != 0) {
vchiq_log_info(vchiq_arm_log_level,
@@ -641,9 +641,9 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T 
*header,
return VCHIQ_SUCCESS;
 
vchiq_log_trace(vchiq_arm_log_level,
-   "service_callback - service %lx(%d,%p), reason %d, header %lx, "
+   "%s - service %lx(%d,%p), reason %d, header %lx, "
"instance %lx, bulk_userdata %lx",
-   (unsigned long)user_service,
+   __func__, (unsigned long)user_service,
service->localport, user_service->userdata,
reason, (unsigned long)header,
(unsigned long)instance, (unsigned long)bulk_userdata);
@@ -679,12 +679,12 @@ service_callback(VCHIQ_REASON_T reason, VCHIQ_HEADER_T 
*header,
if (down_interruptible(_service->remove_event)
!= 0) {
vchiq_log_info(vchiq_arm_log_level,
-   "service_callback interrupted");
+   "%s interrupted", __func__);
DEBUG_TRACE(SERVICE_CALLBACK_LINE);
return VCHIQ_RETRY;
} else if (instance->closing) {
vchiq_log_info(vchiq_arm_log_level,
-   "service_callback closing");
+   "%s closing", __func__);
DEBUG_TRACE(SERVICE_CALLBACK_LINE);
return VCHIQ_ERROR;
}
@@ -740,8 +740,8 @@ user_service_free(void *userdata)
 static void close_delivered(USER_SERVICE_T *user_service)
 {
vchiq_log_info(vchiq_arm_log_level,
-   "close_delivered(handle=%x)",
-   user_service->service->handle);
+   "%s(handle=%x)",
+   __func__, user_service->service->handle);
 
if (user_service->close_pending) {
/* Allow the underlying service to be culled */
@@ -872,8 +872,8 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned 
long arg)
DEBUG_INITIALISE(g_state.local)
 
vchiq_log_trace(vchiq_arm_log_level,
-   "vchiq_ioctl - instance %pK, cmd %s, arg %lx",
-   instance,
+   "%s - instance %pK, cmd %s, arg %lx",
+   __func__, instance,
((_IOC_TYPE(cmd) == VCHIQ_IOC_MAGIC) &&
(_IOC_NR(cmd) <= VCHIQ_IOC_MAX)) ?
ioctl_names[_IOC_NR(cmd)] : "", arg);
@@ -2078,8 +2078,8 @@ vchiq_release(struct inode *inode, struct file *file)
int i;
 
vchiq_log_info(vchiq_arm_log_level,
-   "vchiq_release: 

[PATCH 03/11] staging: vchiq_core: remove BITSET_ZERO

2018-03-31 Thread Stefan Wahren
Hiding memset behind a macro isn't the best, because it relies on that
the parameter is not a pointer. Luckily all user has been removed, so
we can remove BITSET_ZERO too.

Signed-off-by: Stefan Wahren 
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h 
b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index afc1d81..10deb57 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -147,7 +147,6 @@ vchiq_static_assert((sizeof(BITSET_T) * 8) == 32);
 #define BITSET_SIZE(b)((b + 31) >> 5)
 #define BITSET_WORD(b)(b >> 5)
 #define BITSET_BIT(b) (1 << (b & 31))
-#define BITSET_ZERO(bs)   memset(bs, 0, sizeof(bs))
 #define BITSET_IS_SET(bs, b)  (bs[BITSET_WORD(b)] & BITSET_BIT(b))
 #define BITSET_SET(bs, b) (bs[BITSET_WORD(b)] |= BITSET_BIT(b))
 #define BITSET_CLR(bs, b) (bs[BITSET_WORD(b)] &= ~BITSET_BIT(b))
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

2018-03-31 Thread Joe Perches
On Sat, 2018-03-31 at 11:41 +0300, Dan Carpenter wrote:
> On Fri, Mar 30, 2018 at 11:36:13PM -0700, Joe Perches wrote:
> > On Fri, 2018-03-30 at 23:07 -0700, Quytelda Kahja wrote:
> > > This macro, provided in 'linux/kernel.h', will calculate the size
> > > more succinctly than a division operation.
> > 
> > It's nice that you send patches, but please try to send a
> > cover letter with your patch series.
> > 
> 
> There are obviously times when a cover letter is required but what's the
> point of that for this particular series?

practice

> > Also, 75 patches is quite a lot for a staging patch series.
> > 
> > Please try to send fewer patches in your series, say a
> > maximum of 20 or so and see what happens to those patches
> > before sending the next set.
> 
> Do we really care about that for staging?

It seems like it matters most for staging as the submitters
are the least experienced nd most likely to get something
wrong.

Start small and build.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Patch to replace DEFINE_SEMAPHORE with DEFINE_BINARY_SEMAPHORE

2018-03-31 Thread Greg Kroah-Hartman
On Sat, Mar 31, 2018 at 07:16:21PM +0530, Wasim Nazir wrote:
> This message contains confidential information and is intended only for the 
> individual(s) named. If you are not the intended recipient, you are 
> notified that disclosing, copying, distributing or taking any action in 
> reliance on the contents of this mail and attached file/s is strictly 
> prohibited. Please notify the sender immediately and delete this e-mail 
> from your system. E-mail transmission cannot be guaranteed to be secured or 
> error-free as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses. The sender therefore does 
> not accept liability for any errors or omissions in the contents of this 
> message, which arise as a result of e-mail transmission.


This footer is not compatible with patches submitted to the kernel,
sorry.  email is now deleted.

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 68/75] staging: ks7010: Replace manual array copy with ether_addr_copy().

2018-03-31 Thread Dan Carpenter
I'm in a hurry because I'm leaving for a long weekend so I've reviewed
the first easy 67 patches but this one is tricky and I'm not able to
review it properly before I leave.

On Fri, Mar 30, 2018 at 11:08:48PM -0700, Quytelda Kahja wrote:
> Copying the dummy HW address into the struct net_device doesn't need
> to be done byte by byte; use ether_addr_copy() instead.

Fine.

> Additionally, dev->dev_addr is not eight bytes long.
> ether_setup() sets the dev->addr_len to ETH_ALEN (defined as 6)
> in the net core code.

So it's a buffer overflow?  The subject should have mentioned that this
is a bug fix.  But I'm not sure it is.  dev->dev_addr is MAX_ADDR_LEN (32)
bytes long I believe.  See dev_addr_init() for details.

The commit message didn't make it clear that you were getting rid of
priv->eth_addr.  It's a good change, but it confused me and I am in a
hurry.

> 
> Signed-off-by: Quytelda Kahja 
> ---
>  drivers/staging/ks7010/ks_hostif.c   | 29 +++--
>  drivers/staging/ks7010/ks_wlan.h |  2 --
>  drivers/staging/ks7010/ks_wlan_net.c | 13 ++---
>  3 files changed, 13 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_hostif.c 
> b/drivers/staging/ks7010/ks_hostif.c
> index 1eff78540683..23c637ef147d 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -388,6 +388,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private 
> *priv,
>  static
>  void hostif_data_indication(struct ks_wlan_private *priv)
>  {
> + struct net_device *dev = priv->net_dev;
>   unsigned int rx_ind_size;   /* indicate data size */
>   struct sk_buff *skb;
>   unsigned short auth_type;
> @@ -411,9 +412,9 @@ void hostif_data_indication(struct ks_wlan_private *priv)
>   eth_proto = ntohs(eth_hdr->h_proto);
>  
>   /* source address check */
> - if (memcmp(>eth_addr[0], eth_hdr->h_source, ETH_ALEN) == 0) {
> - netdev_err(priv->net_dev, "invalid : source is own mac address 
> !!\n");
> - netdev_err(priv->net_dev,
> + if (memcmp(dev->dev_addr, eth_hdr->h_source, ETH_ALEN) == 0) {
> + netdev_err(dev, "invalid : source is own mac address !!\n");
> + netdev_err(dev,
>  
> "eth_hdrernet->h_dest=%02X:%02X:%02X:%02X:%02X:%02X\n",
>  eth_hdr->h_source[0], eth_hdr->h_source[1],
>  eth_hdr->h_source[2], eth_hdr->h_source[3],
> @@ -443,7 +444,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
>   priv->nstats.rx_dropped++;
>   return;
>   }
> - netdev_dbg(priv->net_dev, "SNAP, rx_ind_size = %d\n",
> + netdev_dbg(dev, "SNAP, rx_ind_size = %d\n",
>  rx_ind_size);

I don't like the printk cleanups.  They belong in a separate patch and
they make it harder for reviewers in a hurry to see what the patch is
doing.

Sorry, gotta run...

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 71/75] staging: ks7010: Remove dummy address set.

2018-03-31 Thread Dan Carpenter
On Fri, Mar 30, 2018 at 11:08:51PM -0700, Quytelda Kahja wrote:
> Setting a dummy address during the driver probe is not necessary.
> The dev_addr field is already zeroed out from alloc_etherdev().
> 
> Signed-off-by: Quytelda Kahja 
> ---
>  drivers/staging/ks7010/ks_wlan_net.c | 6 --
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
> b/drivers/staging/ks7010/ks_wlan_net.c
> index 5c5569000fce..afbc472baa05 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -2852,9 +2852,6 @@ int ks_wlan_close(struct net_device *dev)
>  /* Operational parameters that usually are not changed. */
>  /* Time in jiffies before concluding the transmitter is hung. */
>  #define TX_TIMEOUT  (3 * HZ)
> -static const unsigned char dummy_addr[] = {
> - 0x00, 0x0b, 0xe3, 0x00, 0x00, 0x00

Of course, this isn't a zero address.  Do we know why they chose this
particular address?  I was expecting it to be zero from the patch
description.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 69/75] staging: ks7010: Remove extra blank line between functions.

2018-03-31 Thread Dan Carpenter
On Fri, Mar 30, 2018 at 11:08:49PM -0700, Quytelda Kahja wrote:
> Remove an extra blank line indicated by checkpatch.
> 
> Signed-off-by: Quytelda Kahja 
> ---
>  drivers/staging/ks7010/ks7010_sdio.c | 3 ++-
>  drivers/staging/ks7010/ks_hostif.c   | 1 -
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
> b/drivers/staging/ks7010/ks7010_sdio.c
> index d083bf8d238e..930d1f7d7dbf 100644
> --- a/drivers/staging/ks7010/ks7010_sdio.c
> +++ b/drivers/staging/ks7010/ks7010_sdio.c
> @@ -305,7 +305,8 @@ static void tx_device_task(struct ks_wlan_private *priv)
>   if (priv->dev_state >= DEVICE_STATE_BOOT) {
>   ret = write_to_device(priv, sp->sendp, sp->size);
>   if (ret) {
> - netdev_err(priv->net_dev, "write_to_device error 
> !!(%d)\n", ret);
> + netdev_err(priv->net_dev,
> +"write_to_device() error (%d)!\n", ret);

Doesn't match the patch description...

>   queue_delayed_work(priv->wq, >rw_dwork, 1);
>   return;
>   }

regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

2018-03-31 Thread Dan Carpenter
On Fri, Mar 30, 2018 at 11:36:13PM -0700, Joe Perches wrote:
> On Fri, 2018-03-30 at 23:07 -0700, Quytelda Kahja wrote:
> > This macro, provided in 'linux/kernel.h', will calculate the size
> > more succinctly than a division operation.
> 
> It's nice that you send patches, but please try to send a
> cover letter with your patch series.
> 

There are obviously times when a cover letter is required but what's the
point of that for this particular series?  What do you want the cover
letter to say here that isn't obvious to everyone just from glancing at
their inbox?

> Also, 75 patches is quite a lot for a staging patch series.
> 
> Please try to send fewer patches in your series, say a
> maximum of 20 or so and see what happens to those patches
> before sending the next set.

Do we really care about that for staging?  I can review the first 67
patches basically automatically so they take me about 5 seconds each.  I
feel like splitting it up risks introducing more conflicts so it
actually makes the process harder/worse.

regards,
dan carpenter


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

2018-03-31 Thread Joe Perches
On Fri, 2018-03-30 at 23:07 -0700, Quytelda Kahja wrote:
> This macro, provided in 'linux/kernel.h', will calculate the size
> more succinctly than a division operation.

It's nice that you send patches, but please try to send a
cover letter with your patch series.

Also, 75 patches is quite a lot for a staging patch series.

Please try to send fewer patches in your series, say a
maximum of 20 or so and see what happens to those patches
before sending the next set.

Thanks.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 75/75] staging: ks7010: Replace memcpy() with ether_addr_copy().

2018-03-31 Thread Quytelda Kahja
ether_addr_copy() is the function for copying a hardware address,
so replace the manual memcpy() operation with ether_addr_copy().

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index b5a2ba702dec..a461dd568d28 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -522,7 +522,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
case DOT11_MAC_ADDRESS:
/* MAC address */
hostif_sme_enqueue(priv, SME_GET_MAC_ADDRESS);
-   memcpy(dev->dev_addr, priv->rxp, ETH_ALEN);
+   ether_addr_copy(dev->dev_addr, priv->rxp);
priv->mac_address_valid = true;
netdev_info(dev, "MAC ADDRESS = %pM\n", dev->dev_addr);
break;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 69/75] staging: ks7010: Remove extra blank line between functions.

2018-03-31 Thread Quytelda Kahja
Remove an extra blank line indicated by checkpatch.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks7010_sdio.c | 3 ++-
 drivers/staging/ks7010/ks_hostif.c   | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index d083bf8d238e..930d1f7d7dbf 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -305,7 +305,8 @@ static void tx_device_task(struct ks_wlan_private *priv)
if (priv->dev_state >= DEVICE_STATE_BOOT) {
ret = write_to_device(priv, sp->sendp, sp->size);
if (ret) {
-   netdev_err(priv->net_dev, "write_to_device error 
!!(%d)\n", ret);
+   netdev_err(priv->net_dev,
+  "write_to_device() error (%d)!\n", ret);
queue_delayed_work(priv->wq, >rw_dwork, 1);
return;
}
diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 23c637ef147d..d816a06939aa 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -221,7 +221,6 @@ static u8 read_ie(unsigned char *bp, u8 max, u8 *body)
return size;
 }
 
-
 static
 int get_ap_information(struct ks_wlan_private *priv, struct ap_info *ap_info,
   struct local_ap *ap)
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 65/75] staging: ks7010: Remove trailing _t from 'struct pmk_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct pmk_t' with 'struct pmk'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c   | 2 +-
 drivers/staging/ks7010/ks_wlan.h | 2 +-
 drivers/staging/ks7010/ks_wlan_net.c | 8 
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index fbe18ddf3ea0..f87e707e8bd3 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -2130,7 +2130,7 @@ void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
u8 pmkid[IW_PMKID_LEN];
} __packed list[PMK_LIST_MAX];
} __packed pmkcache;
-   struct pmk_t *pmk;
+   struct pmk *pmk;
int i;
 
i = 0;
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 69eac00e75b1..20b584524a77 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -383,7 +383,7 @@ struct wpa_status {
 struct pmk_list {
u16 size;
struct list_head head;
-   struct pmk_t {
+   struct pmk {
struct list_head list;
u8 bssid[ETH_ALEN];
u8 pmkid[IW_PMKID_LEN];
diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index 1b8234720d78..72a52c6f9fd2 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -1818,7 +1818,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
struct ks_wlan_private *priv = netdev_priv(dev);
struct iw_pmksa *pmksa;
int i;
-   struct pmk_t *pmk;
+   struct pmk *pmk;
struct list_head *ptr;
 
if (priv->sleep_mode == SLP_SLEEP)
@@ -1847,7 +1847,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
}
/* search cache data */
list_for_each(ptr, >pmklist.head) {
-   pmk = list_entry(ptr, struct pmk_t, list);
+   pmk = list_entry(ptr, struct pmk, list);
if (memcmp(pmksa->bssid.sa_data, pmk->bssid, ETH_ALEN) 
== 0) {
memcpy(pmk->pmkid, pmksa->pmkid, IW_PMKID_LEN);
list_move(>list, >pmklist.head);
@@ -1869,7 +1869,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
list_add(>list, >pmklist.head);
priv->pmklist.size++;
} else {/* overwrite old cache data */
-   pmk = list_entry(priv->pmklist.head.prev, struct pmk_t,
+   pmk = list_entry(priv->pmklist.head.prev, struct pmk,
 list);
memcpy(pmk->bssid, pmksa->bssid.sa_data, ETH_ALEN);
memcpy(pmk->pmkid, pmksa->pmkid, IW_PMKID_LEN);
@@ -1882,7 +1882,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
}
/* search cache data */
list_for_each(ptr, >pmklist.head) {
-   pmk = list_entry(ptr, struct pmk_t, list);
+   pmk = list_entry(ptr, struct pmk, list);
if (memcmp(pmksa->bssid.sa_data, pmk->bssid, ETH_ALEN) 
== 0) {
eth_zero_addr(pmk->bssid);
memset(pmk->pmkid, 0, IW_PMKID_LEN);
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 61/75] staging: ks7010: Remove trailing _t from 'struct wpa_key_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct wpa_key_t' with 'struct wpa_key'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c   | 2 +-
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 drivers/staging/ks7010/ks_wlan_net.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 0e6f9e954a36..d8b40fd83b6b 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -318,7 +318,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
struct michael_mic_t michael_mic;
union iwreq_data wrqu;
unsigned int key_index = auth_type - 1;
-   struct wpa_key_t *key = >wpa.key[key_index];
+   struct wpa_key *key = >wpa.key[key_index];
 
eth_hdr = (struct ether_hdr *)(priv->rxp);
eth_proto = ntohs(eth_hdr->h_proto);
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index ece9950ba893..2458dbba66a0 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -339,7 +339,7 @@ enum {
 
 #define MIC_KEY_SIZE 8
 
-struct wpa_key_t {
+struct wpa_key {
u32 ext_flags;  /* IW_ENCODE_EXT_xxx */
u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE];  /* LSB first */
u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE];  /* LSB first */
@@ -373,7 +373,7 @@ struct wpa_status_t {
int key_mgmt_suite; /* authentication key management suite */
int auth_alg;
int txkey;
-   struct wpa_key_t key[WPA_KEY_INDEX_MAX];
+   struct wpa_key key[WPA_KEY_INDEX_MAX];
struct scan_ext scan_ext;
struct mic_failure_t mic_failure;
 };
diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index a4f10bec865f..1b8234720d78 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -1706,7 +1706,7 @@ static int ks_wlan_set_encode_ext(struct net_device *dev,
struct iw_encode_ext *enc;
int index = dwrq->flags & IW_ENCODE_INDEX;
unsigned int commit = 0;
-   struct wpa_key_t *key;
+   struct wpa_key *key;
 
enc = (struct iw_encode_ext *)extra;
if (!enc)
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 74/75] staging: ks7010: Replace memcmp() with ether_addr_equal().

2018-03-31 Thread Quytelda Kahja
ether_addr_equal() is the function for comparing HW addresses,
so remove the manual memcmp operation and replace it with
ether_addr_equals().

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index d816a06939aa..b5a2ba702dec 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -411,7 +411,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
eth_proto = ntohs(eth_hdr->h_proto);
 
/* source address check */
-   if (memcmp(dev->dev_addr, eth_hdr->h_source, ETH_ALEN) == 0) {
+   if (ether_addr_equal(dev->dev_addr, eth_hdr->h_source)) {
netdev_err(dev, "invalid : source is own mac address !!\n");
netdev_err(dev,
   
"eth_hdrernet->h_dest=%02X:%02X:%02X:%02X:%02X:%02X\n",
@@ -1103,7 +1103,7 @@ int hostif_data_request(struct ks_wlan_private *priv, 
struct sk_buff *skb)
 
/* skb check */
eth = (struct ethhdr *)skb->data;
-   if (memcmp(priv->net_dev->dev_addr, eth->h_source, ETH_ALEN) != 0) {
+   if (ether_addr_equal(priv->net_dev->dev_addr, eth->h_source)) {
netdev_err(priv->net_dev, "invalid mac address !!\n");
netdev_err(priv->net_dev, "ethernet->h_source=%pM\n", 
eth->h_source);
ret = -ENXIO;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 53/75] staging: ks7010: Remove trailing _t from 'struct wps_ie_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct wps_ie_t' with 'struct wps_ie'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 10ff4460594f..30d81f9456b7 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -211,7 +211,7 @@ struct rsn_ie {
 
 #ifdef WPS
 #define WPS_IE_BODY_MAX 255
-struct wps_ie_t {
+struct wps_ie {
u8 id;  /* 221 'dd  00 50 F2 04' */
u8 size;/* max ? 255 ? */
u8 body[WPS_IE_BODY_MAX];
@@ -238,7 +238,7 @@ struct local_ap_t {
struct rsn_ie wpa_ie;
struct rsn_ie rsn_ie;
 #ifdef WPS
-   struct wps_ie_t wps_ie;
+   struct wps_ie wps_ie;
 #endif /* WPS */
 };
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 58/75] staging: ks7010: Remove trailing _t from 'struct power_save_status_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct power_save_status_t' with 'struct
power_save_status'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index f99b00344d39..edd13060c24c 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -278,7 +278,7 @@ enum {
PS_WAKEUP
 };
 
-struct power_save_status_t {
+struct power_save_status {
atomic_t status;/* initialvalue 0 */
struct completion wakeup_wait;
atomic_t confirm_wait;
@@ -425,7 +425,7 @@ struct ks_wlan_private {
 
struct local_aplist aplist;
struct local_ap current_ap;
-   struct power_save_status_t psstatus;
+   struct power_save_status psstatus;
struct sleep_status_t sleepstatus;
struct wpa_status_t wpa;
struct pmk_list_t pmklist;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 70/75] staging: ks7010: Rename ks_wlan_set_multicast_list()

2018-03-31 Thread Quytelda Kahja
All of the net_device_ops callbacks are named after their counterparts
in the kernel's 'struct net_device_ops', except
ks_wlan_set_multicast_list().  Rename it to ks_wlan_set_rx_mode() for
greater consistency.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan_net.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index 35c615433687..5c5569000fce 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -73,7 +73,7 @@ static int ks_wlan_open(struct net_device *dev);
 static void ks_wlan_tx_timeout(struct net_device *dev);
 static int ks_wlan_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static int ks_wlan_close(struct net_device *dev);
-static void ks_wlan_set_multicast_list(struct net_device *dev);
+static void ks_wlan_set_rx_mode(struct net_device *dev);
 static struct net_device_stats *ks_wlan_get_stats(struct net_device *dev);
 static int ks_wlan_set_mac_address(struct net_device *dev, void *addr);
 static int ks_wlan_netdev_ioctl(struct net_device *dev, struct ifreq *rq,
@@ -2816,7 +2816,7 @@ void send_packet_complete(struct ks_wlan_private *priv, 
struct sk_buff *skb)
  * This routine is not state sensitive and need not be SMP locked.
  */
 static
-void ks_wlan_set_multicast_list(struct net_device *dev)
+void ks_wlan_set_rx_mode(struct net_device *dev)
 {
struct ks_wlan_private *priv = netdev_priv(dev);
 
@@ -2864,7 +2864,7 @@ static const struct net_device_ops ks_wlan_netdev_ops = {
.ndo_set_mac_address = ks_wlan_set_mac_address,
.ndo_get_stats = ks_wlan_get_stats,
.ndo_tx_timeout = ks_wlan_tx_timeout,
-   .ndo_set_rx_mode = ks_wlan_set_multicast_list,
+   .ndo_set_rx_mode = ks_wlan_set_rx_mode,
 };
 
 int ks_wlan_net_start(struct net_device *dev)
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 63/75] staging: ks7010: Remove trailing _t from 'struct wpa_status_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct wpa_status_t' with 'struct wpa_status'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index c3e61021a75a..851721182b05 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -364,7 +364,7 @@ struct mic_failure {
int stop;   /* stop flag */
 };
 
-struct wpa_status_t {
+struct wpa_status {
int wpa_enabled;
unsigned int rsn_enabled;
int version;
@@ -427,7 +427,7 @@ struct ks_wlan_private {
struct local_ap current_ap;
struct power_save_status psstatus;
struct sleep_status sleepstatus;
-   struct wpa_status_t wpa;
+   struct wpa_status wpa;
struct pmk_list_t pmklist;
/* wireless parameter */
struct ks_wlan_parameter reg;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 73/75] staging: ks7010: Remove unnecessary casts in 'struct ks_wlan_handler_def'.

2018-03-31 Thread Quytelda Kahja
The casts used when initializing members of this data structure mirror
the types the variables already have.  Remove the casts.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan_net.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index e1773e57cbb0..d6fa2bfb6a6d 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -2705,9 +2705,9 @@ static const struct iw_handler_def ks_wlan_handler_def = {
.num_standard = ARRAY_SIZE(ks_wlan_handler),
.num_private = ARRAY_SIZE(ks_wlan_private_handler),
.num_private_args = ARRAY_SIZE(ks_wlan_private_args),
-   .standard = (iw_handler *)ks_wlan_handler,
-   .private = (iw_handler *)ks_wlan_private_handler,
-   .private_args = (struct iw_priv_args *)ks_wlan_private_args,
+   .standard = ks_wlan_handler,
+   .private = ks_wlan_private_handler,
+   .private_args = ks_wlan_private_args,
.get_wireless_stats = ks_get_wireless_stats,
 };
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 55/75] staging: ks7010: Remove trailing _t from 'struct local_aplist_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct local_aplist_t' with 'struct local_aplist'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 3104ff92c453..57b21d3a2435 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -244,7 +244,7 @@ struct local_ap {
 
 #define LOCAL_APLIST_MAX 31
 #define LOCAL_CURRENT_AP LOCAL_APLIST_MAX
-struct local_aplist_t {
+struct local_aplist {
int size;
struct local_ap ap[LOCAL_APLIST_MAX + 1];
 };
@@ -423,7 +423,7 @@ struct ks_wlan_private {
 
unsigned char eth_addr[ETH_ALEN];
 
-   struct local_aplist_t aplist;
+   struct local_aplist aplist;
struct local_ap current_ap;
struct power_save_status_t psstatus;
struct sleep_status_t sleepstatus;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 68/75] staging: ks7010: Replace manual array copy with ether_addr_copy().

2018-03-31 Thread Quytelda Kahja
Copying the dummy HW address into the struct net_device doesn't need
to be done byte by byte; use ether_addr_copy() instead.
Additionally, dev->dev_addr is not eight bytes long.
ether_setup() sets the dev->addr_len to ETH_ALEN (defined as 6)
in the net core code.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c   | 29 +++--
 drivers/staging/ks7010/ks_wlan.h |  2 --
 drivers/staging/ks7010/ks_wlan_net.c | 13 ++---
 3 files changed, 13 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 1eff78540683..23c637ef147d 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -388,6 +388,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
 static
 void hostif_data_indication(struct ks_wlan_private *priv)
 {
+   struct net_device *dev = priv->net_dev;
unsigned int rx_ind_size;   /* indicate data size */
struct sk_buff *skb;
unsigned short auth_type;
@@ -411,9 +412,9 @@ void hostif_data_indication(struct ks_wlan_private *priv)
eth_proto = ntohs(eth_hdr->h_proto);
 
/* source address check */
-   if (memcmp(>eth_addr[0], eth_hdr->h_source, ETH_ALEN) == 0) {
-   netdev_err(priv->net_dev, "invalid : source is own mac address 
!!\n");
-   netdev_err(priv->net_dev,
+   if (memcmp(dev->dev_addr, eth_hdr->h_source, ETH_ALEN) == 0) {
+   netdev_err(dev, "invalid : source is own mac address !!\n");
+   netdev_err(dev,
   
"eth_hdrernet->h_dest=%02X:%02X:%02X:%02X:%02X:%02X\n",
   eth_hdr->h_source[0], eth_hdr->h_source[1],
   eth_hdr->h_source[2], eth_hdr->h_source[3],
@@ -443,7 +444,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
priv->nstats.rx_dropped++;
return;
}
-   netdev_dbg(priv->net_dev, "SNAP, rx_ind_size = %d\n",
+   netdev_dbg(dev, "SNAP, rx_ind_size = %d\n",
   rx_ind_size);
 
size = ETH_ALEN * 2;
@@ -463,7 +464,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
priv->nstats.rx_dropped++;
return;
}
-   netdev_dbg(priv->net_dev, "NETBEUI/NetBIOS rx_ind_size=%d\n",
+   netdev_dbg(dev, "NETBEUI/NetBIOS rx_ind_size=%d\n",
   rx_ind_size);
 
/* 8802/FDDI MAC copy */
@@ -480,7 +481,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
aa1x_hdr = (struct ieee802_1x_hdr *)(priv->rxp + 14);
break;
default:/* other rx data */
-   netdev_err(priv->net_dev, "invalid data format\n");
+   netdev_err(dev, "invalid data format\n");
priv->nstats.rx_errors++;
return;
}
@@ -522,17 +523,9 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
case DOT11_MAC_ADDRESS:
/* MAC address */
hostif_sme_enqueue(priv, SME_GET_MAC_ADDRESS);
-   memcpy(priv->eth_addr, priv->rxp, ETH_ALEN);
+   memcpy(dev->dev_addr, priv->rxp, ETH_ALEN);
priv->mac_address_valid = true;
-   dev->dev_addr[0] = priv->eth_addr[0];
-   dev->dev_addr[1] = priv->eth_addr[1];
-   dev->dev_addr[2] = priv->eth_addr[2];
-   dev->dev_addr[3] = priv->eth_addr[3];
-   dev->dev_addr[4] = priv->eth_addr[4];
-   dev->dev_addr[5] = priv->eth_addr[5];
-   dev->dev_addr[6] = 0x00;
-   dev->dev_addr[7] = 0x00;
-   netdev_info(dev, "MAC ADDRESS = %pM\n", priv->eth_addr);
+   netdev_info(dev, "MAC ADDRESS = %pM\n", dev->dev_addr);
break;
case DOT11_PRODUCT_VERSION:
/* firmware version */
@@ -,7 +1104,7 @@ int hostif_data_request(struct ks_wlan_private *priv, 
struct sk_buff *skb)
 
/* skb check */
eth = (struct ethhdr *)skb->data;
-   if (memcmp(>eth_addr[0], eth->h_source, ETH_ALEN) != 0) {
+   if (memcmp(priv->net_dev->dev_addr, eth->h_source, ETH_ALEN) != 0) {
netdev_err(priv->net_dev, "invalid mac address !!\n");
netdev_err(priv->net_dev, "ethernet->h_source=%pM\n", 
eth->h_source);
ret = -ENXIO;
@@ -2167,7 +2160,7 @@ void hostif_sme_execute(struct ks_wlan_private *priv, int 
event)
case SME_MACADDRESS_SET_REQUEST:
hostif_mib_set_request(priv, LOCAL_CURRENTADDRESS, ETH_ALEN,
   MIB_VALUE_TYPE_OSTRING,
-  >eth_addr[0]);
+  priv->net_dev->dev_addr);

[PATCH v2 67/75] staging: ks7010: Remove trailing _t from 'struct michael_mic_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct michael_mic_t' with 'struct michael_mic'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c   |  4 ++--
 drivers/staging/ks7010/michael_mic.c | 12 ++--
 drivers/staging/ks7010/michael_mic.h |  4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index f87e707e8bd3..1eff78540683 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -315,7 +315,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
char buf[128];
unsigned long now;
struct mic_failure *mic_failure;
-   struct michael_mic_t michael_mic;
+   struct michael_mic michael_mic;
union iwreq_data wrqu;
unsigned int key_index = auth_type - 1;
struct wpa_key *key = >wpa.key[key_index];
@@ -1065,7 +1065,7 @@ int hostif_data_request(struct ks_wlan_private *priv, 
struct sk_buff *skb)
int result = 0;
unsigned short eth_proto;
struct ether_hdr *eth_hdr;
-   struct michael_mic_t michael_mic;
+   struct michael_mic michael_mic;
unsigned short keyinfo = 0;
struct ieee802_1x_hdr *aa1x_hdr;
struct wpa_eapol_key *eap_key;
diff --git a/drivers/staging/ks7010/michael_mic.c 
b/drivers/staging/ks7010/michael_mic.c
index 292eae29c552..51862bcf5f58 100644
--- a/drivers/staging/ks7010/michael_mic.c
+++ b/drivers/staging/ks7010/michael_mic.c
@@ -17,14 +17,14 @@
 
 
 // Reset the state to the empty message.
-static inline void michael_clear(struct michael_mic_t *mic)
+static inline void michael_clear(struct michael_mic *mic)
 {
mic->l = mic->k0;
mic->r = mic->k1;
mic->m_bytes = 0;
 }
 
-static void michael_init(struct michael_mic_t *mic, u8 *key)
+static void michael_init(struct michael_mic *mic, u8 *key)
 {
// Set the key
mic->k0 = get_unaligned_le32(key);
@@ -34,7 +34,7 @@ static void michael_init(struct michael_mic_t *mic, u8 *key)
michael_clear(mic);
 }
 
-static inline void michael_block(struct michael_mic_t *mic)
+static inline void michael_block(struct michael_mic *mic)
 {
mic->r ^= rol32(mic->l, 17);
mic->l += mic->r;
@@ -47,7 +47,7 @@ static inline void michael_block(struct michael_mic_t *mic)
mic->l += mic->r;
 }
 
-static void michael_append(struct michael_mic_t *mic, u8 *src, int bytes)
+static void michael_append(struct michael_mic *mic, u8 *src, int bytes)
 {
int addlen;
 
@@ -81,7 +81,7 @@ static void michael_append(struct michael_mic_t *mic, u8 
*src, int bytes)
}
 }
 
-static void michael_get_mic(struct michael_mic_t *mic, u8 *dst)
+static void michael_get_mic(struct michael_mic *mic, u8 *dst)
 {
u8 *data = mic->m;
 
@@ -110,7 +110,7 @@ static void michael_get_mic(struct michael_mic_t *mic, u8 
*dst)
michael_clear(mic);
 }
 
-void michael_mic_function(struct michael_mic_t *mic, u8 *key,
+void michael_mic_function(struct michael_mic *mic, u8 *key,
  u8 *data, int len, u8 priority, u8 *result)
 {
u8 pad_data[4] = { priority, 0, 0, 0 };
diff --git a/drivers/staging/ks7010/michael_mic.h 
b/drivers/staging/ks7010/michael_mic.h
index 894a8d4121a4..d33508070088 100644
--- a/drivers/staging/ks7010/michael_mic.h
+++ b/drivers/staging/ks7010/michael_mic.h
@@ -10,7 +10,7 @@
  */
 
 /* MichaelMIC routine define */
-struct michael_mic_t {
+struct michael_mic {
u32 k0; // Key
u32 k1; // Key
u32 l;  // Current state
@@ -20,5 +20,5 @@ struct michael_mic_t {
u8 result[8];
 };
 
-void michael_mic_function(struct michael_mic_t *mic, u8 *key,
+void michael_mic_function(struct michael_mic *mic, u8 *key,
  u8 *data, int len, u8 priority, u8 *result);
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 64/75] staging: ks7010: Remove trailing _t from 'struct pmk_list_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct pmk_list_t' with 'struct pmk_list'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 851721182b05..69eac00e75b1 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -380,7 +380,7 @@ struct wpa_status {
 
 #include 
 #define PMK_LIST_MAX 8
-struct pmk_list_t {
+struct pmk_list {
u16 size;
struct list_head head;
struct pmk_t {
@@ -428,7 +428,7 @@ struct ks_wlan_private {
struct power_save_status psstatus;
struct sleep_status sleepstatus;
struct wpa_status wpa;
-   struct pmk_list_t pmklist;
+   struct pmk_list pmklist;
/* wireless parameter */
struct ks_wlan_parameter reg;
u8 current_rate;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 71/75] staging: ks7010: Remove dummy address set.

2018-03-31 Thread Quytelda Kahja
Setting a dummy address during the driver probe is not necessary.
The dev_addr field is already zeroed out from alloc_etherdev().

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan_net.c | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index 5c5569000fce..afbc472baa05 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -2852,9 +2852,6 @@ int ks_wlan_close(struct net_device *dev)
 /* Operational parameters that usually are not changed. */
 /* Time in jiffies before concluding the transmitter is hung. */
 #define TX_TIMEOUT  (3 * HZ)
-static const unsigned char dummy_addr[] = {
-   0x00, 0x0b, 0xe3, 0x00, 0x00, 0x00
-};
 
 static const struct net_device_ops ks_wlan_netdev_ops = {
.ndo_start_xmit = ks_wlan_start_xmit,
@@ -2882,9 +2879,6 @@ int ks_wlan_net_start(struct net_device *dev)
atomic_set(_phyinfo, 0);
timer_setup(_phyinfo_timer, ks_wlan_update_phyinfo_timeout, 0);
 
-   /* dummy address set */
-   ether_addr_copy(dev->dev_addr, dummy_addr);
-
/* The ks_wlan-specific entries in the device structure. */
dev->netdev_ops = _wlan_netdev_ops;
dev->wireless_handlers = _wlan_handler_def;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 54/75] staging: ks7010: Remove trailing _t from 'struct local_ap_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct local_ap_t' with 'struct local_ap'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c   | 10 +-
 drivers/staging/ks7010/ks_wlan.h |  6 +++---
 drivers/staging/ks7010/ks_wlan_net.c |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 2f732d8bcc4f..0e6f9e954a36 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -109,14 +109,14 @@ int ks_wlan_do_power_save(struct ks_wlan_private *priv)
 static
 int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info *ap_info)
 {
-   struct local_ap_t *ap;
+   struct local_ap *ap;
union iwreq_data wrqu;
struct net_device *netdev = priv->net_dev;
 
ap = >current_ap;
 
if (is_disconnect_status(priv->connect_status)) {
-   memset(ap, 0, sizeof(struct local_ap_t));
+   memset(ap, 0, sizeof(struct local_ap));
return -EPERM;
}
 
@@ -224,12 +224,12 @@ static u8 read_ie(unsigned char *bp, u8 max, u8 *body)
 
 static
 int get_ap_information(struct ks_wlan_private *priv, struct ap_info *ap_info,
-  struct local_ap_t *ap)
+  struct local_ap *ap)
 {
unsigned char *bp;
int bsize, offset;
 
-   memset(ap, 0, sizeof(struct local_ap_t));
+   memset(ap, 0, sizeof(struct local_ap));
 
/* bssid */
memcpy(ap->bssid, ap_info->bssid, ETH_ALEN);
@@ -2359,7 +2359,7 @@ void hostif_sme_enqueue(struct ks_wlan_private *priv, 
unsigned short event)
 
 static inline void hostif_aplist_init(struct ks_wlan_private *priv)
 {
-   size_t size = LOCAL_APLIST_MAX * sizeof(struct local_ap_t);
+   size_t size = LOCAL_APLIST_MAX * sizeof(struct local_ap);
priv->aplist.size = 0;
memset(>aplist.ap[0], 0, size);
 }
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 30d81f9456b7..3104ff92c453 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -218,7 +218,7 @@ struct wps_ie {
 } __packed;
 #endif /* WPS */
 
-struct local_ap_t {
+struct local_ap {
u8 bssid[6];
u8 rssi;
u8 sq;
@@ -246,7 +246,7 @@ struct local_ap_t {
 #define LOCAL_CURRENT_AP LOCAL_APLIST_MAX
 struct local_aplist_t {
int size;
-   struct local_ap_t ap[LOCAL_APLIST_MAX + 1];
+   struct local_ap ap[LOCAL_APLIST_MAX + 1];
 };
 
 struct local_gain_t {
@@ -424,7 +424,7 @@ struct ks_wlan_private {
unsigned char eth_addr[ETH_ALEN];
 
struct local_aplist_t aplist;
-   struct local_ap_t current_ap;
+   struct local_ap current_ap;
struct power_save_status_t psstatus;
struct sleep_status_t sleepstatus;
struct wpa_status_t wpa;
diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index 533feef604a9..a4f10bec865f 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -1301,7 +1301,7 @@ static int ks_wlan_set_scan(struct net_device *dev,
 static inline char *ks_wlan_translate_scan(struct net_device *dev,
   struct iw_request_info *info,
   char *current_ev, char *end_buf,
-  struct local_ap_t *ap)
+  struct local_ap *ap)
 {
/* struct ks_wlan_private *priv = (struct ks_wlan_private *)dev->priv; 
*/
struct iw_event iwe;/* Temporary buffer */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 40/75] staging: ks7010: Remove trailing _t from 'struct association_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct association_request_t' with 'struct
association_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index a177496dd42a..43d06fdda9de 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -863,7 +863,7 @@ void hostif_adhoc_set_confirm(struct ks_wlan_private *priv)
 static
 void hostif_associate_indication(struct ks_wlan_private *priv)
 {
-   struct association_request_t *assoc_req;
+   struct association_request *assoc_req;
struct association_response_t *assoc_resp;
unsigned char *pb;
union iwreq_data wrqu;
@@ -874,7 +874,7 @@ void hostif_associate_indication(struct ks_wlan_private 
*priv)
static const char associnfo_leader0[] = "ASSOCINFO(ReqIEs=";
static const char associnfo_leader1[] = " RespIEs=";
 
-   assoc_req = (struct association_request_t *)(priv->rxp);
+   assoc_req = (struct association_request *)(priv->rxp);
assoc_resp = (struct association_response_t *)(assoc_req + 1);
pb = (unsigned char *)(assoc_resp + 1);
 
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 50584a1d2a6b..08c75f8a1646 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -371,7 +371,7 @@ struct hostif_adhoc_set2_request {
u8 bssid[ETH_ALEN];
 } __packed;
 
-struct association_request_t {
+struct association_request {
u8 type;
u8 pad;
__le16 capability;
@@ -391,7 +391,7 @@ struct association_response_t {
 
 struct hostif_associate_indication_t {
struct hostif_hdr header;
-   struct association_request_t assoc_req;
+   struct association_request assoc_req;
struct association_response_t assoc_resp;
/* followed by (req_ies_size + resp_ies_size) octets of data */
/* reqIEs data *//* respIEs data */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 72/75] staging: ks7010: Change 'device_open_status' to a bool.

2018-03-31 Thread Quytelda Kahja
The 'device_open_status' member of 'struct ks_wlan_private' is only
ever set to zero or one, so it makes more sense for it to be a bool
instead of an int.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 2 +-
 drivers/staging/ks7010/ks_wlan_net.c | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 012e0fe2b60d..91231de5404f 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -441,7 +441,7 @@ struct ks_wlan_private {
unsigned int need_commit;   /* for ioctl */
 
/* DeviceIoControl */
-   int device_open_status;
+   bool device_open_status;
atomic_t event_count;
atomic_t rec_count;
int dev_count;
diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index afbc472baa05..e1773e57cbb0 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -2871,10 +2871,9 @@ int ks_wlan_net_start(struct net_device *dev)
 
priv = netdev_priv(dev);
priv->mac_address_valid = false;
+   priv->device_open_status = true;
priv->need_commit = 0;
 
-   priv->device_open_status = 1;
-
/* phy information update timer */
atomic_set(_phyinfo, 0);
timer_setup(_phyinfo_timer, ks_wlan_update_phyinfo_timeout, 0);
@@ -2893,7 +2892,7 @@ int ks_wlan_net_stop(struct net_device *dev)
 {
struct ks_wlan_private *priv = netdev_priv(dev);
 
-   priv->device_open_status = 0;
+   priv->device_open_status = false;
del_timer_sync(_phyinfo_timer);
 
if (netif_running(dev))
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 59/75] staging: ks7010: Remove trailing _t from 'struct sleep_status_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct sleep_status_t' with 'struct sleep_status'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index edd13060c24c..d10ad152aa32 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -285,7 +285,7 @@ struct power_save_status {
atomic_t snooze_guard;
 };
 
-struct sleep_status_t {
+struct sleep_status {
atomic_t status;/* initialvalue 0 */
atomic_t doze_request;
atomic_t wakeup_request;
@@ -426,7 +426,7 @@ struct ks_wlan_private {
struct local_aplist aplist;
struct local_ap current_ap;
struct power_save_status psstatus;
-   struct sleep_status_t sleepstatus;
+   struct sleep_status sleepstatus;
struct wpa_status_t wpa;
struct pmk_list_t pmklist;
/* wireless parameter */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 66/75] staging: ks7010: Remove trailing _t from 'struct wps_status_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct wps_status_t' with 'struct wps_status'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 20b584524a77..eb0c14e78bd2 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -391,7 +391,7 @@ struct pmk_list {
 };
 
 #ifdef WPS
-struct wps_status_t {
+struct wps_status {
int wps_enabled;
int ielen;
u8 ie[255];
@@ -475,7 +475,7 @@ struct ks_wlan_private {
 #ifdef WPS
struct net_device *l2_dev;
int l2_fd;
-   struct wps_status_t wps;
+   struct wps_status wps;
 #endif /* WPS */
u8 sleep_mode;
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 62/75] staging: ks7010: Remove trailing _t from 'struct mic_failure_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct mic_failure_t' with 'struct mic_failure'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_wlan.h   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index d8b40fd83b6b..fbe18ddf3ea0 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -314,7 +314,7 @@ int hostif_data_indication_wpa(struct ks_wlan_private *priv,
unsigned char recv_mic[8];
char buf[128];
unsigned long now;
-   struct mic_failure_t *mic_failure;
+   struct mic_failure *mic_failure;
struct michael_mic_t michael_mic;
union iwreq_data wrqu;
unsigned int key_index = auth_type - 1;
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 2458dbba66a0..c3e61021a75a 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -357,7 +357,7 @@ struct wpa_key {
 #define WPA_KEY_INDEX_MAX 4
 #define WPA_RX_SEQ_LEN 6
 
-struct mic_failure_t {
+struct mic_failure {
u16 failure;/* MIC Failure counter 0 or 1 or 2 */
u16 counter;/* 1sec counter 0-60 */
u32 last_failure_time;
@@ -375,7 +375,7 @@ struct wpa_status_t {
int txkey;
struct wpa_key key[WPA_KEY_INDEX_MAX];
struct scan_ext scan_ext;
-   struct mic_failure_t mic_failure;
+   struct mic_failure mic_failure;
 };
 
 #include 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 60/75] staging: ks7010: Remove trailing _t from 'struct scan_ext_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct scan_ext_t' with 'struct scan_ext'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index d10ad152aa32..ece9950ba893 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -292,7 +292,7 @@ struct sleep_status {
 };
 
 /* WPA */
-struct scan_ext_t {
+struct scan_ext {
unsigned int flag;
char ssid[IW_ESSID_MAX_SIZE + 1];
 };
@@ -374,7 +374,7 @@ struct wpa_status_t {
int auth_alg;
int txkey;
struct wpa_key_t key[WPA_KEY_INDEX_MAX];
-   struct scan_ext_t scan_ext;
+   struct scan_ext scan_ext;
struct mic_failure_t mic_failure;
 };
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 46/75] staging: ks7010: Remove unused 'struct hostif_phy_information_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_phy_information_confirm_t' is not used in this driver.
Remove 'struct hostif_phy_information_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 348fa2844003..869068ed963b 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -409,18 +409,6 @@ struct hostif_phy_information_request {
__le16 time;/* unit 100ms */
 } __packed;
 
-struct hostif_phy_information_confirm_t {
-   struct hostif_hdr header;
-   u8 rssi;
-   u8 sq;
-   u8 noise;
-   u8 link_speed;
-   __le32 tx_frame;
-   __le32 rx_frame;
-   __le32 tx_error;
-   __le32 rx_error;
-} __packed;
-
 enum sleep_mode_type {
SLP_ACTIVE,
SLP_SLEEP
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 52/75] staging: ks7010: Remove trailing _t from 'struct rsn_ie_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct rsn_ie_t' with 'struct rsn_ie'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 3ea62b708b01..10ff4460594f 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -203,7 +203,7 @@ struct hostt {
 };
 
 #define RSN_IE_BODY_MAX 64
-struct rsn_ie_t {
+struct rsn_ie {
u8 id;  /* 0xdd = WPA or 0x30 = RSN */
u8 size;/* max ? 255 ? */
u8 body[RSN_IE_BODY_MAX];
@@ -235,8 +235,8 @@ struct local_ap_t {
u16 capability;
u8 channel;
u8 noise;
-   struct rsn_ie_t wpa_ie;
-   struct rsn_ie_t rsn_ie;
+   struct rsn_ie wpa_ie;
+   struct rsn_ie rsn_ie;
 #ifdef WPS
struct wps_ie_t wps_ie;
 #endif /* WPS */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 56/75] staging: ks7010: Remove trailing _t from 'struct local_gain_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct local_gain_t' with 'struct local_gain'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 57b21d3a2435..e6c4a0fece54 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -249,7 +249,7 @@ struct local_aplist {
struct local_ap ap[LOCAL_APLIST_MAX + 1];
 };
 
-struct local_gain_t {
+struct local_gain {
u8 tx_mode;
u8 rx_mode;
u8 tx_gain;
@@ -471,7 +471,7 @@ struct ks_wlan_private {
 
u8 scan_ssid_len;
u8 scan_ssid[IW_ESSID_MAX_SIZE + 1];
-   struct local_gain_t gain;
+   struct local_gain gain;
 #ifdef WPS
struct net_device *l2_dev;
int l2_fd;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 41/75] staging: ks7010: Remove trailing _t from 'struct association_response_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct association_response_t' with 'struct
association_response'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 43d06fdda9de..e733a77269df 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -864,7 +864,7 @@ static
 void hostif_associate_indication(struct ks_wlan_private *priv)
 {
struct association_request *assoc_req;
-   struct association_response_t *assoc_resp;
+   struct association_response *assoc_resp;
unsigned char *pb;
union iwreq_data wrqu;
char buf[IW_CUSTOM_MAX];
@@ -875,7 +875,7 @@ void hostif_associate_indication(struct ks_wlan_private 
*priv)
static const char associnfo_leader1[] = " RespIEs=";
 
assoc_req = (struct association_request *)(priv->rxp);
-   assoc_resp = (struct association_response_t *)(assoc_req + 1);
+   assoc_resp = (struct association_response *)(assoc_req + 1);
pb = (unsigned char *)(assoc_resp + 1);
 
memset(, 0, sizeof(wrqu));
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 08c75f8a1646..d8ecde16ecd0 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -380,7 +380,7 @@ struct association_request {
__le16 req_ies_size;
 } __packed;
 
-struct association_response_t {
+struct association_response {
u8 type;
u8 pad;
__le16 capability;
@@ -392,7 +392,7 @@ struct association_response_t {
 struct hostif_associate_indication_t {
struct hostif_hdr header;
struct association_request assoc_req;
-   struct association_response_t assoc_resp;
+   struct association_response assoc_resp;
/* followed by (req_ies_size + resp_ies_size) octets of data */
/* reqIEs data *//* respIEs data */
 } __packed;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 48/75] staging: ks7010: Remove unused 'struct hostif_sleep_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_sleep_confirm_t' is not used in this driver. Remove 'struct
hostif_sleep_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index ca0b89cd99a1..16ee997c37ad 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -418,11 +418,6 @@ struct hostif_sleep_request {
struct hostif_hdr header;
 } __packed;
 
-struct hostif_sleep_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 struct hostif_mic_failure_request_t {
struct hostif_hdr header;
__le16 failure_count;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 35/75] staging: ks7010: Remove unused 'struct hostif_infrastructure_set_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_infrastructure_set_confirm_t' is not used in this driver.
Remove 'struct hostif_infrastructure_set_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index a4f51f3311a1..7429304d6691 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -341,11 +341,6 @@ struct hostif_infrastructure_set_request {
u8 bssid[ETH_ALEN];
 } __packed;
 
-struct hostif_infrastructure_set_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 /**
  * struct hostif_adhoc_set_request_t
  * @capability: bit5  : preamble
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 57/75] staging: ks7010: Remove trailing _t from 'struct local_eeprom_sum_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct local_eeprom_sum_t' with 'struct
local_eeprom_sum'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index e6c4a0fece54..f99b00344d39 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -256,7 +256,7 @@ struct local_gain {
u8 rx_gain;
 };
 
-struct local_eeprom_sum_t {
+struct local_eeprom_sum {
u8 type;
u8 result;
 };
@@ -480,7 +480,7 @@ struct ks_wlan_private {
u8 sleep_mode;
 
u8 region;
-   struct local_eeprom_sum_t eeprom_sum;
+   struct local_eeprom_sum eeprom_sum;
u8 eeprom_checksum;
 
struct hostt hostt;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 51/75] staging: ks7010: Remove trailing _t from 'struct hostt_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostt_t' with 'struct hostt'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 1b7036c32d1c..3ea62b708b01 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -196,7 +196,7 @@ struct sme_info {
unsigned long sme_flag;
 };
 
-struct hostt_t {
+struct hostt {
int buff[SME_EVENT_BUFF_SIZE];
unsigned int qhead;
unsigned int qtail;
@@ -483,7 +483,7 @@ struct ks_wlan_private {
struct local_eeprom_sum_t eeprom_sum;
u8 eeprom_checksum;
 
-   struct hostt_t hostt;
+   struct hostt hostt;
 
unsigned long last_doze;
unsigned long last_wakeup;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 50/75] staging: ks7010: Remove unused 'struct hostif_mic_failure_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_mic_failure_confirm_t' is not used in this driver. Remove
'struct hostif_mic_failure_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index f6345779a039..c087484b1507 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -424,11 +424,6 @@ struct hostif_mic_failure_request {
__le16 timer;
 } __packed;
 
-struct hostif_mic_failure_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 #define BASIC_RATE 0x80
 #define RATE_MASK  0x7F
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 33/75] staging: ks7010: Remove unused 'struct hostif_ps_adhoc_set_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_ps_adhoc_set_confirm_t' is not used in this driver. Remove
'struct hostif_ps_adhoc_set_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 3faa28c77446..baa612236eb2 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -321,11 +321,6 @@ struct hostif_ps_adhoc_set_request {
__le16 channel;
 } __packed;
 
-struct hostif_ps_adhoc_set_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 #define AUTH_TYPE_OPEN_SYSTEM 0
 #define AUTH_TYPE_SHARED_KEY  1
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 49/75] staging: ks7010: Remove trailing _t from 'struct hostif_mic_failure_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_mic_failure_request_t' with 'struct
hostif_mic_failure_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index cb768e861b07..2f732d8bcc4f 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1558,7 +1558,7 @@ void hostif_mic_failure_request(struct ks_wlan_private 
*priv,
unsigned short failure_count,
unsigned short timer)
 {
-   struct hostif_mic_failure_request_t *pp;
+   struct hostif_mic_failure_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_MIC_FAILURE_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 16ee997c37ad..f6345779a039 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -418,7 +418,7 @@ struct hostif_sleep_request {
struct hostif_hdr header;
 } __packed;
 
-struct hostif_mic_failure_request_t {
+struct hostif_mic_failure_request {
struct hostif_hdr header;
__le16 failure_count;
__le16 timer;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 10/75] staging: ks7010: Remove unused 'struct hostif_mib_get_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_mib_get_confirm_t' is not used in this driver. Remove
'struct hostif_mib_get_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index aedc832bc04c..e6d6c51ccc43 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -151,16 +151,10 @@ struct hostif_mib_value {
u8 body[0];
 } __packed;
 
-struct hostif_mib_get_confirm_t {
-   struct hostif_hdr header;
-   __le32 mib_status;
 #define MIB_SUCCESS0
 #define MIB_INVALID1
 #define MIB_READ_ONLY  2
 #define MIB_WRITE_ONLY 3
-   __le32 mib_attribute;
-   struct hostif_mib_value mib_value;
-} __packed;
 
 struct hostif_mib_set_request_t {
struct hostif_hdr header;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 23/75] staging: ks7010: Remove unused 'struct rsn_t'.

2018-03-31 Thread Quytelda Kahja
'struct rsn_t' is not used in this driver. Remove 'struct rsn_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index a3c686c1289c..091bc82a99c4 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -231,11 +231,7 @@ struct ibss_parms {
__le16 atim_window;
 } __packed;
 
-struct rsn_t {
-   u8 size;
 #define RSN_BODY_SIZE 64
-   u8 body[RSN_BODY_SIZE];
-} __packed;
 
 struct erp_params_t {
u8 erp_info;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 14/75] staging: ks7010: Remove unused 'struct hostif_power_mgmt_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_power_mgmt_confirm_t' is not used in this driver. Remove
'struct hostif_power_mgmt_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 10842d668afa..245d954e3be2 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -187,11 +187,6 @@ enum power_mgmt_mode_type {
 /* #define RESULT_ALREADY_RUNNING3 */
 #defineRESULT_ALREADY_RUNNING7
 
-struct hostif_power_mgmt_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 struct hostif_start_request_t {
struct hostif_hdr header;
__le16 mode;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 37/75] staging: ks7010: Remove trailing _t from 'struct hostif_adhoc_set2_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_adhoc_set2_request_t' with 'struct
hostif_adhoc_set2_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index de56cda64bb9..a177496dd42a 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1404,7 +1404,7 @@ void hostif_adhoc_set_request(struct ks_wlan_private 
*priv)
 static
 void hostif_adhoc_set2_request(struct ks_wlan_private *priv)
 {
-   struct hostif_adhoc_set2_request_t *pp;
+   struct hostif_adhoc_set2_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_ADH_SET_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 8574c09b3ab9..21b1c5cd9f34 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -356,13 +356,13 @@ struct hostif_adhoc_set_request {
 } __packed;
 
 /**
- * struct hostif_adhoc_set2_request_t
+ * struct hostif_adhoc_set2_request
  * @capability: bit5  : preamble
  *  bit6  : pbcc - Not supported always 0
  *  bit10 : ShortSlotTime
  *  bit13 : DSSS-OFDM - Not supported always 0
  */
-struct hostif_adhoc_set2_request_t {
+struct hostif_adhoc_set2_request {
struct hostif_hdr header;
struct hostif_request request;
__le16 reserved;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 42/75] staging: ks7010: Remove unused 'struct hostif_associate_indication_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_associate_indication_t' is not used in this driver. Remove
'struct hostif_associate_indication_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 8 
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index d8ecde16ecd0..9c8b0a93f7cf 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -389,14 +389,6 @@ struct association_response {
__le16 resp_ies_size;
 } __packed;
 
-struct hostif_associate_indication_t {
-   struct hostif_hdr header;
-   struct association_request assoc_req;
-   struct association_response assoc_resp;
-   /* followed by (req_ies_size + resp_ies_size) octets of data */
-   /* reqIEs data *//* respIEs data */
-} __packed;
-
 struct hostif_bss_scan_request_t {
struct hostif_hdr header;
u8 scan_type;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 28/75] staging: ks7010: Remove unused 'struct hostif_connect_indication_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_connect_indication_t' is not used in this driver. Remove
'struct hostif_connect_indication_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index f64eb2e1e947..bb58733521c7 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -285,13 +285,8 @@ struct link_ap_info {
} __packed rsn;
 } __packed;
 
-struct hostif_connect_indication_t {
-   struct hostif_hdr header;
-   __le16 connect_code;
 #define RESULT_CONNECT0
 #define RESULT_DISCONNECT 1
-   struct link_ap_info link_ap_info;
-} __packed;
 
 struct hostif_stop_request_t {
struct hostif_hdr header;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 15/75] staging: ks7010: Remove trailing _t from 'struct hostif_start_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_start_request_t' with 'struct
hostif_start_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 848307241195..9bfef9c9f64b 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1280,7 +1280,7 @@ void hostif_mib_set_request(struct ks_wlan_private *priv,
 static
 void hostif_start_request(struct ks_wlan_private *priv, unsigned char mode)
 {
-   struct hostif_start_request_t *pp;
+   struct hostif_start_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_START_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 245d954e3be2..ef1e77b40e4e 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -187,7 +187,7 @@ enum power_mgmt_mode_type {
 /* #define RESULT_ALREADY_RUNNING3 */
 #defineRESULT_ALREADY_RUNNING7
 
-struct hostif_start_request_t {
+struct hostif_start_request {
struct hostif_hdr header;
__le16 mode;
 #define MODE_PSEUDO_ADHOC   0
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 32/75] staging: ks7010: Remove trailing _t from 'struct hostif_ps_adhoc_set_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_ps_adhoc_set_request_t' with 'struct
hostif_ps_adhoc_set_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 9798e2427f36..8be5d64f291b 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1327,7 +1327,7 @@ static void init_request(struct ks_wlan_private *priv, 
struct hostif_request *re
 static
 void hostif_ps_adhoc_set_request(struct ks_wlan_private *priv)
 {
-   struct hostif_ps_adhoc_set_request_t *pp;
+   struct hostif_ps_adhoc_set_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_PS_ADH_SET_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 443a528fef1e..3faa28c77446 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -309,13 +309,13 @@ struct hostif_request {
 } __packed;
 
 /**
- * struct hostif_ps_adhoc_set_request_t - pseudo adhoc mode
+ * struct hostif_ps_adhoc_set_request - pseudo adhoc mode
  * @capability: bit5  : preamble
  *  bit6  : pbcc - Not supported always 0
  *  bit10 : ShortSlotTime
  *  bit13 : DSSS-OFDM - Not supported always 0
  */
-struct hostif_ps_adhoc_set_request_t {
+struct hostif_ps_adhoc_set_request {
struct hostif_hdr header;
struct hostif_request request;
__le16 channel;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 24/75] staging: ks7010: Remove trailing _t from 'struct erp_params_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct erp_params_t' with 'struct erp_params'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 091bc82a99c4..4dd11307e4c5 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -233,7 +233,7 @@ struct ibss_parms {
 
 #define RSN_BODY_SIZE 64
 
-struct erp_params_t {
+struct erp_params {
u8 erp_info;
 } __packed;
 
@@ -271,7 +271,7 @@ struct link_ap_info_t {
struct ds_parms ds_parameter;   /* +29 */
struct cf_parms cf_parameter;   /* +30 */
struct ibss_parms ibss_parameter;   /* +36 */
-   struct erp_params_t erp_parameter;  /* +38 */
+   struct erp_params erp_parameter;/* +38 */
u8 pad1;/* +39 */
struct rate_set8 ext_rate_set;  /* +40 */
u8 DTIM_period; /* +50 */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 34/75] staging: ks7010: Remove trailing _t from 'struct hostif_infrastructure_set_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_infrastructure_set_request_t' with
'struct hostif_infrastructure_set_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 8be5d64f291b..3d6ba74cc3e5 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1344,7 +1344,7 @@ void hostif_ps_adhoc_set_request(struct ks_wlan_private 
*priv)
 static
 void hostif_infrastructure_set_request(struct ks_wlan_private *priv, int event)
 {
-   struct hostif_infrastructure_set_request_t *pp;
+   struct hostif_infrastructure_set_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), event);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index baa612236eb2..a4f51f3311a1 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -325,13 +325,13 @@ struct hostif_ps_adhoc_set_request {
 #define AUTH_TYPE_SHARED_KEY  1
 
 /**
- * struct hostif_infrastructure_set_request_t
+ * struct hostif_infrastructure_set_request
  * @capability: bit5  : preamble
  *  bit6  : pbcc - Not supported always 0
  *  bit10 : ShortSlotTime
  *  bit13 : DSSS-OFDM - Not supported always 0
  */
-struct hostif_infrastructure_set_request_t {
+struct hostif_infrastructure_set_request {
struct hostif_hdr header;
struct hostif_request request;
struct ssid ssid;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 20/75] staging: ks7010: Remove trailing _t from 'struct ds_parms_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct ds_parms_t' with 'struct ds_parms'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 384292588afe..c48730b7527c 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -216,7 +216,7 @@ struct fh_parms {
u8 hop_index;
 } __packed;
 
-struct ds_parms_t {
+struct ds_parms {
u8 channel;
 } __packed;
 
@@ -272,7 +272,7 @@ struct link_ap_info_t {
__le16 capability;  /* +12 */
struct rate_set8 rate_set;  /* +14 */
struct fh_parms fh_parameter;   /* +24 */
-   struct ds_parms_t ds_parameter; /* +29 */
+   struct ds_parms ds_parameter;   /* +29 */
struct cf_parms_t cf_parameter; /* +30 */
struct ibss_parms_t ibss_parameter; /* +36 */
struct erp_params_t erp_parameter;  /* +38 */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 38/75] staging: ks7010: Remove unused 'struct hostif_adhoc_set_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_adhoc_set_confirm_t' is not used in this driver. Remove
'struct hostif_adhoc_set_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 21b1c5cd9f34..ce9f29699fa1 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -371,11 +371,6 @@ struct hostif_adhoc_set2_request {
u8 bssid[ETH_ALEN];
 } __packed;
 
-struct hostif_adhoc_set_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 struct last_associate_t {
u8 type;
u8 status;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 29/75] staging: ks7010: Remove trailing _t from 'struct hostif_stop_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_stop_request_t' with 'struct
hostif_stop_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks7010_sdio.c | 2 +-
 drivers/staging/ks7010/ks_hostif.c   | 2 +-
 drivers/staging/ks7010/ks_hostif.h   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index b8f55a11ee1c..d083bf8d238e 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -950,7 +950,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 /* send stop request to MAC */
 static int send_stop_request(struct sdio_func *func)
 {
-   struct hostif_stop_request_t *pp;
+   struct hostif_stop_request *pp;
struct ks_sdio_card *card;
size_t size;
 
diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 27db9732d9c3..5c78f94e6f72 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1426,7 +1426,7 @@ void hostif_adhoc_set2_request(struct ks_wlan_private 
*priv)
 static
 void hostif_stop_request(struct ks_wlan_private *priv)
 {
-   struct hostif_stop_request_t *pp;
+   struct hostif_stop_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_STOP_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index bb58733521c7..f3c453be9701 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -288,7 +288,7 @@ struct link_ap_info {
 #define RESULT_CONNECT0
 #define RESULT_DISCONNECT 1
 
-struct hostif_stop_request_t {
+struct hostif_stop_request {
struct hostif_hdr header;
 } __packed;
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 18/75] staging: ks7010: Remove trailing _t from 'struct rate_set8_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct rate_set8_t' with 'struct rate_set8'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 5a46a804..6ce5d32718b8 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -203,7 +203,7 @@ struct ssid {
 } __packed;
 
 #define RATE_SET_MAX_SIZE 16
-struct rate_set8_t {
+struct rate_set8 {
u8 size;
u8 body[8];
u8 rate_pad;
@@ -270,14 +270,14 @@ struct link_ap_info_t {
u8 pad0;/* +09 */
__le16 beacon_period;   /* +10 */
__le16 capability;  /* +12 */
-   struct rate_set8_t rate_set;/* +14 */
+   struct rate_set8 rate_set;  /* +14 */
struct fh_parms_t fh_parameter; /* +24 */
struct ds_parms_t ds_parameter; /* +29 */
struct cf_parms_t cf_parameter; /* +30 */
struct ibss_parms_t ibss_parameter; /* +36 */
struct erp_params_t erp_parameter;  /* +38 */
u8 pad1;/* +39 */
-   struct rate_set8_t ext_rate_set;/* +40 */
+   struct rate_set8 ext_rate_set;  /* +40 */
u8 DTIM_period; /* +50 */
u8 rsn_mode;/* +51 */
 #define RSN_MODE_NONE  0
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 47/75] staging: ks7010: Remove trailing _t from 'struct hostif_sleep_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_sleep_request_t' with 'struct
hostif_sleep_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 4bd8a285eac5..cb768e861b07 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1483,7 +1483,7 @@ static
 void hostif_sleep_request(struct ks_wlan_private *priv,
  enum sleep_mode_type mode)
 {
-   struct hostif_sleep_request_t *pp;
+   struct hostif_sleep_request *pp;
 
if (mode == SLP_SLEEP) {
pp = hostif_generic_request(sizeof(*pp), HIF_SLEEP_REQ);
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 869068ed963b..ca0b89cd99a1 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -414,7 +414,7 @@ enum sleep_mode_type {
SLP_SLEEP
 };
 
-struct hostif_sleep_request_t {
+struct hostif_sleep_request {
struct hostif_hdr header;
 } __packed;
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 44/75] staging: ks7010: Remove unused 'struct hostif_bss_scan_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_bss_scan_confirm_t' is not used in this driver. Remove
'struct hostif_bss_scan_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 7785e620e03c..1aa4da0f5403 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -401,12 +401,6 @@ struct hostif_bss_scan_request {
struct ssid ssid;
 } __packed;
 
-struct hostif_bss_scan_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-   __le16 reserved;
-} __packed;
-
 struct hostif_phy_information_request_t {
struct hostif_hdr header;
__le16 type;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 45/75] staging: ks7010: Remove trailing _t from 'struct hostif_phy_information_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_phy_information_request_t' with 'struct
hostif_phy_information_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index aa827949db7e..4bd8a285eac5 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1440,7 +1440,7 @@ void hostif_stop_request(struct ks_wlan_private *priv)
 static
 void hostif_phy_information_request(struct ks_wlan_private *priv)
 {
-   struct hostif_phy_information_request_t *pp;
+   struct hostif_phy_information_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_PHY_INFO_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 1aa4da0f5403..348fa2844003 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -401,7 +401,7 @@ struct hostif_bss_scan_request {
struct ssid ssid;
 } __packed;
 
-struct hostif_phy_information_request_t {
+struct hostif_phy_information_request {
struct hostif_hdr header;
__le16 type;
 #define NORMAL_TYPE0
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 43/75] staging: ks7010: Remove trailing _t from 'struct hostif_bss_scan_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_bss_scan_request_t' with 'struct
hostif_bss_scan_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index e733a77269df..aa827949db7e 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1508,7 +1508,7 @@ void hostif_bss_scan_request(struct ks_wlan_private *priv,
 unsigned long scan_type, uint8_t *scan_ssid,
 uint8_t scan_ssid_len)
 {
-   struct hostif_bss_scan_request_t *pp;
+   struct hostif_bss_scan_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_SCAN_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 9c8b0a93f7cf..7785e620e03c 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -389,7 +389,7 @@ struct association_response {
__le16 resp_ies_size;
 } __packed;
 
-struct hostif_bss_scan_request_t {
+struct hostif_bss_scan_request {
struct hostif_hdr header;
u8 scan_type;
 #define ACTIVE_SCAN  0
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 36/75] staging: ks7010: Remove trailing _t from 'struct hostif_adhoc_set_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_adhoc_set_request_t' with 'struct
hostif_adhoc_set_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 3d6ba74cc3e5..de56cda64bb9 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1385,7 +1385,7 @@ void hostif_infrastructure_set_request(struct 
ks_wlan_private *priv, int event)
 static
 void hostif_adhoc_set_request(struct ks_wlan_private *priv)
 {
-   struct hostif_adhoc_set_request_t *pp;
+   struct hostif_adhoc_set_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_ADH_SET_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 7429304d6691..8574c09b3ab9 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -342,13 +342,13 @@ struct hostif_infrastructure_set_request {
 } __packed;
 
 /**
- * struct hostif_adhoc_set_request_t
+ * struct hostif_adhoc_set_request
  * @capability: bit5  : preamble
  *  bit6  : pbcc - Not supported always 0
  *  bit10 : ShortSlotTime
  *  bit13 : DSSS-OFDM - Not supported always 0
  */
-struct hostif_adhoc_set_request_t {
+struct hostif_adhoc_set_request {
struct hostif_hdr header;
struct hostif_request request;
struct ssid ssid;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 30/75] staging: ks7010: Remove unused 'struct hostif_stop_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_stop_confirm_t' is not used in this driver. Remove 'struct
hostif_stop_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index f3c453be9701..52febac0cc60 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -292,11 +292,6 @@ struct hostif_stop_request {
struct hostif_hdr header;
 } __packed;
 
-struct hostif_stop_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 #define D_11B_ONLY_MODE0
 #define D_11G_ONLY_MODE1
 #define D_11BG_COMPATIBLE_MODE 2
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 39/75] staging: ks7010: Remove unused 'struct last_associate_t'.

2018-03-31 Thread Quytelda Kahja
'struct last_associate_t' is not used in this driver. Remove 'struct
last_associate_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index ce9f29699fa1..50584a1d2a6b 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -371,11 +371,6 @@ struct hostif_adhoc_set2_request {
u8 bssid[ETH_ALEN];
 } __packed;
 
-struct last_associate_t {
-   u8 type;
-   u8 status;
-} __packed;
-
 struct association_request_t {
u8 type;
u8 pad;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 21/75] staging: ks7010: Remove trailing _t from 'struct cf_parms_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct cf_parms_t' with 'struct cf_parms'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index c48730b7527c..2dcd6253b17a 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -220,7 +220,7 @@ struct ds_parms {
u8 channel;
 } __packed;
 
-struct cf_parms_t {
+struct cf_parms {
u8 count;
u8 period;
__le16 max_duration;
@@ -273,7 +273,7 @@ struct link_ap_info_t {
struct rate_set8 rate_set;  /* +14 */
struct fh_parms fh_parameter;   /* +24 */
struct ds_parms ds_parameter;   /* +29 */
-   struct cf_parms_t cf_parameter; /* +30 */
+   struct cf_parms cf_parameter;   /* +30 */
struct ibss_parms_t ibss_parameter; /* +36 */
struct erp_params_t erp_parameter;  /* +38 */
u8 pad1;/* +39 */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 31/75] staging: ks7010: Remove trailing _t from 'struct hostif_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_request_t' with 'struct hostif_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c |  2 +-
 drivers/staging/ks7010/ks_hostif.h | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 5c78f94e6f72..9798e2427f36 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1313,7 +1313,7 @@ static __le16 ks_wlan_cap(struct ks_wlan_private *priv)
return cpu_to_le16((uint16_t)capability);
 }
 
-static void init_request(struct ks_wlan_private *priv, struct hostif_request_t 
*req)
+static void init_request(struct ks_wlan_private *priv, struct hostif_request 
*req)
 {
req->phy_type = cpu_to_le16((uint16_t)(priv->reg.phy_type));
req->cts_mode = cpu_to_le16((uint16_t)(priv->reg.cts_mode));
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 52febac0cc60..443a528fef1e 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -300,7 +300,7 @@ struct hostif_stop_request {
 #define CTS_MODE_FALSE 0
 #define CTS_MODE_TRUE  1
 
-struct hostif_request_t {
+struct hostif_request {
__le16 phy_type;
__le16 cts_mode;
__le16 scan_type;
@@ -317,7 +317,7 @@ struct hostif_request_t {
  */
 struct hostif_ps_adhoc_set_request_t {
struct hostif_hdr header;
-   struct hostif_request_t request;
+   struct hostif_request request;
__le16 channel;
 } __packed;
 
@@ -338,7 +338,7 @@ struct hostif_ps_adhoc_set_confirm_t {
  */
 struct hostif_infrastructure_set_request_t {
struct hostif_hdr header;
-   struct hostif_request_t request;
+   struct hostif_request request;
struct ssid ssid;
__le16 beacon_lost_count;
__le16 auth_type;
@@ -360,7 +360,7 @@ struct hostif_infrastructure_set_confirm_t {
  */
 struct hostif_adhoc_set_request_t {
struct hostif_hdr header;
-   struct hostif_request_t request;
+   struct hostif_request request;
struct ssid ssid;
__le16 channel;
 } __packed;
@@ -374,7 +374,7 @@ struct hostif_adhoc_set_request_t {
  */
 struct hostif_adhoc_set2_request_t {
struct hostif_hdr header;
-   struct hostif_request_t request;
+   struct hostif_request request;
__le16 reserved;
struct ssid ssid;
struct channel_list channel_list;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 06/75] staging: ks7010: Remove unused 'struct hostif_data_indication_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_data_indication_t' is not used in this driver. Remove
'struct hostif_data_indication_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 036758687b7f..54084af8dcea 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -76,16 +76,9 @@ struct hostif_data_request {
u8 data[0];
 } __packed;
 
-struct hostif_data_indication_t {
-   struct hostif_hdr header;
-   __le16 auth_type;
-/* #define TYPE_DATA 0x */
 #define TYPE_PMK1 0x0001
 #define TYPE_GMK1 0x0002
 #define TYPE_GMK2 0x0003
-   __le16 reserved;
-   u8 data[0];
-} __packed;
 
 #define CHANNEL_LIST_MAX_SIZE 14
 struct channel_list_t {
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 13/75] staging: ks7010: Remove trailing _t from 'struct hostif_power_mgmt_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_power_mgmt_request_t' with 'struct
hostif_power_mgmt_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 6295e01d91da..848307241195 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1464,7 +1464,7 @@ void hostif_power_mgmt_request(struct ks_wlan_private 
*priv,
   unsigned long mode, unsigned long wake_up,
   unsigned long receive_dtims)
 {
-   struct hostif_power_mgmt_request_t *pp;
+   struct hostif_power_mgmt_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_POWER_MGMT_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 5ae6f78eebd6..10842d668afa 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -162,7 +162,7 @@ struct hostif_mib_set_request {
struct hostif_mib_value mib_value;
 } __packed;
 
-struct hostif_power_mgmt_request_t {
+struct hostif_power_mgmt_request {
struct hostif_hdr header;
__le32 mode;
 #define POWER_ACTIVE  1
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 25/75] staging: ks7010: Remove trailing _t from 'struct rate_set16_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct rate_set16_t' with 'struct rate_set16'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 4dd11307e4c5..87d018f83fa2 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -237,7 +237,7 @@ struct erp_params {
u8 erp_info;
 } __packed;
 
-struct rate_set16_t {
+struct rate_set16 {
u8 size;
u8 body[16];
u8 rate_pad;
@@ -315,7 +315,7 @@ struct hostif_request_t {
__le16 cts_mode;
__le16 scan_type;
__le16 capability;
-   struct rate_set16_t rate_set;
+   struct rate_set16 rate_set;
 } __packed;
 
 /**
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 17/75] staging: ks7010: Remove trailing _t from 'struct ssid_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct ssid_t' with 'struct ssid'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index af656a839a0a..5a46a804 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -196,7 +196,7 @@ struct hostif_start_request {
 #define MODE_ADHOC  3
 } __packed;
 
-struct ssid_t {
+struct ssid {
u8 size;
u8 body[IEEE80211_MAX_SSID_LEN];
u8 ssid_pad;
@@ -353,7 +353,7 @@ struct hostif_ps_adhoc_set_confirm_t {
 struct hostif_infrastructure_set_request_t {
struct hostif_hdr header;
struct hostif_request_t request;
-   struct ssid_t ssid;
+   struct ssid ssid;
__le16 beacon_lost_count;
__le16 auth_type;
struct channel_list channel_list;
@@ -375,7 +375,7 @@ struct hostif_infrastructure_set_confirm_t {
 struct hostif_adhoc_set_request_t {
struct hostif_hdr header;
struct hostif_request_t request;
-   struct ssid_t ssid;
+   struct ssid ssid;
__le16 channel;
 } __packed;
 
@@ -390,7 +390,7 @@ struct hostif_adhoc_set2_request_t {
struct hostif_hdr header;
struct hostif_request_t request;
__le16 reserved;
-   struct ssid_t ssid;
+   struct ssid ssid;
struct channel_list channel_list;
u8 bssid[ETH_ALEN];
 } __packed;
@@ -440,7 +440,7 @@ struct hostif_bss_scan_request_t {
__le32 ch_time_min;
__le32 ch_time_max;
struct channel_list channel_list;
-   struct ssid_t ssid;
+   struct ssid ssid;
 } __packed;
 
 struct hostif_bss_scan_confirm_t {
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 26/75] staging: ks7010: Remove trailing _t from 'struct ap_info_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct ap_info_t' with 'struct ap_info'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 8 
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 9bfef9c9f64b..c9cf61efaf5a 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -223,7 +223,7 @@ static u8 read_ie(unsigned char *bp, u8 max, u8 *body)
 
 
 static
-int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
+int get_ap_information(struct ks_wlan_private *priv, struct ap_info *ap_info,
   struct local_ap_t *ap)
 {
unsigned char *bp;
@@ -771,10 +771,10 @@ static
 void hostif_scan_indication(struct ks_wlan_private *priv)
 {
int i;
-   struct ap_info_t *ap_info;
+   struct ap_info *ap_info;
 
netdev_dbg(priv->net_dev, "scan_ind_count = %d\n", 
priv->scan_ind_count);
-   ap_info = (struct ap_info_t *)(priv->rxp);
+   ap_info = (struct ap_info *)(priv->rxp);
 
if (priv->scan_ind_count) {
/* bssid check */
@@ -794,7 +794,7 @@ void hostif_scan_indication(struct ks_wlan_private *priv)
if (priv->scan_ind_count < LOCAL_APLIST_MAX + 1) {
netdev_dbg(priv->net_dev, " scan_ind_count=%d :: 
aplist.size=%d\n",
priv->scan_ind_count, priv->aplist.size);
-   get_ap_information(priv, (struct ap_info_t *)(priv->rxp),
+   get_ap_information(priv, (struct ap_info *)(priv->rxp),
   &(priv->aplist.ap[priv->scan_ind_count - 
1]));
priv->aplist.size = priv->scan_ind_count;
} else {
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 87d018f83fa2..d61225958df3 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -243,7 +243,7 @@ struct rate_set16 {
u8 rate_pad;
 } __packed;
 
-struct ap_info_t {
+struct ap_info {
u8 bssid[6];/* +00 */
u8 rssi;/* +06 */
u8 sq;  /* +07 */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 22/75] staging: ks7010: Remove trailing _t from 'struct ibss_parms_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct ibss_parms_t' with 'struct ibss_parms'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 2dcd6253b17a..a3c686c1289c 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -227,7 +227,7 @@ struct cf_parms {
__le16 dur_remaining;
 } __packed;
 
-struct ibss_parms_t {
+struct ibss_parms {
__le16 atim_window;
 } __packed;
 
@@ -274,7 +274,7 @@ struct link_ap_info_t {
struct fh_parms fh_parameter;   /* +24 */
struct ds_parms ds_parameter;   /* +29 */
struct cf_parms cf_parameter;   /* +30 */
-   struct ibss_parms_t ibss_parameter; /* +36 */
+   struct ibss_parms ibss_parameter;   /* +36 */
struct erp_params_t erp_parameter;  /* +38 */
u8 pad1;/* +39 */
struct rate_set8 ext_rate_set;  /* +40 */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 19/75] staging: ks7010: Remove trailing _t from 'struct fh_parms_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct fh_parms_t' with 'struct fh_parms'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 6ce5d32718b8..384292588afe 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -209,7 +209,7 @@ struct rate_set8 {
u8 rate_pad;
 } __packed;
 
-struct fh_parms_t {
+struct fh_parms {
__le16 dwell_time;
u8 hop_set;
u8 hop_pattern;
@@ -271,7 +271,7 @@ struct link_ap_info_t {
__le16 beacon_period;   /* +10 */
__le16 capability;  /* +12 */
struct rate_set8 rate_set;  /* +14 */
-   struct fh_parms_t fh_parameter; /* +24 */
+   struct fh_parms fh_parameter;   /* +24 */
struct ds_parms_t ds_parameter; /* +29 */
struct cf_parms_t cf_parameter; /* +30 */
struct ibss_parms_t ibss_parameter; /* +36 */
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 27/75] staging: ks7010: Remove trailing _t from 'struct link_ap_info_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct link_ap_info_t' with 'struct link_ap_info'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 drivers/staging/ks7010/ks_hostif.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index c9cf61efaf5a..27db9732d9c3 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -107,7 +107,7 @@ int ks_wlan_do_power_save(struct ks_wlan_private *priv)
 }
 
 static
-int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t 
*ap_info)
+int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info *ap_info)
 {
struct local_ap_t *ap;
union iwreq_data wrqu;
@@ -745,7 +745,7 @@ void hostif_connect_indication(struct ks_wlan_private *priv)
break;
}
 
-   get_current_ap(priv, (struct link_ap_info_t *)priv->rxp);
+   get_current_ap(priv, (struct link_ap_info *)priv->rxp);
if (is_connect_status(priv->connect_status) &&
is_disconnect_status(old_status)) {
/* for power save */
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index d61225958df3..f64eb2e1e947 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -258,7 +258,7 @@ struct ap_info {
/* +1032 */
 } __packed;
 
-struct link_ap_info_t {
+struct link_ap_info {
u8 bssid[6];/* +00 */
u8 rssi;/* +06 */
u8 sq;  /* +07 */
@@ -290,7 +290,7 @@ struct hostif_connect_indication_t {
__le16 connect_code;
 #define RESULT_CONNECT0
 #define RESULT_DISCONNECT 1
-   struct link_ap_info_t link_ap_info;
+   struct link_ap_info link_ap_info;
 } __packed;
 
 struct hostif_stop_request_t {
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 12/75] staging: ks7010: Remove unused 'struct hostif_mib_set_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_mib_set_confirm_t' is not used in this driver. Remove
'struct hostif_mib_set_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 157f1c2394c3..5ae6f78eebd6 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -162,12 +162,6 @@ struct hostif_mib_set_request {
struct hostif_mib_value mib_value;
 } __packed;
 
-struct hostif_mib_set_confirm_t {
-   struct hostif_hdr header;
-   __le32 mib_status;
-   __le32 mib_attribute;
-} __packed;
-
 struct hostif_power_mgmt_request_t {
struct hostif_hdr header;
__le32 mode;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 07/75] staging: ks7010: Remove trailing _t from 'struct channel_list_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct channel_list_t' with 'struct channel_list'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 54084af8dcea..8017a85f95ad 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -81,7 +81,7 @@ struct hostif_data_request {
 #define TYPE_GMK2 0x0003
 
 #define CHANNEL_LIST_MAX_SIZE 14
-struct channel_list_t {
+struct channel_list {
u8 size;
u8 body[CHANNEL_LIST_MAX_SIZE];
u8 pad;
@@ -378,7 +378,7 @@ struct hostif_infrastructure_set_request_t {
struct ssid_t ssid;
__le16 beacon_lost_count;
__le16 auth_type;
-   struct channel_list_t channel_list;
+   struct channel_list channel_list;
u8 bssid[ETH_ALEN];
 } __packed;
 
@@ -413,7 +413,7 @@ struct hostif_adhoc_set2_request_t {
struct hostif_request_t request;
__le16 reserved;
struct ssid_t ssid;
-   struct channel_list_t channel_list;
+   struct channel_list channel_list;
u8 bssid[ETH_ALEN];
 } __packed;
 
@@ -461,7 +461,7 @@ struct hostif_bss_scan_request_t {
u8 pad[3];
__le32 ch_time_min;
__le32 ch_time_max;
-   struct channel_list_t channel_list;
+   struct channel_list channel_list;
struct ssid_t ssid;
 } __packed;
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 16/75] staging: ks7010: Remove unused 'struct hostif_start_confirm_t'.

2018-03-31 Thread Quytelda Kahja
'struct hostif_start_confirm_t' is not used in this driver. Remove 'struct
hostif_start_confirm_t'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index ef1e77b40e4e..af656a839a0a 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -196,11 +196,6 @@ struct hostif_start_request {
 #define MODE_ADHOC  3
 } __packed;
 
-struct hostif_start_confirm_t {
-   struct hostif_hdr header;
-   __le16 result_code;
-} __packed;
-
 struct ssid_t {
u8 size;
u8 body[IEEE80211_MAX_SSID_LEN];
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 01/75] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

2018-03-31 Thread Quytelda Kahja
This macro, provided in 'linux/kernel.h', will calculate the size
more succinctly than a division operation.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_wlan_net.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index 9078e13b0d4a..533feef604a9 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -2702,10 +2702,9 @@ static const iw_handler ks_wlan_private_handler[] = {
 };
 
 static const struct iw_handler_def ks_wlan_handler_def = {
-   .num_standard = sizeof(ks_wlan_handler) / sizeof(iw_handler),
-   .num_private = sizeof(ks_wlan_private_handler) / sizeof(iw_handler),
-   .num_private_args =
-   sizeof(ks_wlan_private_args) / sizeof(struct iw_priv_args),
+   .num_standard = ARRAY_SIZE(ks_wlan_handler),
+   .num_private = ARRAY_SIZE(ks_wlan_private_handler),
+   .num_private_args = ARRAY_SIZE(ks_wlan_private_args),
.standard = (iw_handler *)ks_wlan_handler,
.private = (iw_handler *)ks_wlan_private_handler,
.private_args = (struct iw_priv_args *)ks_wlan_private_args,
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 09/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_value_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_mib_value_t' with 'struct
hostif_mib_value'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 0c2771861096..aedc832bc04c 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -140,7 +140,7 @@ struct hostif_mib_get_request {
__le32 mib_attribute;
 } __packed;
 
-struct hostif_mib_value_t {
+struct hostif_mib_value {
__le16 size;
__le16 type;
 #define MIB_VALUE_TYPE_NULL 0
@@ -159,13 +159,13 @@ struct hostif_mib_get_confirm_t {
 #define MIB_READ_ONLY  2
 #define MIB_WRITE_ONLY 3
__le32 mib_attribute;
-   struct hostif_mib_value_t mib_value;
+   struct hostif_mib_value mib_value;
 } __packed;
 
 struct hostif_mib_set_request_t {
struct hostif_hdr header;
__le32 mib_attribute;
-   struct hostif_mib_value_t mib_value;
+   struct hostif_mib_value mib_value;
 } __packed;
 
 struct hostif_mib_set_confirm_t {
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 08/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_get_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_mib_get_request_t' with 'struct
hostif_mib_get_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 9e69009e2911..cc1e5f441cf0 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1240,7 +1240,7 @@ static
 void hostif_mib_get_request(struct ks_wlan_private *priv,
unsigned long mib_attribute)
 {
-   struct hostif_mib_get_request_t *pp;
+   struct hostif_mib_get_request *pp;
 
pp = hostif_generic_request(sizeof(*pp), HIF_MIB_GET_REQ);
if (!pp)
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 8017a85f95ad..0c2771861096 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -135,7 +135,7 @@ struct channel_list {
 #define LOCAL_GAIN0xF10D0100   /* Carrer sense 
threshold for demo ato show */
 #define LOCAL_EEPROM_SUM  0xF10E0100   /* EEPROM checksum 
information */
 
-struct hostif_mib_get_request_t {
+struct hostif_mib_get_request {
struct hostif_hdr header;
__le32 mib_attribute;
 } __packed;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 11/75] staging: ks7010: Remove trailing _t from 'struct hostif_mib_set_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_mib_set_request_t' with 'struct
hostif_mib_set_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index cc1e5f441cf0..6295e01d91da 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1258,7 +1258,7 @@ void hostif_mib_set_request(struct ks_wlan_private *priv,
unsigned long mib_attribute, unsigned short size,
unsigned short type, void *vp)
 {
-   struct hostif_mib_set_request_t *pp;
+   struct hostif_mib_set_request *pp;
 
if (priv->dev_state < DEVICE_STATE_BOOT)
return;
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index e6d6c51ccc43..157f1c2394c3 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -156,7 +156,7 @@ struct hostif_mib_value {
 #define MIB_READ_ONLY  2
 #define MIB_WRITE_ONLY 3
 
-struct hostif_mib_set_request_t {
+struct hostif_mib_set_request {
struct hostif_hdr header;
__le32 mib_attribute;
struct hostif_mib_value mib_value;
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 02/75] staging: ks7010: Remove trailing _t from 'struct wpa_suite_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct wpa_suite_t' with 'struct wpa_suite'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 676961cf4103..af1a5c123789 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1660,7 +1660,7 @@ void hostif_sme_set_wep(struct ks_wlan_private *priv, int 
type)
}
 }
 
-struct wpa_suite_t {
+struct wpa_suite {
__le16 size;
unsigned char suite[4][CIPHER_ID_LEN];
 } __packed;
@@ -1673,7 +1673,7 @@ struct rsn_mode_t {
 static
 void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type)
 {
-   struct wpa_suite_t wpa_suite;
+   struct wpa_suite wpa_suite;
struct rsn_mode_t rsn_mode;
__le32 val;
 
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 04/75] staging: ks7010: Remove trailing _t from 'struct pmk_cache_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct pmk_cache_t' with 'struct pmk_cache'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 8c269624401b..b8a9d242e95b 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -2123,7 +2123,7 @@ void hostif_sme_set_key(struct ks_wlan_private *priv, int 
type)
 static
 void hostif_sme_set_pmksa(struct ks_wlan_private *priv)
 {
-   struct pmk_cache_t {
+   struct pmk_cache {
__le16 size;
struct {
u8 bssid[ETH_ALEN];
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 03/75] staging: ks7010: Remove trailing _t from 'struct rsn_mode_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct rsn_mode_t' with 'struct rsn_mode'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index af1a5c123789..8c269624401b 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1665,7 +1665,7 @@ struct wpa_suite {
unsigned char suite[4][CIPHER_ID_LEN];
 } __packed;
 
-struct rsn_mode_t {
+struct rsn_mode {
__le32 rsn_mode;
__le16 rsn_capability;
 } __packed;
@@ -1674,7 +1674,7 @@ static
 void hostif_sme_set_rsn(struct ks_wlan_private *priv, int type)
 {
struct wpa_suite wpa_suite;
-   struct rsn_mode_t rsn_mode;
+   struct rsn_mode rsn_mode;
__le32 val;
 
memset(_suite, 0, sizeof(wpa_suite));
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2 05/75] staging: ks7010: Remove trailing _t from 'struct hostif_data_request_t'.

2018-03-31 Thread Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a
reflection of an older typedef system that is no longer in place. Replace
all occurences of 'struct hostif_data_request_t' with 'struct
hostif_data_request'.

Signed-off-by: Quytelda Kahja 
---
 drivers/staging/ks7010/ks_hostif.c | 2 +-
 drivers/staging/ks7010/ks_hostif.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index b8a9d242e95b..9e69009e2911 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1060,7 +1060,7 @@ int hostif_data_request(struct ks_wlan_private *priv, 
struct sk_buff *skb)
 
unsigned char *buffer = NULL;
unsigned int length = 0;
-   struct hostif_data_request_t *pp;
+   struct hostif_data_request *pp;
unsigned char *p;
int result = 0;
unsigned short eth_proto;
diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 2f918b11b337..036758687b7f 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -67,7 +67,7 @@ struct hostif_hdr {
__le16 event;
 } __packed;
 
-struct hostif_data_request_t {
+struct hostif_data_request {
struct hostif_hdr header;
__le16 auth_type;
 #define TYPE_DATA 0x
-- 
2.16.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel