RE: [PATCH v4 11/13] staging: typec: tcpci: keep the not connecting cc line open

2018-03-30 Thread Jun Li
Hi
> -Original Message-
> From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck
> Sent: 2018年3月30日 23:16
> To: Jun Li ; robh...@kernel.org; gre...@linuxfoundation.org;
> heikki.kroge...@linux.intel.com
> Cc: a.ha...@samsung.com; shufan_...@richtek.com; Peter Chen
> ; devicet...@vger.kernel.org;
> linux-...@vger.kernel.org; dl-linux-imx ;
> de...@driverdev.osuosl.org
> Subject: Re: [PATCH v4 11/13] staging: typec: tcpci: keep the not connecting 
> cc
> line open
> 
> On 03/28/2018 09:06 AM, Li Jun wrote:
> > While set polarity, we should keep the not connecting cc line to be
> > open.
> >
> 
> The more I look at this code, the more I am confused by it.
> 
> The original code doesn't touch the CC lines. This function only sets the 
> polarity.
> Is it really appropriate to touch the CC lines in the same function ?
> 

Yes, I didn't find a more proper place to do this, either I change the
tcpc->set_cc() interface with orientation/polarity parameter to know
which cc line I should keep it open, or do it in low level driver like
this, do you have any suggestion how this can be done?(I guess
both cc lines have the same state after attached with current code
of all tcpm users, but this should be resolved as it's break PD compliance
test) 

thanks
Li Jun

> Guenter
> 
> > Signed-off-by: Li Jun 
> > ---
> >   drivers/staging/typec/tcpci.c | 18 ++
> >   1 file changed, 14 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/typec/tcpci.c
> > b/drivers/staging/typec/tcpci.c index d5b4e4e..b58bd59 100644
> > --- a/drivers/staging/typec/tcpci.c
> > +++ b/drivers/staging/typec/tcpci.c
> > @@ -185,15 +185,25 @@ static int tcpci_set_polarity(struct tcpc_dev *tcpc,
> >   enum typec_cc_polarity polarity)
> >   {
> > struct tcpci *tcpci = tcpc_to_tcpci(tcpc);
> > +   unsigned int reg;
> > int ret;
> >
> > -   ret = regmap_write(tcpci->regmap, TCPC_TCPC_CTRL,
> > -  (polarity == TYPEC_POLARITY_CC2) ?
> > -  TCPC_TCPC_CTRL_ORIENTATION : 0);
> > +   /* Keep the disconnect cc line open */
> > +   ret = regmap_read(tcpci->regmap, TCPC_ROLE_CTRL, );
> > if (ret < 0)
> > return ret;
> >
> > -   return 0;
> > +   if (polarity == TYPEC_POLARITY_CC2)
> > +   reg |= TCPC_ROLE_CTRL_CC_OPEN << TCPC_ROLE_CTRL_CC1_SHIFT;
> > +   else
> > +   reg |= TCPC_ROLE_CTRL_CC_OPEN << TCPC_ROLE_CTRL_CC2_SHIFT;
> > +   ret = regmap_write(tcpci->regmap, TCPC_ROLE_CTRL, reg);
> > +   if (ret < 0)
> > +   return ret;
> > +
> > +   return regmap_write(tcpci->regmap, TCPC_TCPC_CTRL,
> > +  (polarity == TYPEC_POLARITY_CC2) ?
> > +  TCPC_TCPC_CTRL_ORIENTATION : 0);
> >   }
> >
> >   static int tcpci_set_vconn(struct tcpc_dev *tcpc, bool enable)
> >

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


RE: [PATCH v4 10/13] usb: typec: tcpm: set cc for drp toggling attach

2018-03-30 Thread Jun Li


> -Original Message-
> From: Guenter Roeck [mailto:groe...@gmail.com] On Behalf Of Guenter Roeck
> Sent: 2018年3月30日 6:49
> To: Jun Li 
> Cc: robh...@kernel.org; gre...@linuxfoundation.org;
> heikki.kroge...@linux.intel.com; a.ha...@samsung.com;
> shufan_...@richtek.com; Peter Chen ;
> devicet...@vger.kernel.org; linux-...@vger.kernel.org; dl-linux-imx
> ; de...@driverdev.osuosl.org
> Subject: Re: [PATCH v4 10/13] usb: typec: tcpm: set cc for drp toggling attach
> 
> On Thu, Mar 29, 2018 at 12:06:15AM +0800, Li Jun wrote:
> > In case of drp toggling, we may need set correct cc value for role
> > control after attach as it may never been set.
> >
> 
> Isn't CC set by the lower level driver in this case ? In other words, is it 
> ever
> necessary to call back into the low level driver to set CC again ? Doing that 
> in
> attached state seems a bit late.

In question case(drp without try.src or try.snk), you can see tcpm never call
tcpm_set_cc() from drp toggling to attached state, start_drp_toggling
set cc at the beginning in this case, but the value is the *start* value, may 
not
the right value to match its final role.

Per tcpci spec
Figure 4-16. DRP Initialization and Connection Detection
After debounce, tcpm should set cc(again, but may different value) and polarity.

ShuFan encountered this case as I understood on his setup like below:
- Tcpc start drp toggling with Rp/Rp,
- Connect to adapter with also Rp/Rp
- After connection resolved, the tcpc becomes a sink(HW present Rd), but
role control register value is still Rp/Rp.
- This should be corrected to set cc for keep the un-contacted cc line open.

> 
> It may make more sense to update port->cc_req when the state machine leaves
> DRP_TOGGLING state, ie in _tcpm_cc_change(), and to do it without callback 
> into
> the low level driver (it should not be necessary).

Currently there is no user of cc_req flag, so I can't catch the real intention
of this flag, as of now it's only set in tcpm_set_cc(), so I understood it's
for if tcpm already set tcpc a specific role.

Li Jun
> 
> Guenter
> 
> > Signed-off-by: Li Jun 
> > ---
> >  drivers/usb/typec/tcpm.c | 5 +
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index
> > 218c230..72d4232 100644
> > --- a/drivers/usb/typec/tcpm.c
> > +++ b/drivers/usb/typec/tcpm.c
> > @@ -2126,6 +2126,7 @@ static void tcpm_reset_port(struct tcpm_port *port)
> > tcpm_set_attached_state(port, false);
> > port->try_src_count = 0;
> > port->try_snk_count = 0;
> > +   port->cc_req = 0;
> >  }
> >
> >  static void tcpm_detach(struct tcpm_port *port) @@ -2361,6 +2362,8 @@
> > static void run_state_machine(struct tcpm_port *port)
> > break;
> >
> > case SRC_ATTACHED:
> > +   if (!port->cc_req)
> > +   tcpm_set_cc(port, tcpm_rp_cc(port));
> > ret = tcpm_src_attach(port);
> > tcpm_set_state(port, SRC_UNATTACHED,
> >ret < 0 ? 0 : PD_T_PS_SOURCE_ON); @@ -2531,6 
> > +2534,8
> @@
> > static void run_state_machine(struct tcpm_port *port)
> > tcpm_set_state(port, SNK_UNATTACHED, PD_T_PD_DEBOUNCE);
> > break;
> > case SNK_ATTACHED:
> > +   if (!port->cc_req)
> > +   tcpm_set_cc(port, TYPEC_CC_RD);
> > ret = tcpm_snk_attach(port);
> > if (ret < 0)
> > tcpm_set_state(port, SNK_UNATTACHED, 0);
> > --
> > 2.7.4
> >
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: lustre: libcfs: use dynamic minors for /dev/{lnet, obd}

2018-03-30 Thread NeilBrown
On Fri, Mar 30 2018, James Simmons wrote:

> From: "John L. Hammond" 
>
> Request dynamic minor allocation when registering /dev/lnet and
> /dev/obd.
>
> Signed-off-by: John L. Hammond 
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-100086
> Reviewed-on: https://review.whamcloud.com/29741
> Reviewed-by: Andreas Dilger 
> Reviewed-by: Jian Yu 
> Reviewed-by: Oleg Drokin 
> Signed-off-by: James Simmons 

Yes, this is a much better fix than my kconfig change.

 Reviewed-by: NeilBrown 

and thanks for your quick review on my last series!
Thanks,
NeilBrown


> ---
>  drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h|  1 -
>  drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h  | 11 
> ---
>  .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h   |  2 --
>  drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c|  1 -
>  drivers/staging/lustre/lnet/libcfs/linux/linux-module.c   |  5 ++---
>  drivers/staging/lustre/lnet/libcfs/module.c   |  1 +
>  drivers/staging/lustre/lustre/obdclass/class_obd.c|  6 --
>  drivers/staging/lustre/lustre/obdclass/linux/linux-module.c   |  3 +--
>  8 files changed, 8 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h 
> b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
> index 30e333a..cf4c606 100644
> --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
> +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
> @@ -50,7 +50,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h 
> b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
> index d9da625..cccb32d 100644
> --- a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
> +++ b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
> @@ -119,16 +119,5 @@ struct lnet_fault_stat {
>  
>  #define LNET_DEV_ID 0
>  #define LNET_DEV_PATH "/dev/lnet"
> -#define LNET_DEV_MAJOR 10
> -#define LNET_DEV_MINOR 240
> -#define OBD_DEV_ID 1
> -#define OBD_DEV_NAME "obd"
> -#define OBD_DEV_PATH "/dev/" OBD_DEV_NAME
> -#define OBD_DEV_MAJOR 10
> -#define OBD_DEV_MINOR 241
> -#define SMFS_DEV_ID  2
> -#define SMFS_DEV_PATH "/dev/snapdev"
> -#define SMFS_DEV_MAJOR 10
> -#define SMFS_DEV_MINOR 242
>  
>  #endif
> diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h 
> b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
> index 9590864..6e4e109 100644
> --- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
> +++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
> @@ -51,8 +51,6 @@ enum md_echo_cmd {
>  #define OBD_DEV_ID 1
>  #define OBD_DEV_NAME "obd"
>  #define OBD_DEV_PATH "/dev/" OBD_DEV_NAME
> -#define OBD_DEV_MAJOR 10
> -#define OBD_DEV_MINOR 241
>  
>  #define OBD_IOCTL_VERSION0x00010004
>  #define OBD_DEV_BY_DEVNAME   0xd0de
> diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c 
> b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c
> index 0092166..1d728f1 100644
> --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c
> +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c
> @@ -48,7 +48,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  
>  # define DEBUG_SUBSYSTEM S_LNET
>  
> diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c 
> b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
> index ddf6256..c8908e8 100644
> --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
> +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
> @@ -33,10 +33,9 @@
>  
>  #define DEBUG_SUBSYSTEM S_LNET
>  
> +#include 
>  #include 
>  
> -#define LNET_MINOR 240
> -
>  static inline size_t libcfs_ioctl_packlen(struct libcfs_ioctl_data *data)
>  {
>   size_t len = sizeof(*data);
> @@ -191,7 +190,7 @@ int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp,
>  };
>  
>  struct miscdevice libcfs_dev = {
> - .minor = LNET_MINOR,
> + .minor = MISC_DYNAMIC_MINOR,
>   .name = "lnet",
>   .fops = _fops,
>  };
> diff --git a/drivers/staging/lustre/lnet/libcfs/module.c 
> b/drivers/staging/lustre/lnet/libcfs/module.c
> index a03f924..4b9acd7 100644
> --- a/drivers/staging/lustre/lnet/libcfs/module.c
> +++ b/drivers/staging/lustre/lnet/libcfs/module.c
> @@ -30,6 +30,7 @@
>   * This file is part of Lustre, http://www.lustre.org/
>   * Lustre is a trademark of Sun Microsystems, Inc.
>   */
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c 
> b/drivers/staging/lustre/lustre/obdclass/class_obd.c
> index 3e24b76..7b5be6b 100644
> --- 

RE: [PATCH v4 04/13] usb: typec: add fwnode to tcpc

2018-03-30 Thread Jun Li
Hi
> -Original Message-
> From: Heikki Krogerus [mailto:heikki.kroge...@linux.intel.com]
> Sent: 2018年3月29日 20:58
> To: Jun Li 
> Cc: robh...@kernel.org; gre...@linuxfoundation.org; li...@roeck-us.net;
> a.ha...@samsung.com; shufan_...@richtek.com; Peter Chen
> ; devicet...@vger.kernel.org;
> linux-...@vger.kernel.org; dl-linux-imx ;
> de...@driverdev.osuosl.org
> Subject: Re: [PATCH v4 04/13] usb: typec: add fwnode to tcpc
> 
> Hi,
> 
> On Thu, Mar 29, 2018 at 12:06:09AM +0800, Li Jun wrote:
> > Add fwnode handle to get the fwnode so we can get typec configs it
> > contains.
> >
> > Suggested-by: Heikki Krogerus 
> > Signed-off-by: Li Jun 
> > ---
> >  drivers/staging/typec/tcpci.c | 14 +++---
> >  drivers/usb/typec/tcpm.c  |  1 +
> >  include/linux/usb/tcpm.h  |  2 ++
> >  3 files changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/staging/typec/tcpci.c
> > b/drivers/staging/typec/tcpci.c index ed76327..4f7ad10 100644
> > --- a/drivers/staging/typec/tcpci.c
> > +++ b/drivers/staging/typec/tcpci.c
> > @@ -10,6 +10,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >  #include 
> >  #include 
> >  #include 
> > @@ -463,17 +464,16 @@ static const struct regmap_config
> tcpci_regmap_config = {
> > .max_register = 0x7F, /* 0x80 .. 0xFF are vendor defined */  };
> >
> > -static const struct tcpc_config tcpci_tcpc_config = {
> > -   .type = TYPEC_PORT_DFP,
> > -   .default_role = TYPEC_SINK,
> > -};
> > -
> >  static int tcpci_parse_config(struct tcpci *tcpci)  {
> > tcpci->controls_vbus = true; /* XXX */
> >
> > -   /* TODO: Populate struct tcpc_config from ACPI/device-tree */
> > -   tcpci->tcpc.config = _tcpc_config;
> 
> That will break bisectablitity. tcpm.c is still accessing the config at this 
> point.
> 

Yes, good catch.

> Just leave those untouched in here, and clean-up in separate patch that comes
> after the patch that prepares tcpm.c.

I will change in next version, thanks.

Li Jun
> 
> 
> Thanks,
> 
> --
> heikki
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH v4 10/13] usb: typec: tcpm: set cc for drp toggling attach

2018-03-30 Thread Jun Li
Hi
> -Original Message-
> From: Mats Karrman [mailto:mats.dev.l...@gmail.com]
> Sent: 2018年3月30日 5:19
> To: Jun Li ; robh...@kernel.org; gre...@linuxfoundation.org;
> heikki.kroge...@linux.intel.com; li...@roeck-us.net
> Cc: a.ha...@samsung.com; shufan_...@richtek.com; Peter Chen
> ; devicet...@vger.kernel.org;
> linux-...@vger.kernel.org; dl-linux-imx ;
> de...@driverdev.osuosl.org
> Subject: Re: [PATCH v4 10/13] usb: typec: tcpm: set cc for drp toggling attach
> 
> Hi Li,
> 
> On 03/28/2018 06:06 PM, Li Jun wrote:
> 
> > In case of drp toggling, we may need set correct cc value for role
> > control after attach as it may never been set.
> >
> > Signed-off-by: Li Jun 
> > ---
> >  drivers/usb/typec/tcpm.c | 5 +
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index
> > 218c230..72d4232 100644
> > --- a/drivers/usb/typec/tcpm.c
> > +++ b/drivers/usb/typec/tcpm.c
> > @@ -2126,6 +2126,7 @@ static void tcpm_reset_port(struct tcpm_port *port)
> > tcpm_set_attached_state(port, false);
> > port->try_src_count = 0;
> > port->try_snk_count = 0;
> > +   port->cc_req = 0;
> 
> I don't think it's OK to use "0" here. cc_req is an enum so why not use
> "|TYPEC_CC_OPEN"?|
> 

I will change to be TYPEC_CC_OPEN, also other place.

Li Jun
> >  }
> >
> >  static void tcpm_detach(struct tcpm_port *port) @@ -2361,6 +2362,8 @@
> > static void run_state_machine(struct tcpm_port *port)
> > break;
> >
> > case SRC_ATTACHED:
> > +   if (!port->cc_req)
> 
>           if (port->cc_req == |TYPEC_CC_OPEN)|
> 
> > +   tcpm_set_cc(port, tcpm_rp_cc(port));
> > ret = tcpm_src_attach(port);
> > tcpm_set_state(port, SRC_UNATTACHED,
> >ret < 0 ? 0 : PD_T_PS_SOURCE_ON); @@ -2531,6 
> > +2534,8
> @@
> > static void run_state_machine(struct tcpm_port *port)
> > tcpm_set_state(port, SNK_UNATTACHED, PD_T_PD_DEBOUNCE);
> > break;
> > case SNK_ATTACHED:
> > +   if (!port->cc_req)
> 
> Ditto.
> 
> > +   tcpm_set_cc(port, TYPEC_CC_RD);
> > ret = tcpm_snk_attach(port);
> > if (ret < 0)
> > tcpm_set_state(port, SNK_UNATTACHED, 0);
> 
> // Mats
> 

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


RE: [PATCH v4 01/13] dt-bindings: connector: add properties for typec

2018-03-30 Thread Jun Li
Hi
> -Original Message-
> From: Mats Karrman [mailto:mats.dev.l...@gmail.com]
> Sent: 2018年3月30日 3:54
> To: Jun Li ; robh...@kernel.org; gre...@linuxfoundation.org;
> heikki.kroge...@linux.intel.com; li...@roeck-us.net
> Cc: a.ha...@samsung.com; shufan_...@richtek.com; Peter Chen
> ; devicet...@vger.kernel.org;
> linux-...@vger.kernel.org; dl-linux-imx ;
> de...@driverdev.osuosl.org
> Subject: Re: [PATCH v4 01/13] dt-bindings: connector: add properties for typec
> 
> Hi Li,
> 
> On 03/28/2018 06:06 PM, Li Jun wrote:
> 
> > Add bingdings supported by current typec driver, so user can pass all
> > those properties via dt.
> >
> > Signed-off-by: Li Jun 
> > ---
> >  .../bindings/connector/usb-connector.txt   | 39
> ++
> >  1 file changed, 39 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/connector/usb-connector.txt
> > b/Documentation/devicetree/bindings/connector/usb-connector.txt
> > index e1463f1..922f22b 100644
> > --- a/Documentation/devicetree/bindings/connector/usb-connector.txt
> > +++ b/Documentation/devicetree/bindings/connector/usb-connector.txt
> > @@ -15,6 +15,29 @@ Optional properties:
> >  - type: size of the connector, should be specified in case of USB-A, USB-B
> >non-fullsize connectors: "mini", "micro".
> >
> > +Optional properties for usb-c-connector:
> > +- power-type: should be one of "source", "sink" or "dual"(DRP) if
> > +typec
> > +  connector has power support.
> > +- try-power-role: preferred power role if "dual"(DRP) can support
> > +Try.SNK
> > +  or Try.SRC, should be "sink" for Try.SNK or "source" for Try.SRC.
> > +- data-type: should be one of "host", "device", "dual"(DRD) if typec
> > +  connector supports USB data.
> > +
> > +Required properties for usb-c-connector with power delivery support:
> > +- source-pdos: An array of u32 with each entry providing supported
> > +power
> > +  source data object(PDO), the detailed bit definitions of PDO can be
> > +found
> > +  in "Universal Serial Bus Power Delivery Specification" chapter
> > +6.4.1.2
> > +  Source_Capabilities Message, the order of each entry(PDO) should
> > +follow
> > +  the PD spec chapter 6.4.1. Required for power source and power dual role.
> > +- sink-pdos: An array of u32 with each entry providing supported
> > +power
> > +  sink data object(PDO), the detailed bit definitions of PDO can be
> > +found
> > +  in "Universal Serial Bus Power Delivery Specification" chapter
> > +6.4.1.3
> > +  Sink Capabilities Message, the order of each entry(PDO) should
> > +follow
> > +  the PD spec chapter 6.4.1. Required for power sink and power dual role.
> > +- op-sink-microwatt-hours: Sink required operating power in micro
> > +  watt-hours, if source offered power is less then it, Capability
> > +Mismatch
> > +  is set, required for power sink and power dual role.
> 
> This doesn't make sense. The unit of power is watt (W), watt-hour on the other
> hand is a measurement of energy. I think "op-sink-microwatt" is what we want
> here.

Yes, you are right, microwatt is what I should use here. I will change.

Li Jun
> 
> // Mats
> 
> > +
> >  Required nodes:
> >  - any data bus to the connector should be modeled using the OF graph
> bindings
> >specified in bindings/graph.txt, unless the bus is between parent
> > node and @@ -73,3 +96,19 @@ ccic: s2mm005@33 {
> > };
> > };
> >  };
> > +
> > +3. USB-C connector attached to a typec port controller(ptn5110),
> > +which has power delivery support and enables drp.
> > +
> > +typec: ptn5110@50 {
> > +   ...
> > +   usb_con: connector {
> > +   compatible = "usb-c-connector";
> > +   label = "USB-C";
> > +   power-type = "dual";
> > +   try-power-role = "sink";
> > +   source-pdos = <0x380190c8>;
> > +   sink-pdos = <0x380190c8 0x3802d0c8>;
> > +   op-sink-microwatt-hours = <900>;
> > +   };
> > +};
> >
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH v4 07/13] staging: typec: tcpci: register port before request irq

2018-03-30 Thread Jun Li
Hi
> -Original Message-
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: 2018年3月29日 18:52
> To: Jun Li 
> Cc: robh...@kernel.org; gre...@linuxfoundation.org;
> heikki.kroge...@linux.intel.com; li...@roeck-us.net;
> de...@driverdev.osuosl.org; devicet...@vger.kernel.org; Peter Chen
> ; linux-...@vger.kernel.org; a.ha...@samsung.com;
> dl-linux-imx ; shufan_...@richtek.com
> Subject: Re: [PATCH v4 07/13] staging: typec: tcpci: register port before 
> request
> irq
> 
> On Thu, Mar 29, 2018 at 12:06:12AM +0800, Li Jun wrote:
> > With that we can clear any pending events and the port is registered
> > so driver can be ready to handle typec events once we request irq.
> >
> > Signed-off-by: Peter Chen 
> > Signed-off-by: Li Jun 
> 
> These sign offs aren't clear.
> 
> Sign offs mean that you handled the patch but didn't include any of SCO's
> copyrighted UNIX code into it.  Normally they're in the order of who touched
> the code.  So Peter touched the code first.  Should he get authorship credit?

I will change the patch author to be Peter as he touched the code first.

> How did he touch the code first if he didn't write the code?  It doesn't make
> sense.
> 
> > ---
> >  drivers/staging/typec/tcpci.c | 15 ---
> >  1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/staging/typec/tcpci.c
> > b/drivers/staging/typec/tcpci.c index 4f7ad10..9e0014b 100644
> > --- a/drivers/staging/typec/tcpci.c
> > +++ b/drivers/staging/typec/tcpci.c
> > @@ -537,25 +537,26 @@ static int tcpci_probe(struct i2c_client *client,
> > if (IS_ERR(chip->data.regmap))
> > return PTR_ERR(chip->data.regmap);
> >
> > +   i2c_set_clientdata(client, chip);
> > +
> > /* Disable chip interrupts before requesting irq */
> > err = regmap_raw_write(chip->data.regmap, TCPC_ALERT_MASK, ,
> >sizeof(u16));
> > if (err < 0)
> > return err;
> >
> > +   chip->tcpci = tcpci_register_port(>dev, >data);
> > +   if (PTR_ERR_OR_ZERO(chip->tcpci))
> > +   return PTR_ERR(chip->tcpci);
> 
> When a function returns both error pointers and NULL that means that NULL is a
> secial case of success.  Like for example:
> 
>   p->my_feature = get_optional_feature();
> 
> If it returns NULL that means the optional feature isn't there, but it's fine 
> because
> it's optional.  But if it returns an error pointer that means the feature is 
> there
> but the hardware is buggy or something so we shouldn't continue.
> 
> If you return PTR_ERR(NULL) that means success.
> 
> I don't think this code makes sense just from looking at it and also when I
> checked tcpci_register_port() doesn't return NULL.

This patch is to change the sequence of register port and request irq,
if error code checking of original code has the problem, I think that
should be another patch to fix it, I can do that later.

> 
> 
> 
> > +
> > err = devm_request_threaded_irq(>dev, client->irq, NULL,
> > _tcpci_irq,
> > IRQF_ONESHOT | IRQF_TRIGGER_LOW,
> > dev_name(>dev), chip);
> > if (err < 0)
> > -   return err;
> > +   tcpci_unregister_port(chip->tcpci);
> 
> Can you put the "return err;" back, because that's better style.  It's better 
> to
> keep the error path and success path separate if you can.
> 
>   if (err < 0) {
>   tcpci_unregister_port(chip->tcpci);
>   return err;
>   }
> 
>   return 0;
> 

OK, I will change as you suggested, thanks.

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


Re: [PATCH v5] PCI: hv: Make sure the bus domain is really unique

2018-03-30 Thread Sridhar Pitchai
>On 3/30/18, 2:23 PM, "Bjorn Helgaas"  wrote:
>   >On Fri, Mar 30, 2018 at 07:35:04PM +, Sridhar Pitchai wrote:
>   >commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI
>   >domain") need to be reverted. Also, we no longer need it as commit
>   >4a1626dd233e ("netvsc: transparent VF management") remove the
>   >need for it.
>
>Do you mean 0c195567a8f6 ("netvsc: transparent VF management")?
>
>I don't see a 4a1626dd233e commit in Linus' tree.
>

That is right. sha should be 4a1626dd233e.

>The connection between 0c195567a8f6 ("netvsc: transparent VF
>management") and this Hyper-V domain ID issue is not clear to me at
>all.  But obviously I'm not a networking or a Hyper-V person.
>
>A hint in the changelog about what that connection is would be nice.
>
>   >Revert commit 4a9b0933bdfc ("PCI: hv: Use device serial number as 
PCI
>   >domain") so we can reliably support multiple devices being 
assigned to
>   >a guest.
>   >
>   >This revert should only be backported to kernels that contain 
commit
>   >4a1626dd233e ("netvsc: transparent VF management").
>   >
>   >Fixes: 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI 
domain")
>   >Signed-off-by: Sridhar Pitchai 
>   >Cc: sta...@vger.kernel.org
>
>This backporting guidance is very confusing.
>
>4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain")
>appeared in v4.11.
>
>0c195567a8f6 ("netvsc: transparent VF management") appeared in v4.14.
>
>The changelog and the "Fixes" tag both suggest that 4a9b0933bdfc was
>flat-out buggy and should be reverted unconditionally.  That would
>mean this patch should be applied to v4.11 and later stable kernels.
>
>But the changelog also says "only revert 4a9b0933bdfc if you have
>0c195567a8f6".  That would mean this patch should only be applied to
>v4.14 and later stable kernels.
>
>Which is it?  You can answer in this thread if you want, but Lorenzo
>will ultimately be looking for a v6 patch with a corrected changelog.

It is the Case 1. We just need to revert 4a9b0933bdfc. I will remove the
reference to 0c195567a8f6 altogether in the commit message.

>
>I think Lorenzo is out this week, but I suspect he'll look at it next
>week.
>
>Bjorn

I will send out the update patch version 6.

Thanks,
Sridhar Pitchai 

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


Re: [PATCH v5] PCI: hv: Make sure the bus domain is really unique

2018-03-30 Thread Bjorn Helgaas
On Fri, Mar 30, 2018 at 07:35:04PM +, Sridhar Pitchai wrote:
>   >When Linux runs as a guest VM in Hyper-V and Hyper-V adds the virtual
>   >PCI bus to the guest, Hyper-V always provides unique PCI domain.
>   >
>   >commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain")
>   >overrode unique domain with the serial number of the first device added
>   >to the virtual PCI bus. The reason for that patch is to have a consistent
>   >and short name for the device. But commit 4a9b0933bdfc ("PCI: hv: Use
>   >device serial number as PCI domain") will not guarantee unique domain id.
>   >For example, if the serial number of the device is 0 and there exists a
>   >PCI bus with domain 0 already, this will cause the PCI bus registration
>   >with kernel fails.
>   >
>   >commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI
>   >domain") need to be reverted. Also, we no longer need it as commit
>   >4a1626dd233e ("netvsc: transparent VF management") remove the
>   >need for it.

Do you mean 0c195567a8f6 ("netvsc: transparent VF management")?

I don't see a 4a1626dd233e commit in Linus' tree.

The connection between 0c195567a8f6 ("netvsc: transparent VF
management") and this Hyper-V domain ID issue is not clear to me at
all.  But obviously I'm not a networking or a Hyper-V person.

A hint in the changelog about what that connection is would be nice.

>   >Revert commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI
>   >domain") so we can reliably support multiple devices being assigned to
>   >a guest.
>   >
>   >This revert should only be backported to kernels that contain commit
>   >4a1626dd233e ("netvsc: transparent VF management").
>   >
>   >Fixes: 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain")
>   >Signed-off-by: Sridhar Pitchai 
>   >Cc: sta...@vger.kernel.org

This backporting guidance is very confusing.

4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain")
appeared in v4.11.

0c195567a8f6 ("netvsc: transparent VF management") appeared in v4.14.

The changelog and the "Fixes" tag both suggest that 4a9b0933bdfc was
flat-out buggy and should be reverted unconditionally.  That would
mean this patch should be applied to v4.11 and later stable kernels.

But the changelog also says "only revert 4a9b0933bdfc if you have
0c195567a8f6".  That would mean this patch should only be applied to
v4.14 and later stable kernels.

Which is it?  You can answer in this thread if you want, but Lorenzo
will ultimately be looking for a v6 patch with a corrected changelog.

>   >---
>   >Changes in v5:
>   >* fix the commit comment. [Lorenzo Pieralisi, Bjorn Helgaas]
>   >* fixed the patch white space.
>   >---
>   > drivers/pci/host/pci-hyperv.c | 11 ---
>   > 1 file changed, 11 deletions(-)
>   >
>   >diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
>   >index 2faf38eab785..ac67e56e451a 100644
>   >--- a/drivers/pci/host/pci-hyperv.c
>   >+++ b/drivers/pci/host/pci-hyperv.c
>   >@@ -1518,17 +1518,6 @@ static struct hv_pci_dev 
> *new_pcichild_device(struct hv_pcibus_device *hbus,
>   >   get_pcichild(hpdev, hv_pcidev_ref_childlist);
>   >   spin_lock_irqsave(>device_list_lock, flags);
>   > 
>   >-  /*
>   >-   * When a device is being added to the bus, we set the PCI domain
>   >-   * number to be the device serial number, which is non-zero and
>   >-   * unique on the same VM.  The serial numbers start with 1, and
>   >-   * increase by 1 for each device.  So device names including this
>   >-   * can have shorter names than based on the bus instance UUID.
>   >-   * Only the first device serial number is used for domain, so the
>   >-   * domain number will not change after the first device is added.
>   >-   */
>   >-  if (list_empty(>children))
>   >-  hbus->sysdata.domain = desc->ser;
>   >   list_add_tail(>list_entry, >children);
>   >   spin_unlock_irqrestore(>device_list_lock, flags);
>   >   return hpdev;
>   >-- 
> >2.14.1
> 
> Hi Lorenzo,
> Did you get a chance to look at the patch v5. Please let me know if
> anything I need to address further.

I think Lorenzo is out this week, but I suspect he'll look at it next
week.

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


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

2018-03-30 Thread Haiyang Zhang
From: Haiyang Zhang 

The variables, msg and data, have the same value. This patch removes
the extra one.

Signed-off-by: Haiyang Zhang 
---
 drivers/net/hyperv/rndis_filter.c | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/hyperv/rndis_filter.c 
b/drivers/net/hyperv/rndis_filter.c
index 4a4952363e8a..e2b68d9328a7 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -365,14 +365,15 @@ static inline void *rndis_get_ppi(struct rndis_packet 
*rpkt, u32 type)
 
 static int rndis_filter_receive_data(struct net_device *ndev,
 struct netvsc_device *nvdev,
-struct rndis_message *msg,
 struct vmbus_channel *channel,
-void *data, u32 data_buflen)
+struct rndis_message *msg,
+u32 data_buflen)
 {
struct rndis_packet *rndis_pkt = >msg.pkt;
const struct ndis_tcp_ip_checksum_info *csum_info;
const struct ndis_pkt_8021q_info *vlan;
u32 data_offset;
+   void *data;
 
/* Remove the rndis header and pass it back up the stack */
data_offset = RNDIS_HEADER_SIZE + rndis_pkt->data_offset;
@@ -393,14 +394,15 @@ static int rndis_filter_receive_data(struct net_device 
*ndev,
 
vlan = rndis_get_ppi(rndis_pkt, IEEE_8021Q_INFO);
 
+   csum_info = rndis_get_ppi(rndis_pkt, TCPIP_CHKSUM_PKTINFO);
+
+   data = (void *)msg + data_offset;
+
/*
 * Remove the rndis trailer padding from rndis packet message
 * rndis_pkt->data_len tell us the real data length, we only copy
 * the data packet to the stack, without the rndis trailer padding
 */
-   data = (void *)((unsigned long)data + data_offset);
-   csum_info = rndis_get_ppi(rndis_pkt, TCPIP_CHKSUM_PKTINFO);
-
return netvsc_recv_callback(ndev, nvdev, channel,
data, rndis_pkt->data_len,
csum_info, vlan);
@@ -419,8 +421,8 @@ int rndis_filter_receive(struct net_device *ndev,
 
switch (rndis_msg->ndis_msg_type) {
case RNDIS_MSG_PACKET:
-   return rndis_filter_receive_data(ndev, net_dev, rndis_msg,
-channel, data, buflen);
+   return rndis_filter_receive_data(ndev, net_dev, channel,
+rndis_msg, buflen);
case RNDIS_MSG_INIT_C:
case RNDIS_MSG_QUERY_C:
case RNDIS_MSG_SET_C:
-- 
2.15.1

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


Re: [PATCH v5] PCI: hv: Make sure the bus domain is really unique

2018-03-30 Thread Sridhar Pitchai
  >When Linux runs as a guest VM in Hyper-V and Hyper-V adds the virtual
  >PCI bus to the guest, Hyper-V always provides unique PCI domain.
  >
  >commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain")
  >overrode unique domain with the serial number of the first device added
  >to the virtual PCI bus. The reason for that patch is to have a consistent
  >and short name for the device. But commit 4a9b0933bdfc ("PCI: hv: Use
  >device serial number as PCI domain") will not guarantee unique domain id.
  >For example, if the serial number of the device is 0 and there exists a
  >PCI bus with domain 0 already, this will cause the PCI bus registration
  >with kernel fails.
  >
  >commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI
  >domain") need to be reverted. Also, we no longer need it as commit
  >4a1626dd233e ("netvsc: transparent VF management") remove the
  >need for it.
  >
  >Revert commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI
  >domain") so we can reliably support multiple devices being assigned to
  >a guest.
  >
  >This revert should only be backported to kernels that contain commit
  >4a1626dd233e ("netvsc: transparent VF management").
  >
  >Fixes: 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain")
  >Signed-off-by: Sridhar Pitchai 
  >Cc: sta...@vger.kernel.org
  >
  >---
  >Changes in v5:
  >* fix the commit comment. [Lorenzo Pieralisi, Bjorn Helgaas]
  >* fixed the patch white space.
  >---
  > drivers/pci/host/pci-hyperv.c | 11 ---
  > 1 file changed, 11 deletions(-)
  >
  >diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c
  >index 2faf38eab785..ac67e56e451a 100644
  >--- a/drivers/pci/host/pci-hyperv.c
  >+++ b/drivers/pci/host/pci-hyperv.c
  >@@ -1518,17 +1518,6 @@ static struct hv_pci_dev *new_pcichild_device(struct 
hv_pcibus_device *hbus,
  > get_pcichild(hpdev, hv_pcidev_ref_childlist);
  > spin_lock_irqsave(>device_list_lock, flags);
  > 
  >-/*
  >- * When a device is being added to the bus, we set the PCI domain
  >- * number to be the device serial number, which is non-zero and
  >- * unique on the same VM.  The serial numbers start with 1, and
  >- * increase by 1 for each device.  So device names including this
  >- * can have shorter names than based on the bus instance UUID.
  >- * Only the first device serial number is used for domain, so the
  >- * domain number will not change after the first device is added.
  >- */
  >-if (list_empty(>children))
  >-hbus->sysdata.domain = desc->ser;
  > list_add_tail(>list_entry, >children);
  > spin_unlock_irqrestore(>device_list_lock, flags);
  > return hpdev;
  >-- 
>2.14.1

Hi Lorenzo,
Did you get a chance to look at the patch v5. Please let me know if
anything I need to address further.

Thanks
Sridhar 

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


[PATCH] staging: lustre: libcfs: use dynamic minors for /dev/{lnet, obd}

2018-03-30 Thread James Simmons
From: "John L. Hammond" 

Request dynamic minor allocation when registering /dev/lnet and
/dev/obd.

Signed-off-by: John L. Hammond 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-100086
Reviewed-on: https://review.whamcloud.com/29741
Reviewed-by: Andreas Dilger 
Reviewed-by: Jian Yu 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h|  1 -
 drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h  | 11 ---
 .../staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h   |  2 --
 drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c|  1 -
 drivers/staging/lustre/lnet/libcfs/linux/linux-module.c   |  5 ++---
 drivers/staging/lustre/lnet/libcfs/module.c   |  1 +
 drivers/staging/lustre/lustre/obdclass/class_obd.c|  6 --
 drivers/staging/lustre/lustre/obdclass/linux/linux-module.c   |  3 +--
 8 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h 
b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
index 30e333a..cf4c606 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
@@ -50,7 +50,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h 
b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
index d9da625..cccb32d 100644
--- a/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lnet/lnetctl.h
@@ -119,16 +119,5 @@ struct lnet_fault_stat {
 
 #define LNET_DEV_ID 0
 #define LNET_DEV_PATH "/dev/lnet"
-#define LNET_DEV_MAJOR 10
-#define LNET_DEV_MINOR 240
-#define OBD_DEV_ID 1
-#define OBD_DEV_NAME "obd"
-#define OBD_DEV_PATH "/dev/" OBD_DEV_NAME
-#define OBD_DEV_MAJOR 10
-#define OBD_DEV_MINOR 241
-#define SMFS_DEV_ID  2
-#define SMFS_DEV_PATH "/dev/snapdev"
-#define SMFS_DEV_MAJOR 10
-#define SMFS_DEV_MINOR 242
 
 #endif
diff --git a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h 
b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
index 9590864..6e4e109 100644
--- a/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
+++ b/drivers/staging/lustre/include/uapi/linux/lustre/lustre_ioctl.h
@@ -51,8 +51,6 @@ enum md_echo_cmd {
 #define OBD_DEV_ID 1
 #define OBD_DEV_NAME "obd"
 #define OBD_DEV_PATH "/dev/" OBD_DEV_NAME
-#define OBD_DEV_MAJOR 10
-#define OBD_DEV_MINOR 241
 
 #define OBD_IOCTL_VERSION  0x00010004
 #define OBD_DEV_BY_DEVNAME 0xd0de
diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c 
b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c
index 0092166..1d728f1 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c
@@ -48,7 +48,6 @@
 #include 
 #include 
 #include 
-#include 
 
 # define DEBUG_SUBSYSTEM S_LNET
 
diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c 
b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
index ddf6256..c8908e8 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
@@ -33,10 +33,9 @@
 
 #define DEBUG_SUBSYSTEM S_LNET
 
+#include 
 #include 
 
-#define LNET_MINOR 240
-
 static inline size_t libcfs_ioctl_packlen(struct libcfs_ioctl_data *data)
 {
size_t len = sizeof(*data);
@@ -191,7 +190,7 @@ int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp,
 };
 
 struct miscdevice libcfs_dev = {
-   .minor = LNET_MINOR,
+   .minor = MISC_DYNAMIC_MINOR,
.name = "lnet",
.fops = _fops,
 };
diff --git a/drivers/staging/lustre/lnet/libcfs/module.c 
b/drivers/staging/lustre/lnet/libcfs/module.c
index a03f924..4b9acd7 100644
--- a/drivers/staging/lustre/lnet/libcfs/module.c
+++ b/drivers/staging/lustre/lnet/libcfs/module.c
@@ -30,6 +30,7 @@
  * This file is part of Lustre, http://www.lustre.org/
  * Lustre is a trademark of Sun Microsystems, Inc.
  */
+#include 
 #include 
 #include 
 #include 
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c 
b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 3e24b76..7b5be6b 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -32,7 +32,9 @@
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
-# include 
+
+#include 
+#include 
 
 #include 
 #include 
@@ -462,7 +464,7 @@ static int __init obdclass_init(void)
 
err = misc_register(_psdev);
if (err) {
-   CERROR("cannot register %d err %d\n", OBD_DEV_MINOR, err);
+   CERROR("cannot register OBD miscdevices: err %d\n", err);

Re: [PATCH v4 11/13] staging: typec: tcpci: keep the not connecting cc line open

2018-03-30 Thread Guenter Roeck

On 03/28/2018 09:06 AM, Li Jun wrote:

While set polarity, we should keep the not connecting cc line to be
open.



The more I look at this code, the more I am confused by it.

The original code doesn't touch the CC lines. This function only sets the 
polarity.
Is it really appropriate to touch the CC lines in the same function ?

Guenter


Signed-off-by: Li Jun 
---
  drivers/staging/typec/tcpci.c | 18 ++
  1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c
index d5b4e4e..b58bd59 100644
--- a/drivers/staging/typec/tcpci.c
+++ b/drivers/staging/typec/tcpci.c
@@ -185,15 +185,25 @@ static int tcpci_set_polarity(struct tcpc_dev *tcpc,
  enum typec_cc_polarity polarity)
  {
struct tcpci *tcpci = tcpc_to_tcpci(tcpc);
+   unsigned int reg;
int ret;
  
-	ret = regmap_write(tcpci->regmap, TCPC_TCPC_CTRL,

-  (polarity == TYPEC_POLARITY_CC2) ?
-  TCPC_TCPC_CTRL_ORIENTATION : 0);
+   /* Keep the disconnect cc line open */
+   ret = regmap_read(tcpci->regmap, TCPC_ROLE_CTRL, );
if (ret < 0)
return ret;
  
-	return 0;

+   if (polarity == TYPEC_POLARITY_CC2)
+   reg |= TCPC_ROLE_CTRL_CC_OPEN << TCPC_ROLE_CTRL_CC1_SHIFT;
+   else
+   reg |= TCPC_ROLE_CTRL_CC_OPEN << TCPC_ROLE_CTRL_CC2_SHIFT;
+   ret = regmap_write(tcpci->regmap, TCPC_ROLE_CTRL, reg);
+   if (ret < 0)
+   return ret;
+
+   return regmap_write(tcpci->regmap, TCPC_TCPC_CTRL,
+  (polarity == TYPEC_POLARITY_CC2) ?
+  TCPC_TCPC_CTRL_ORIENTATION : 0);
  }
  
  static int tcpci_set_vconn(struct tcpc_dev *tcpc, bool enable)




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


[PATCH 7/8] staging: ks7010: factor out check for firmware running into ks7010_is_firmware_running

2018-03-30 Thread Sergio Paracuellos
This commit extracts process to check if firmware is running
into a new inline function called ks7010_is_firmware_running.

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 5b6c7a7..11d5be1 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -639,12 +639,20 @@ static int ks7010_sdio_data_compare(struct 
ks_wlan_private *priv, u32 address,
return ret;
 }
 
+static inline bool ks7010_is_firmware_running(struct ks_wlan_private *priv,
+ int *ret)
+{
+   unsigned char byte;
+
+   *ret = ks7010_sdio_readb(priv, GCR_A, );
+   return (byte == GCR_A_RUN);
+}
+
 static int ks7010_upload_firmware(struct ks_sdio_card *card)
 {
struct ks_wlan_private *priv = card->priv;
unsigned int size, offset, n = 0;
unsigned char *rom_buf;
-   unsigned char byte = 0;
int ret;
unsigned int length;
const struct firmware *fw_entry = NULL;
@@ -655,9 +663,7 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 
sdio_claim_host(card->func);
 
-   /* Firmware running ? */
-   ret = ks7010_sdio_readb(priv, GCR_A, );
-   if (byte == GCR_A_RUN) {
+   if (ks7010_is_firmware_running(priv, )) {
netdev_dbg(priv->net_dev, "MAC firmware running ...\n");
goto release_host_and_free;
}
@@ -706,11 +712,7 @@ static int ks7010_upload_firmware(struct ks_sdio_card 
*card)
/* Firmware running check */
for (n = 0; n < 50; ++n) {
mdelay(10); /* wait_ms(10); */
-   ret = ks7010_sdio_readb(priv, GCR_A, );
-   if (ret)
-   goto release_firmware;
-
-   if (byte == GCR_A_RUN)
+   if (ks7010_is_firmware_running(priv, ))
break;
}
if ((50) <= n) {
@@ -719,8 +721,6 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
goto release_firmware;
}
 
-   ret = 0;
-
  release_firmware:
release_firmware(fw_entry);
  release_host_and_free:
-- 
2.7.4

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


[PATCH 8/8] staging: ks7010: factor out firmware copy process into ks7010_copy_firmware

2018-03-30 Thread Sergio Paracuellos
This commit extracts firmware copy process into a new function
ks7010_copy_firmware. Because rom_buf is only needed for this
process, memory request for it has been also moved to this new
function so the error handling label release_host_and_free has
been renamed to release_host into ks7010_upload_firmware original
function.

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 71 ++--
 1 file changed, 43 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 11d5be1..f30dba8 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -648,34 +648,21 @@ static inline bool ks7010_is_firmware_running(struct 
ks_wlan_private *priv,
return (byte == GCR_A_RUN);
 }
 
-static int ks7010_upload_firmware(struct ks_sdio_card *card)
+static int ks7010_copy_firmware(struct ks_wlan_private *priv,
+   const struct firmware *fw_entry)
 {
-   struct ks_wlan_private *priv = card->priv;
-   unsigned int size, offset, n = 0;
-   unsigned char *rom_buf;
int ret;
unsigned int length;
-   const struct firmware *fw_entry = NULL;
+   unsigned int size;
+   unsigned int offset;
+   unsigned int n = 0;
+   unsigned char *rom_buf;
 
rom_buf = kmalloc(ROM_BUFF_SIZE, GFP_KERNEL);
if (!rom_buf)
return -ENOMEM;
 
-   sdio_claim_host(card->func);
-
-   if (ks7010_is_firmware_running(priv, )) {
-   netdev_dbg(priv->net_dev, "MAC firmware running ...\n");
-   goto release_host_and_free;
-   }
-
-   ret = request_firmware(_entry, ROM_FILE,
-  >ks_sdio_card->func->dev);
-   if (ret)
-   goto release_host_and_free;
-
length = fw_entry->size;
-
-   n = 0;
do {
if (length >= ROM_BUFF_SIZE) {
size = ROM_BUFF_SIZE;
@@ -686,32 +673,61 @@ static int ks7010_upload_firmware(struct ks_sdio_card 
*card)
}
if (size == 0)
break;
+
memcpy(rom_buf, fw_entry->data + n, size);
 
offset = n;
-   ret = ks7010_sdio_update_index(priv, KS7010_IRAM_ADDRESS + 
offset);
+   ret = ks7010_sdio_update_index(priv,
+  KS7010_IRAM_ADDRESS + offset);
if (ret)
-   goto release_firmware;
+   goto copy_error;
 
ret = ks7010_sdio_write(priv, DATA_WINDOW, rom_buf, size);
if (ret)
-   goto release_firmware;
+   goto copy_error;
 
-   ret = ks7010_sdio_data_compare(priv, DATA_WINDOW, rom_buf, 
size);
+   ret = ks7010_sdio_data_compare(priv,
+  DATA_WINDOW, rom_buf, size);
if (ret)
-   goto release_firmware;
+   goto copy_error;
 
n += size;
 
} while (size);
 
-   ret = ks7010_sdio_writeb(priv, GCR_A, GCR_A_REMAP);
+   return ks7010_sdio_writeb(priv, GCR_A, GCR_A_REMAP);
+
+copy_error:
+   kfree(rom_buf);
+   return ret;
+}
+
+static int ks7010_upload_firmware(struct ks_sdio_card *card)
+{
+   struct ks_wlan_private *priv = card->priv;
+   unsigned int n;
+   int ret;
+   const struct firmware *fw_entry = NULL;
+
+   sdio_claim_host(card->func);
+
+   if (ks7010_is_firmware_running(priv, )) {
+   netdev_dbg(priv->net_dev, "MAC firmware running ...\n");
+   goto release_host;
+   }
+
+   ret = request_firmware(_entry, ROM_FILE,
+  >ks_sdio_card->func->dev);
+   if (ret)
+   goto release_host;
+
+   ret = ks7010_copy_firmware(priv, fw_entry);
if (ret)
goto release_firmware;
 
/* Firmware running check */
for (n = 0; n < 50; ++n) {
-   mdelay(10); /* wait_ms(10); */
+   mdelay(10);
if (ks7010_is_firmware_running(priv, ))
break;
}
@@ -723,9 +739,8 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
 
  release_firmware:
release_firmware(fw_entry);
- release_host_and_free:
+ release_host:
sdio_release_host(card->func);
-   kfree(rom_buf);
 
return ret;
 }
-- 
2.7.4

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


[PATCH 6/8] staging: ks7010: factor out initial enqueue process into ks7010_sme_enqueue_events

2018-03-30 Thread Sergio Paracuellos
This commit extract initial enqueue process into a new
ks7010_sme_enqueue_events function.

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 33 +++--
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index c14721e..5b6c7a7 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -730,21 +730,8 @@ static int ks7010_upload_firmware(struct ks_sdio_card 
*card)
return ret;
 }
 
-static void ks7010_card_init(struct ks_wlan_private *priv)
+static void ks7010_sme_enqueue_events(struct ks_wlan_private *priv)
 {
-   init_completion(>confirm_wait);
-
-   /* get mac address & firmware version */
-   hostif_sme_enqueue(priv, SME_START);
-
-   if (!wait_for_completion_interruptible_timeout
-   (>confirm_wait, 5 * HZ)) {
-   netdev_dbg(priv->net_dev, "wait time out!! SME_START\n");
-   }
-
-   if (priv->mac_address_valid && priv->version_size != 0)
-   priv->dev_state = DEVICE_STATE_PREINIT;
-
hostif_sme_enqueue(priv, SME_GET_EEPROM_CKSUM);
 
/* load initial wireless parameter */
@@ -763,6 +750,24 @@ static void ks7010_card_init(struct ks_wlan_private *priv)
hostif_sme_enqueue(priv, SME_RSN_ENABLED_REQUEST);
hostif_sme_enqueue(priv, SME_MODE_SET_REQUEST);
hostif_sme_enqueue(priv, SME_START_REQUEST);
+}
+
+static void ks7010_card_init(struct ks_wlan_private *priv)
+{
+   init_completion(>confirm_wait);
+
+   /* get mac address & firmware version */
+   hostif_sme_enqueue(priv, SME_START);
+
+   if (!wait_for_completion_interruptible_timeout
+   (>confirm_wait, 5 * HZ)) {
+   netdev_dbg(priv->net_dev, "wait time out!! SME_START\n");
+   }
+
+   if (priv->mac_address_valid && priv->version_size != 0)
+   priv->dev_state = DEVICE_STATE_PREINIT;
+
+   ks7010_sme_enqueue_events(priv);
 
if (!wait_for_completion_interruptible_timeout
(>confirm_wait, 5 * HZ)) {
-- 
2.7.4

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


[PATCH 4/8] staging: ks7010: factor out irq setup process to ks7010_sdio_setup_irqs

2018-03-30 Thread Sergio Paracuellos
This commit extract sdio irq setup process into a new
function ks7010_sdio_setup_irqs to improve readability.

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 32 +---
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index a55611f..5b3e814 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -802,6 +802,26 @@ static void ks7010_init_defaults(struct ks_wlan_private 
*priv)
priv->reg.rate_set.size = 12;
 }
 
+static int ks7010_sdio_setup_irqs(struct sdio_func *func)
+{
+   int ret;
+
+   /* interrupt disable */
+   sdio_writeb(func, 0, INT_ENABLE, );
+   if (ret)
+   goto irq_error;
+
+   sdio_writeb(func, 0xff, INT_PENDING, );
+   if (ret)
+   goto irq_error;
+
+   /* setup interrupt handler */
+   ret = sdio_claim_irq(func, ks_sdio_interrupt);
+
+irq_error:
+   return ret;
+}
+
 static void ks7010_sdio_init_irqs(struct sdio_func *func,
  struct ks_wlan_private *priv)
 {
@@ -855,17 +875,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
if (ret)
goto err_free_card;
 
-   /* interrupt disable */
-   sdio_writeb(func, 0, INT_ENABLE, );
-   if (ret)
-   goto err_disable_func;
-
-   sdio_writeb(func, 0xff, INT_PENDING, );
-   if (ret)
-   goto err_disable_func;
-
-   /* setup interrupt handler */
-   ret = sdio_claim_irq(func, ks_sdio_interrupt);
+   ret = ks7010_sdio_setup_irqs(func);
if (ret)
goto err_disable_func;
 
-- 
2.7.4

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


[PATCH 5/8] staging: ks7010: factor out ks_wlan_private init process into ks7010_private_init

2018-03-30 Thread Sergio Paracuellos
This commit extract ks_wlan_private initialization process
into a new function ks7010_private_init to improve a bit
readability.

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 50 
 1 file changed, 28 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 5b3e814..c14721e 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -848,6 +848,33 @@ static void ks7010_sdio_init_irqs(struct sdio_func *func,
netdev_err(priv->net_dev, " err : INT_ENABLE\n");
 }
 
+static void ks7010_private_init(struct ks_wlan_private *priv,
+   struct ks_sdio_card *card,
+   struct net_device *netdev)
+{
+   /* private memory initialize */
+   priv->ks_sdio_card = card;
+
+   priv->dev_state = DEVICE_STATE_PREBOOT;
+   priv->net_dev = netdev;
+   priv->firmware_version[0] = '\0';
+   priv->version_size = 0;
+   priv->last_doze = jiffies;
+   priv->last_wakeup = jiffies;
+   memset(>nstats, 0, sizeof(priv->nstats));
+   memset(>wstats, 0, sizeof(priv->wstats));
+
+   /* sleep mode */
+   atomic_set(>sleepstatus.doze_request, 0);
+   atomic_set(>sleepstatus.wakeup_request, 0);
+   atomic_set(>sleepstatus.wakeup_request, 0);
+
+   trx_device_init(priv);
+   hostif_init(priv);
+   ks_wlan_net_start(netdev);
+   ks7010_init_defaults(priv);
+}
+
 static int ks7010_sdio_probe(struct sdio_func *func,
 const struct sdio_device_id *device)
 {
@@ -903,28 +930,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
card->priv = priv;
SET_NETDEV_DEV(netdev, >func->dev);   /* for create sysfs 
symlinks */
 
-   /* private memory initialize */
-   priv->ks_sdio_card = card;
-
-   priv->dev_state = DEVICE_STATE_PREBOOT;
-   priv->net_dev = netdev;
-   priv->firmware_version[0] = '\0';
-   priv->version_size = 0;
-   priv->last_doze = jiffies;
-   priv->last_wakeup = jiffies;
-   memset(>nstats, 0, sizeof(priv->nstats));
-   memset(>wstats, 0, sizeof(priv->wstats));
-
-   /* sleep mode */
-   atomic_set(>sleepstatus.doze_request, 0);
-   atomic_set(>sleepstatus.wakeup_request, 0);
-   atomic_set(>sleepstatus.wakeup_request, 0);
-
-   trx_device_init(priv);
-   hostif_init(priv);
-   ks_wlan_net_start(netdev);
-
-   ks7010_init_defaults(priv);
+   ks7010_private_init(priv, card, netdev);
 
ret = ks7010_upload_firmware(card);
if (ret) {
-- 
2.7.4

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


[PATCH 1/8] staging: ks7010: remove unnecessary 'out of memory' message

2018-03-30 Thread Sergio Paracuellos
This commit removes unnecessay out of memory message
fixing the following checkpach.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 0cc14ac..19dfbb9 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -957,10 +957,8 @@ static int send_stop_request(struct sdio_func *func)
card = sdio_get_drvdata(func);
 
pp = kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
-   if (!pp) {
-   netdev_err(card->priv->net_dev, "allocate memory failed..\n");
+   if (!pp)
return -ENOMEM;
-   }
 
size = sizeof(*pp) - sizeof(pp->header.size);
pp->header.size = cpu_to_le16((uint16_t)size);
-- 
2.7.4

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


[PATCH 0/8] staging: ks7010: factor out some functions

2018-03-30 Thread Sergio Paracuellos
This patch series factors out some functions to improve
a bit readability in ks7010_sdio source file.

Sergio Paracuellos (8):
  staging: ks7010: remove unnecessary 'out of memory' message
  staging: ks7010: factor out irq enable process to
ks7010_sdio_init_irqs
  staging: ks7010: fix label to jump to in error case
  staging: ks7010: factor out irq setup process to
ks7010_sdio_setup_irqs
  staging: ks7010: factor out ks_wlan_private init process into
ks7010_private_init
  staging: ks7010: factor out initial enqueue process into
ks7010_sme_enqueue_events
  staging: ks7010: factor out check for firmware running into
ks7010_is_firmware_running
  staging: ks7010: factor out firmware copy process into
ks7010_copy_firmware

 drivers/staging/ks7010/ks7010_sdio.c | 252 +--
 1 file changed, 149 insertions(+), 103 deletions(-)

-- 
2.7.4

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


[PATCH 3/8] staging: ks7010: fix label to jump to in error case

2018-03-30 Thread Sergio Paracuellos
This commit fixs the label to jump to when in case
an error occurs disabling interrupts. At this point
of the code sdio_enable_func() function has been
successfully called.

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 10374be..a55611f 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -858,7 +858,8 @@ static int ks7010_sdio_probe(struct sdio_func *func,
/* interrupt disable */
sdio_writeb(func, 0, INT_ENABLE, );
if (ret)
-   goto err_free_card;
+   goto err_disable_func;
+
sdio_writeb(func, 0xff, INT_PENDING, );
if (ret)
goto err_disable_func;
-- 
2.7.4

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


[PATCH 2/8] staging: ks7010: factor out irq enable process to ks7010_sdio_init_irqs

2018-03-30 Thread Sergio Paracuellos
This commit extracts sdio irq enable process to a new function
ks7010_sdio_init_irqs to improve readability.

Signed-off-by: Sergio Paracuellos 
---
 drivers/staging/ks7010/ks7010_sdio.c | 43 ++--
 1 file changed, 27 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c 
b/drivers/staging/ks7010/ks7010_sdio.c
index 19dfbb9..10374be 100644
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -802,13 +802,38 @@ static void ks7010_init_defaults(struct ks_wlan_private 
*priv)
priv->reg.rate_set.size = 12;
 }
 
+static void ks7010_sdio_init_irqs(struct sdio_func *func,
+ struct ks_wlan_private *priv)
+{
+   unsigned char byte;
+   int ret;
+
+   /*
+* interrupt setting
+* clear Interrupt status write
+* (ARMtoSD_InterruptPending FN1:00_0024)
+*/
+   sdio_claim_host(func);
+   ret = ks7010_sdio_writeb(priv, INT_PENDING, 0xff);
+   sdio_release_host(func);
+   if (ret)
+   netdev_err(priv->net_dev, " error : INT_PENDING\n");
+
+   /* enable ks7010sdio interrupt */
+   byte = (INT_GCR_B | INT_READ_STATUS | INT_WRITE_STATUS);
+   sdio_claim_host(func);
+   ret = ks7010_sdio_writeb(priv, INT_ENABLE, byte);
+   sdio_release_host(func);
+   if (ret)
+   netdev_err(priv->net_dev, " err : INT_ENABLE\n");
+}
+
 static int ks7010_sdio_probe(struct sdio_func *func,
 const struct sdio_device_id *device)
 {
struct ks_wlan_private *priv;
struct ks_sdio_card *card;
struct net_device *netdev;
-   unsigned char byte;
int ret;
 
priv = NULL;
@@ -898,21 +923,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
goto err_free_netdev;
}
 
-   /* interrupt setting */
-   /* clear Interrupt status write (ARMtoSD_InterruptPending FN1:00_0024) 
*/
-   sdio_claim_host(func);
-   ret = ks7010_sdio_writeb(priv, INT_PENDING, 0xff);
-   sdio_release_host(func);
-   if (ret)
-   netdev_err(priv->net_dev, " error : INT_PENDING\n");
-
-   /* enable ks7010sdio interrupt */
-   byte = (INT_GCR_B | INT_READ_STATUS | INT_WRITE_STATUS);
-   sdio_claim_host(func);
-   ret = ks7010_sdio_writeb(priv, INT_ENABLE, byte);
-   sdio_release_host(func);
-   if (ret)
-   netdev_err(priv->net_dev, " err : INT_ENABLE\n");
+   ks7010_sdio_init_irqs(func, priv);
 
priv->dev_state = DEVICE_STATE_BOOT;
 
-- 
2.7.4

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


Re: [PATCH v6 6/6] Staging: iio: adis16209: Move adis16209 driver out of staging

2018-03-30 Thread Jonathan Cameron
On Thu, 29 Mar 2018 14:52:51 +0530
Shreeya Patel  wrote:

> Move the adis16209 driver out of staging directory and merge to the
> mainline IIO subsystem.
> 
> Signed-off-by: Shreeya Patel 
Other than fixing up for the patch 5 indentation change there
was some 'fuzz' due to the adis16201 moving before this one - easily
fixed up but please check I didn't get it wrong!

Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.

Good final series and good cleanup in general.

Thanks,

Jonathan

> ---
> 
> Changes in v6
>   -Move driver adis16209 from staging to mainline IIO subsystem
> after complete cleanup of it.
> 
>  drivers/iio/accel/Kconfig |  12 ++
>  drivers/iio/accel/Makefile|   1 +
>  drivers/iio/accel/adis16209.c | 330 
> ++
>  drivers/staging/iio/accel/Kconfig |  12 --
>  drivers/staging/iio/accel/Makefile|   1 -
>  drivers/staging/iio/accel/adis16209.c | 330 
> --
>  6 files changed, 343 insertions(+), 343 deletions(-)
>  create mode 100644 drivers/iio/accel/adis16209.c
>  delete mode 100644 drivers/staging/iio/accel/adis16209.c
> 
> diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig
> index c6d9517..f95f43c 100644
> --- a/drivers/iio/accel/Kconfig
> +++ b/drivers/iio/accel/Kconfig
> @@ -5,6 +5,18 @@
>  
>  menu "Accelerometers"
>  
> +config ADIS16209
> +tristate "Analog Devices ADIS16209 Dual-Axis Digital Inclinometer 
> and Accelerometer"
> +depends on SPI
> +select IIO_ADIS_LIB
> +select IIO_ADIS_LIB_BUFFER if IIO_BUFFER
> +help
> +  Say Y here to build support for Analog Devices adis16209 dual-axis 
> digital inclinometer
> +  and accelerometer.
> +
> +  To compile this driver as a module, say M here: the module will be
> +  called adis16209.
> +
>  config ADXL345
>   tristate
>  
> diff --git a/drivers/iio/accel/Makefile b/drivers/iio/accel/Makefile
> index 368aedb..40861b9 100644
> --- a/drivers/iio/accel/Makefile
> +++ b/drivers/iio/accel/Makefile
> @@ -4,6 +4,7 @@
>  #
>  
>  # When adding new entries keep the list in alphabetical order
> +obj-$(CONFIG_ADIS16209) += adis16209.o
>  obj-$(CONFIG_ADXL345) += adxl345_core.o
>  obj-$(CONFIG_ADXL345_I2C) += adxl345_i2c.o
>  obj-$(CONFIG_ADXL345_SPI) += adxl345_spi.o
> diff --git a/drivers/iio/accel/adis16209.c b/drivers/iio/accel/adis16209.c
> new file mode 100644
> index 000..cc50667
> --- /dev/null
> +++ b/drivers/iio/accel/adis16209.c
> @@ -0,0 +1,330 @@
> +/*
> + * ADIS16209 Dual-Axis Digital Inclinometer and Accelerometer
> + *
> + * Copyright 2010 Analog Devices Inc.
> + *
> + * Licensed under the GPL-2 or later.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +
> +#define ADIS16209_STARTUP_DELAY_MS   220
> +#define ADIS16209_FLASH_CNT_REG  0x00
> +
> +/* Data Output Register Definitions */
> +#define ADIS16209_SUPPLY_OUT_REG 0x02
> +#define ADIS16209_XACCL_OUT_REG  0x04
> +#define ADIS16209_YACCL_OUT_REG  0x06
> +/* Output, auxiliary ADC input */
> +#define ADIS16209_AUX_ADC_REG0x08
> +/* Output, temperature */
> +#define ADIS16209_TEMP_OUT_REG   0x0A
> +/* Output, +/- 90 degrees X-axis inclination */
> +#define ADIS16209_XINCL_OUT_REG  0x0C
> +#define ADIS16209_YINCL_OUT_REG  0x0E
> +/* Output, +/-180 vertical rotational position */
> +#define ADIS16209_ROT_OUT_REG0x10
> +
> +/*
> + * Calibration Register Definitions.
> + * Acceleration, inclination or rotation offset null.
> + */
> +#define ADIS16209_XACCL_NULL_REG 0x12
> +#define ADIS16209_YACCL_NULL_REG 0x14
> +#define ADIS16209_XINCL_NULL_REG 0x16
> +#define ADIS16209_YINCL_NULL_REG 0x18
> +#define ADIS16209_ROT_NULL_REG   0x1A
> +
> +/* Alarm Register Definitions */
> +#define ADIS16209_ALM_MAG1_REG   0x20
> +#define ADIS16209_ALM_MAG2_REG   0x22
> +#define ADIS16209_ALM_SMPL1_REG  0x24
> +#define ADIS16209_ALM_SMPL2_REG  0x26
> +#define ADIS16209_ALM_CTRL_REG   0x28
> +
> +#define ADIS16209_AUX_DAC_REG0x30
> +#define ADIS16209_GPIO_CTRL_REG  0x32
> +#define ADIS16209_SMPL_PRD_REG   0x36
> +#define ADIS16209_AVG_CNT_REG0x38
> +#define ADIS16209_SLP_CNT_REG0x3A
> +
> +#define ADIS16209_MSC_CTRL_REG   0x34
> +#define  ADIS16209_MSC_CTRL_PWRUP_SELF_TEST  BIT(10)
> +#define  ADIS16209_MSC_CTRL_SELF_TEST_EN BIT(8)
> +#define  ADIS16209_MSC_CTRL_DATA_RDY_EN  BIT(2)
> +/* Data-ready polarity: 1 = active high, 0 = active low */
> +#define  ADIS16209_MSC_CTRL_ACTIVE_HIGH  BIT(1)
> +#define  

Re: [PATCH v6 5/6] Staging: iio: adis16209: Use GENMASK

2018-03-30 Thread Jonathan Cameron
On Thu, 29 Mar 2018 14:51:19 +0530
Shreeya Patel  wrote:

> Use GENMASK to improve readability and remove the local
> variables used to store intermediate data.
> 
> Signed-off-by: Shreeya Patel 
See below.

Fixed up and applied to the togreg branch of iio.git and pushed out
as testing for the autobuilders to play with it.

Thanks,

Jonathan

> ---
> 
> Changes in v6
>   -Introduce this new patch in the series.
> 
>  drivers/staging/iio/accel/adis16209.c | 19 ---
>  1 file changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index ed6d7c7..cc50667 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -112,25 +112,22 @@ static int adis16209_write_raw(struct iio_dev 
> *indio_dev,
>  long mask)
>  {
>   struct adis *st = iio_priv(indio_dev);
> - int bits;
> - s16 val16;
> - u8 addr;
> + int m;
> +
> + if (mask != IIO_CHAN_INFO_CALIBBIAS)
> + return -EINVAL;
>  
> - switch (mask) {
> - case IIO_CHAN_INFO_CALIBBIAS:
Looks to me like the indenting is now incorrect.
The next block should be one less tab in.

>   switch (chan->type) {
>   case IIO_ACCEL:
>   case IIO_INCLI:
> - bits = 14;
> + m = GENMASK(13, 0);
>   break;
>   default:
>   return -EINVAL;
>   }
> - val16 = val & ((1 << bits) - 1);
> - addr = adis16209_addresses[chan->scan_index][0];
> - return adis_write_reg_16(st, addr, val16);
> - }
> - return -EINVAL;
> +
> + return adis_write_reg_16(st, adis16209_addresses[chan->scan_index][0],
> +  val & m);
>  }
>  
>  static int adis16209_read_raw(struct iio_dev *indio_dev,

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


Re: [PATCH v6 4/6] Staging: iio: adis16209: Remove unused headers

2018-03-30 Thread Jonathan Cameron
On Thu, 29 Mar 2018 14:49:22 +0530
Shreeya Patel  wrote:

> Remove few unused header files since the adis core handles
> the sysfs and buffer support.
> 
> Signed-off-by: Shreeya Patel 
Applied,

Thanks,

Jonathan

> ---
> 
> Changes in v6
>   -Introduce this new patch in the series.
> 
>  drivers/staging/iio/accel/adis16209.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index ee7e87b..ed6d7c7 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -6,7 +6,6 @@
>   * Licensed under the GPL-2 or later.
>   */
>  
> -#include 
>  #include 
>  #include 
>  #include 
> @@ -16,8 +15,6 @@
>  #include 
>  
>  #include 
> -#include 
> -#include 
>  #include 
>  
>  #define ADIS16209_STARTUP_DELAY_MS   220

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


Re: [PATCH v6 3/6] Staging: iio: adis16209: Add a blank line after return statements

2018-03-30 Thread Jonathan Cameron
On Thu, 29 Mar 2018 14:44:42 +0530
Shreeya Patel  wrote:

> Add a blank line after return statements to improve the code
> readability.
> 
> Signed-off-by: Shreeya Patel 
Applied to the togreg branch of iio.git and pushed out as
testing for the autobuilders to play with it.

Thanks,

Jonathan

> ---
> 
> Changes in v6
>   -Introduce this new patch in the series.
> 
>  drivers/staging/iio/accel/adis16209.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index 8f4fa6b..ee7e87b 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -277,6 +277,7 @@ static int adis16209_probe(struct spi_device *spi)
>   indio_dev = devm_iio_device_alloc(>dev, sizeof(*st));
>   if (!indio_dev)
>   return -ENOMEM;
> +
>   st = iio_priv(indio_dev);
>   spi_set_drvdata(spi, indio_dev);
>  
> @@ -290,6 +291,7 @@ static int adis16209_probe(struct spi_device *spi)
>   ret = adis_init(st, indio_dev, spi, _data);
>   if (ret)
>   return ret;
> +
>   ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL);
>   if (ret)
>   return ret;

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


Re: [PATCH v6 2/6] Staging: iio: adis16209: Prefer reverse christmas tree ordering

2018-03-30 Thread Jonathan Cameron
On Thu, 29 Mar 2018 14:43:23 +0530
Shreeya Patel  wrote:

> Prefer reverse christmas tree ordering of declarations to
> improve readability.
> 
> Signed-off-by: Shreeya Patel 
Applied to the togreg branch of iio.git and pushed out as
testing for the autobuilders to play with it.

Thanks,

Jonathan

> ---
> 
> Changes in v6
>   -Introduce this new patch in the series.
> 
>  drivers/staging/iio/accel/adis16209.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index 0e6366a..8f4fa6b 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -270,9 +270,9 @@ static const struct adis_data adis16209_data = {
>  
>  static int adis16209_probe(struct spi_device *spi)
>  {
> - int ret;
> - struct adis *st;
>   struct iio_dev *indio_dev;
> + struct adis *st;
> + int ret;
>  
>   indio_dev = devm_iio_device_alloc(>dev, sizeof(*st));
>   if (!indio_dev)

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


Re: [PATCH v6 1/6] Staging: iio: adis16209: Indent the field definitions

2018-03-30 Thread Jonathan Cameron
On Thu, 29 Mar 2018 14:42:02 +0530
Shreeya Patel  wrote:

> Have indentation in field definitions to make them
> clearly different from the register addresses.
> 
> Signed-off-by: Shreeya Patel 
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Note that, given the timing wrt to the current kernel cycle
(merge window will probably open this weekend), this and
everything for the last 2 weeks is now destined to go upstream
in the next cycle.

Thanks,

Jonathan

> ---
> 
> Changes in v5
>   -Change some macro names and have indentation in the field
> definitions.
> 
> Changes in v6
>   -Have indentation in the field definitions and do not
> change the names of the macros as the patch for changing 
> the names has already been applied.
> 
>  drivers/staging/iio/accel/adis16209.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/iio/accel/adis16209.c 
> b/drivers/staging/iio/accel/adis16209.c
> index a8453bf..0e6366a 100644
> --- a/drivers/staging/iio/accel/adis16209.c
> +++ b/drivers/staging/iio/accel/adis16209.c
> @@ -71,13 +71,13 @@
>  #define ADIS16209_STAT_REG   0x3C
>  #define  ADIS16209_STAT_ALARM2   BIT(9)
>  #define  ADIS16209_STAT_ALARM1   BIT(8)
> -#define ADIS16209_STAT_SELFTEST_FAIL_BIT 5
> -#define ADIS16209_STAT_SPI_FAIL_BIT  3
> -#define ADIS16209_STAT_FLASH_UPT_FAIL_BIT2
> +#define  ADIS16209_STAT_SELFTEST_FAIL_BIT5
> +#define  ADIS16209_STAT_SPI_FAIL_BIT 3
> +#define  ADIS16209_STAT_FLASH_UPT_FAIL_BIT   2
>  /* Power supply above 3.625 V */
> -#define ADIS16209_STAT_POWER_HIGH_BIT1
> +#define  ADIS16209_STAT_POWER_HIGH_BIT   1
>  /* Power supply below 3.15 V */
> -#define ADIS16209_STAT_POWER_LOW_BIT 0
> +#define  ADIS16209_STAT_POWER_LOW_BIT0
>  
>  #define ADIS16209_CMD_REG0x3E
>  #define  ADIS16209_CMD_SW_RESET  BIT(7)

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


[PATCH] staging: fsl-dpaa2/ethsw: Remove unused variable irq

2018-03-30 Thread Nguyen Phan Quang Minh
Local variable irq is not used. Remove it.

Signed-off-by: Nguyen Phan Quang Minh
---
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c 
b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
index c723a04bc3d6..a698498b8537 100644
--- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
+++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c
@@ -616,10 +616,8 @@ static void ethsw_teardown_irqs(struct fsl_mc_device 
*sw_dev)
 {
struct device *dev = _dev->dev;
struct ethsw_core *ethsw = dev_get_drvdata(dev);
-   struct fsl_mc_device_irq *irq;
int err;
 
-   irq = sw_dev->irqs[DPSW_IRQ_INDEX_IF];
err = dpsw_set_irq_enable(ethsw->mc_io, 0, ethsw->dpsw_handle,
  DPSW_IRQ_INDEX_IF, 0);
if (err)
-- 
2.15.1

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


Re: [PATCH 12/76] staging: ks7010: Remove trailing _t from 'struct hostif_mib_set_confirm_t'.

2018-03-30 Thread Greg KH
On Fri, Mar 30, 2018 at 12:07:35AM -0700, Quytelda Kahja wrote:
> 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_confirm_t' with 'struct
> hostif_mib_set_confirm'.
> 
> Signed-off-by: Quytelda Kahja 
> ---
>  drivers/staging/ks7010/ks_hostif.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/ks7010/ks_hostif.h 
> b/drivers/staging/ks7010/ks_hostif.h
> index 5261810fbc76..7a0e0c610c50 100644
> --- a/drivers/staging/ks7010/ks_hostif.h
> +++ b/drivers/staging/ks7010/ks_hostif.h
> @@ -175,7 +175,7 @@ struct hostif_mib_set_request {
>   struct hostif_mib_value mib_value;
>  } __packed;
>  
> -struct hostif_mib_set_confirm_t {
> +struct hostif_mib_set_confirm {
>   struct hostif_hdr header;
>   __le32 mib_status;
>   __le32 mib_attribute;

As Joe points out, please just remove structures that are not used at
all, it's pointless to keep them around.

thanks,

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


Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-30 Thread Jonathan Cameron
On Sun, 25 Mar 2018 13:53:02 -0700
John Syne  wrote:

> > On Mar 25, 2018, at 9:54 AM, Jonathan Cameron  wrote:
> > 
> > On Sun, 25 Mar 2018 01:29:41 -0700
> > John Syne  wrote:
> >   
> >> Hi Jonathan,  
> > Hi John,
> > 
> > Please wrap your normal emails (excepting tables) to 80 chars.  
> Yeah, I’m trying to do that, but I use a Mac and Apple Mail doesn’t
> have a feature to wrap at 80 automatically so I have to do
> this manually.
> >   
> >> 
> >> I was speaking with Rodrigo and here is what I think must be done to move
> >> ADE7878 out of staging
> >> 
> >> Here are the steps as I see them:
> >> 
> >> 1) Define the IIO Attributes so they are consistent with the IIO ABI. This
> >>   should be pretty simple given agreement on the naming convention.  
> > Please don't go just changing attribute names - the driver needs to
> > use the standard approach of iio_chan_spec and create the vast
> > majority of attributes automatically via that.  There 'may' be
> > a few corner cases wee don't want to make generic and they 'might'
> > be exposed as attributes.
> > 
> > I suspect this change is the 'big' job.  The core support necessary
> > for RMS and MAV (computedtype or whatever we call it) will need adding
> > as well.  That is a separate patch set with support for some examples
> > in the dummy driver.  
> Great that you mentioned this, because I though we only needed to
> modify the IIO_ATTR naming. I’ll take a look at iio_chan_spec and
> the examples in the dummy driver.

That is how it was originally done and this is an 'old' driver,
but the chan spec stuff does three things :
1) Saves on lots of boiler plate code.
2) Makes it sane to access the device from other driver (hwmon now does 
something
similar btw).
3) Avoids a lot of ABI typos and careful review.

> >   
> >> 2) Map the ADE7854 interrupt status to IIO events. This requires an
> >>   interrupt processing section.
> >> 3) Add DeviceTree support.
> >> 4) Create DeviceTree overlay for the ADE7854.  
> > More a case of bindings for now.  If those are used via an overlay
> > fine but given we don't have any boards with one one in mainline,
> > this is an implementation detail for the user rather than part
> > of moving this driver out of staging.  
> I was thinking more along the lines of documentation to show a
> developer what was needed to get the driver working.
Do it as an example in the device tree bindings doc.

> >   
> >> 5) Update ADE7854 probe to read in the DeviceTree register settings.
> >> 6) Add support for power modes (PM1, PM2).  
> > This isn't necessary for a move out of staging (nice to have though).
> >   
> >> 7) Not sure if we will support measurement streaming on the ADE7854.
> >>   The problem is ADE7854 is designed as an SPI master, which means
> >>   it controls the SPI clock, so the driver must support SPI slave
> >>   mode. However, the Linux Kernel does not currently support SPI
> >>   slave mode. We have three choices to make this work and they
> >>   are all a lot of work: 1) Add support for SPI Slave mode to the
> >>   kernel,  2) Use hardware to convert SPI signals to I2S signals
> >>   and with the use of a custom codec, use the ALSA framework to
> >>   stream the samples (this is an approach I used, but I don’t like
> >>   it), 3) Move the I2S driver out of the sound subsystem and use it
> >>   together with DMA to stream samples directly into the ADE7854 driver
> >>   (my preferred solutions). Perhaps Mark Brown has some ideas on how
> >>to make this work.   
> > I'll be honest, this is an end of line part and frankly more than
> > a little crazy. I would go with simply not supporting the measurement
> > streaming at all for this part.  If you really need it we can then
> > move onto the how part, but from what you have said I'm guessing you
> > don't care except in an abstract 'it would be nice' sort of a way?  
> Yeah, I’m moving to the ADE9000 so I’ll drop this.
Agreed.  We let someone else pick it up if they care.

> >   
> >> 
> >> The ADE9000 will be much easier because it uses an SPI Slave interface. 
> >> 
> >> I hope I have captured everything, but let me know if I have missed 
> >> anything.
> >>   
> > 
> > That will do for now ;)  I'm sure there will be details that need
> > tidying up once we have the above done, but that's true for any new
> > driver (and this will be nearly a new driver before things are done).  
> Thank you again for all the detailed feedback.
> > 
> > Jonathan  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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


Re: meter ABI: (was Re: [PATCH v2 1/3] staging:iio:meter: Replaces IIO_DEV_ATTR_CH_OFF by IIO_DEVICE_ATTR)

2018-03-30 Thread Jonathan Cameron
On Sun, 25 Mar 2018 13:36:40 -0700
John Syne  wrote:

> > On Mar 25, 2018, at 9:29 AM, Jonathan Cameron  wrote:
> > 
> > On Sat, 24 Mar 2018 15:45:21 -0700
> > John Syne  wrote:
> >   
> >>> On Mar 24, 2018, at 8:02 AM, Jonathan Cameron  wrote:
> >>> 
> >>> On Mon, 19 Mar 2018 22:57:16 -0700
> >>> John Syne  wrote:
> >>>   
>  Hi Jonathan,
>  
>  Thank you for all your hard work. Your feedback is really helpful. I’m 
>  surprised that no one from Analog Device has offered any suggestions.
>    
> >>> 
> >>> Sadly those active in the mainline linux kernel from ADI are focused in
> >>> other areas currently :(
> >> Good point. I will reach out to Analog Devices and get a name of someone 
> >> who is knowledgeable in this area. Perhaps Lars-Peters has a suggestion.   
> > Yes, Lars or Michael Hennerich (+CC) are my normal contact points.
> > I believe this is outside both of their areas, but they may be able to
> > put you in contact with the right person.  If nothing else it would be
> > good to make someone in ADI aware that people care about linux support for
> > these parts!  
> I sent in a request to ADI for a contact person to help with the review.

Cool.

> >   
>  Anyway, please see my comments inline below
>  
>  Regards,
>  John
>  
>  
>  
>  
>    
> > On Mar 18, 2018, at 5:23 AM, Jonathan Cameron  wrote:
> > 
> > On Sat, 17 Mar 2018 23:11:45 -0700
> > John Syne  wrote:
> >   
> >> Hi Jonathan,  
> > Hi John and All,
> > 
> > I'd love to get some additional input on this from anyone interested.
> > There are a lot of weird and wonderful derived quantities in an energy
> > meter and it seems we need to make some fundamental changes to support
> > them - including potentially a userspace breaking change to the event
> > code description.
> >   
> >> 
> >> Here is the complete list of registers for the ADE7878 which I copied 
> >> from the data sheet. I added a column “IIO Attribute” which I hope 
> >> follows your IIO ABI. Please make any changes you feel are incorrect. 
> >> BTW, there are several registers that cannot be generalized and are 
> >> used purely for chip configuration. I think we should add a new naming 
> >> convention, namely {register}_{}. Also, I see in 
> >> the sys_bus_iio doc
> > 
> > No, registers can always be broken up in to real meaningful values if
> > they are exposed to userspace and userspace has a reason to tweak
> > them.
> > 
> > We never expose raw registers to userspace except through
> > debugfs and the clue is in the name - purely for debug.  
> OK
> > 
> >   
> >>> 
> >>> 
> >>> 
> >>>   
> >> in_accel_x_peak_raw
> >> 
> >> so shouldn’t the phase be represented as follows:
> >> 
> >> in_current_A_scale  
> > I'm still confused.  What does A represent here?  I assumed that was a 
> > wild
> > card for the channel number before but clearly not.
> > 
> > Ah, you are labelling the 3 separate phases as A, B and C. Hmm.
> > I guess they sort of look like axis, and sort of like independent 
> > channels.
> > So could be indexed or done via modifiers depending on how you look at 
> > it.  
>  In metering terminology, the three phases are commonly referred to as 
>  RED, GREEN, BLUE or PhaseA, PhaseB, PhaseC and Neutral. Analog Devices 
>  uses the ABCN nomenclature so anyone using this driver will probably 
>  have referenced the Analog Devices datasheet so this terminology should 
>  be familiar. 
> >>> Which is more commonly used in general?  We are designing what we hope
> >>> will be a general interface and last thing we want is to have everyone
> >>> not using ADI parts confused!  Personally not assigning 'colours' makes
> >>> more sense to me.
> >> I did a little research and here is the naming used by vendor:
> >> 
> >> ST Microelectronics: P1, P2, P3, N
> >> http://www.st.com/content/ccc/resource/technical/document/application_note/5e/f4/22/4d/90/96/4c/c4/CD00153264.pdf/files/CD00153264.pdf/jcr:content/translations/en.CD00153264.pdf
> >> 
> >> Teridian: ABCN
> >> https://www.mouser.com/ds/2/256/71M6513-71M6513H-22603.pdf
> >> 
> >> Maxim Integrated: ABCN
> >> https://datasheets.maximintegrated.com/en/ds/78M6631.pdf
> >> 
> >> Microchip: ABCN
> >> http://ww1.microchip.com/downloads/en/DeviceDoc/51643b.pdf
> >> 
> >> NXP: L1, L2, L3, N
> >> https://www.nxp.com/support/developer-resources/reference-designs/kinetis-km3x-256-mcu-three-phase-metering-reference-design:RD-KM3x-256-3PH-METERING
> >> 
> >> Renesas: ABCN
> >> https://www.renesas.com/en-us/solutions/home/metering/power-meter-three.html
> >> 
> >> So the most consistent would be ABCN  
> > Cool.   Makes sense to go with that.  

Re: [PATCH 12/76] staging: ks7010: Remove trailing _t from 'struct hostif_mib_set_confirm_t'.

2018-03-30 Thread Joe Perches
On Fri, 2018-03-30 at 00:07 -0700, Quytelda Kahja wrote:
> 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_confirm_t' with 'struct
> hostif_mib_set_confirm'.
> 
> Signed-off-by: Quytelda Kahja 
> ---
>  drivers/staging/ks7010/ks_hostif.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/ks7010/ks_hostif.h 
> b/drivers/staging/ks7010/ks_hostif.h
> index 5261810fbc76..7a0e0c610c50 100644
> --- a/drivers/staging/ks7010/ks_hostif.h
> +++ b/drivers/staging/ks7010/ks_hostif.h
> @@ -175,7 +175,7 @@ struct hostif_mib_set_request {
>   struct hostif_mib_value mib_value;
>  } __packed;
>  
> -struct hostif_mib_set_confirm_t {
> +struct hostif_mib_set_confirm {
>   struct hostif_hdr header;
>   __le32 mib_status;
>   __le32 mib_attribute;

It is probably better to remove unused structs

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


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

2018-03-30 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 b97080f8ebd2..fd1bf5d7ecd4 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 72/72] staging: ks7010: Remove extra blank line between functions.

2018-03-30 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 3c8a8d0f800c..b97080f8ebd2 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 65/76] staging: ks7010: Remove trailing _t from 'struct pmk_t'.

2018-03-30 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 63/76] staging: ks7010: Remove trailing _t from 'struct wpa_status_t'.

2018-03-30 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 70/76] staging: ks7010: Remove extra blank line between functions.

2018-03-30 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 3c8a8d0f800c..b97080f8ebd2 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 69/76] staging: ks7010: Remove 'eth_addr' field from 'struct ks_wlan_private'.

2018-03-30 Thread Quytelda Kahja
The ethernet address of the network device is already stored in the
'dev_addr' field of 'struct net_device'.  Since 'struct ks_wlan_private'
keeps a pointer to the driver's 'struct net_device', there is no reason
to duplicate this information in 'struct ks_wlan_private'.

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 |  5 ++---
 3 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 1eff78540683..3c8a8d0f800c 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 72/76] staging: ks7010: Remove dummy address set.

2018-03-30 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 70/72] staging: ks7010: Rename ks_wlan_set_multicast_list()

2018-03-30 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 29dd07cdd69d..e98f6163e724 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -72,7 +72,7 @@ static const struct iw_handler_def ks_wlan_handler_def;
 static int ks_wlan_open(struct net_device *dev);
 static int ks_wlan_close(struct net_device *dev);
 static int ks_wlan_start_xmit(struct sk_buff *skb, 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 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,
int cmd);
@@ -2817,7 +2817,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);
 
@@ -2861,7 +2861,7 @@ static const struct net_device_ops ks_wlan_netdev_ops = {
.ndo_open = ks_wlan_open,
.ndo_stop = ks_wlan_close,
.ndo_start_xmit = ks_wlan_start_xmit,
-   .ndo_set_rx_mode = ks_wlan_set_multicast_list,
+   .ndo_set_rx_mode = ks_wlan_set_rx_mode,
.ndo_set_mac_address = ks_wlan_set_mac_address,
.ndo_do_ioctl = ks_wlan_netdev_ioctl,
.ndo_tx_timeout = ks_wlan_tx_timeout,
-- 
2.16.3

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


[PATCH 71/76] staging: ks7010: Rename ks_wlan_set_multicast_list()

2018-03-30 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 59/76] staging: ks7010: Remove trailing _t from 'struct sleep_status_t'.

2018-03-30 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 62/76] staging: ks7010: Remove trailing _t from 'struct mic_failure_t'.

2018-03-30 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 74/76] staging: ks7010: Remove unnecessary casts in 'struct ks_wlan_handler_def'.

2018-03-30 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 71/72] staging: ks7010: Remove 'eth_addr' field from 'struct ks_wlan_private'.

2018-03-30 Thread Quytelda Kahja
The ethernet address of the network device is already stored in the
'dev_addr' field of 'struct net_device'.  Since 'struct ks_wlan_private'
keeps a pointer to the driver's 'struct net_device', there is no reason
to duplicate this information in 'struct ks_wlan_private'.

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 |  5 ++---
 3 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c 
b/drivers/staging/ks7010/ks_hostif.c
index 1eff78540683..3c8a8d0f800c 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 53/76] staging: ks7010: Remove trailing _t from 'struct wps_ie_t'.

2018-03-30 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 68/76] staging: ks7010: Replace manual array copy with ether_addr_copy().

2018-03-30 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_wlan_net.c | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c 
b/drivers/staging/ks7010/ks_wlan_net.c
index 72a52c6f9fd2..d6bfbc1f8558 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -2884,15 +2884,7 @@ int ks_wlan_net_start(struct net_device *dev)
timer_setup(_phyinfo_timer, ks_wlan_update_phyinfo_timeout, 0);
 
/* dummy address set */
-   memcpy(priv->eth_addr, dummy_addr, ETH_ALEN);
-   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;
+   ether_addr_copy(dev->dev_addr, priv->eth_addr);
 
/* The ks_wlan-specific entries in the device structure. */
dev->netdev_ops = _wlan_netdev_ops;
-- 
2.16.3

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


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

2018-03-30 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 56/76] staging: ks7010: Remove trailing _t from 'struct local_gain_t'.

2018-03-30 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 66/76] staging: ks7010: Remove trailing _t from 'struct wps_status_t'.

2018-03-30 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 60/76] staging: ks7010: Remove trailing _t from 'struct scan_ext_t'.

2018-03-30 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 67/76] staging: ks7010: Remove trailing _t from 'struct michael_mic_t'.

2018-03-30 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 73/76] staging: ks7010: Change 'device_open_status' to a bool.

2018-03-30 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 76/76] staging: ks7010: Replace memcpy() with ether_addr_copy().

2018-03-30 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 fd1bf5d7ecd4..71cb366cb602 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 58/76] staging: ks7010: Remove trailing _t from 'struct power_save_status_t'.

2018-03-30 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 52/76] staging: ks7010: Remove trailing _t from 'struct rsn_ie_t'.

2018-03-30 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 50/76] staging: ks7010: Remove trailing _t from 'struct hostif_mic_failure_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_mic_failure_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 659e2b895bff..f67f4c2b0730 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -518,7 +518,7 @@ struct hostif_mic_failure_request {
__le16 timer;
 } __packed;
 
-struct hostif_mic_failure_confirm_t {
+struct hostif_mic_failure_confirm {
struct hostif_hdr header;
__le16 result_code;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 57/76] staging: ks7010: Remove trailing _t from 'struct local_eeprom_sum_t'.

2018-03-30 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 54/76] staging: ks7010: Remove trailing _t from 'struct local_ap_t'.

2018-03-30 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 51/76] staging: ks7010: Remove trailing _t from 'struct hostt_t'.

2018-03-30 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 55/76] staging: ks7010: Remove trailing _t from 'struct local_aplist_t'.

2018-03-30 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 44/76] staging: ks7010: Remove trailing _t from 'struct hostif_bss_scan_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_bss_scan_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 23ed10674162..2c1bfc9e8610 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -472,7 +472,7 @@ struct hostif_bss_scan_request {
struct ssid ssid;
 } __packed;
 
-struct hostif_bss_scan_confirm_t {
+struct hostif_bss_scan_confirm {
struct hostif_hdr header;
__le16 result_code;
__le16 reserved;
-- 
2.16.3

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


[PATCH 46/76] staging: ks7010: Remove trailing _t from 'struct hostif_phy_information_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_phy_information_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 831c02d6e791..f6b4b3eecf2b 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -486,7 +486,7 @@ struct hostif_phy_information_request {
__le16 time;/* unit 100ms */
 } __packed;
 
-struct hostif_phy_information_confirm_t {
+struct hostif_phy_information_confirm {
struct hostif_hdr header;
u8 rssi;
u8 sq;
-- 
2.16.3

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


[PATCH 42/76] staging: ks7010: Remove trailing _t from 'struct hostif_associate_indication_t'.

2018-03-30 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_associate_indication_t' with 'struct
hostif_associate_indication'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 566637b9ac15..81f12b41830e 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -452,7 +452,7 @@ struct association_response {
__le16 resp_ies_size;
 } __packed;
 
-struct hostif_associate_indication_t {
+struct hostif_associate_indication {
struct hostif_hdr header;
struct association_request assoc_req;
struct association_response assoc_resp;
-- 
2.16.3

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


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

2018-03-30 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 81f12b41830e..23ed10674162 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -460,7 +460,7 @@ struct hostif_associate_indication {
/* reqIEs data *//* respIEs data */
 } __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 45/76] staging: ks7010: Remove trailing _t from 'struct hostif_phy_information_request_t'.

2018-03-30 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 2c1bfc9e8610..831c02d6e791 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -478,7 +478,7 @@ struct hostif_bss_scan_confirm {
__le16 reserved;
 } __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 49/76] staging: ks7010: Remove trailing _t from 'struct hostif_mic_failure_request_t'.

2018-03-30 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 c34bcc7d9a0b..659e2b895bff 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -512,7 +512,7 @@ struct hostif_sleep_confirm {
__le16 result_code;
 } __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 47/76] staging: ks7010: Remove trailing _t from 'struct hostif_sleep_request_t'.

2018-03-30 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 f6b4b3eecf2b..f570c6d84970 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -503,7 +503,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 48/76] staging: ks7010: Remove trailing _t from 'struct hostif_sleep_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_sleep_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index f570c6d84970..c34bcc7d9a0b 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -507,7 +507,7 @@ struct hostif_sleep_request {
struct hostif_hdr header;
 } __packed;
 
-struct hostif_sleep_confirm_t {
+struct hostif_sleep_confirm {
struct hostif_hdr header;
__le16 result_code;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 02046ab78a36..a1fea8eb89cc 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -434,7 +434,7 @@ struct last_associate {
u8 status;
 } __packed;
 
-struct association_request_t {
+struct association_request {
u8 type;
u8 pad;
__le16 capability;
@@ -454,7 +454,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 38/76] staging: ks7010: Remove trailing _t from 'struct hostif_adhoc_set_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_adhoc_set_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 9ba350ec64ba..e599ab1d9f15 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -424,7 +424,7 @@ struct hostif_adhoc_set2_request {
u8 bssid[ETH_ALEN];
 } __packed;
 
-struct hostif_adhoc_set_confirm_t {
+struct hostif_adhoc_set_confirm {
struct hostif_hdr header;
__le16 result_code;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 25a00a8f35d8..9ba350ec64ba 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -409,13 +409,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 41/76] staging: ks7010: Remove trailing _t from 'struct association_response_t'.

2018-03-30 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 a1fea8eb89cc..566637b9ac15 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -443,7 +443,7 @@ struct association_request {
__le16 req_ies_size;
 } __packed;
 
-struct association_response_t {
+struct association_response {
u8 type;
u8 pad;
__le16 capability;
@@ -455,7 +455,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 39/76] staging: ks7010: Remove trailing _t from 'struct last_associate_t'.

2018-03-30 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 last_associate_t' with 'struct last_associate'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index e599ab1d9f15..02046ab78a36 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -429,7 +429,7 @@ struct hostif_adhoc_set_confirm {
__le16 result_code;
 } __packed;
 
-struct last_associate_t {
+struct last_associate {
u8 type;
u8 status;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 e68bf18e6a82..fbc8e58eb544 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -276,7 +276,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 25/76] staging: ks7010: Remove trailing _t from 'struct rate_set16_t'.

2018-03-30 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 4d25801ab38e..e68bf18e6a82 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -270,7 +270,7 @@ struct erp_params {
u8 erp_info;
 } __packed;
 
-struct rate_set16_t {
+struct rate_set16 {
u8 size;
u8 body[16];
u8 rate_pad;
@@ -348,7 +348,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 36/76] staging: ks7010: Remove trailing _t from 'struct hostif_adhoc_set_request_t'.

2018-03-30 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 9deb53edb344..25a00a8f35d8 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -395,13 +395,13 @@ struct hostif_infrastructure_set_confirm {
 } __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 30/76] staging: ks7010: Remove trailing _t from 'struct hostif_stop_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_stop_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 03e15fc591ea..615e2ed979e1 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -330,7 +330,7 @@ struct hostif_stop_request {
struct hostif_hdr header;
 } __packed;
 
-struct hostif_stop_confirm_t {
+struct hostif_stop_confirm {
struct hostif_hdr header;
__le16 result_code;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 615e2ed979e1..ad42c35d0f2d 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -343,7 +343,7 @@ struct hostif_stop_confirm {
 #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;
@@ -360,7 +360,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;
 
@@ -381,7 +381,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;
@@ -403,7 +403,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;
@@ -417,7 +417,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 29/76] staging: ks7010: Remove trailing _t from 'struct hostif_stop_request_t'.

2018-03-30 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 7dba1f46da44..03e15fc591ea 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -326,7 +326,7 @@ struct hostif_connect_indication {
struct link_ap_info link_ap_info;
 } __packed;
 
-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 33/76] staging: ks7010: Remove trailing _t from 'struct hostif_ps_adhoc_set_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_ps_adhoc_set_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 665114736d17..be33a704c7c4 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -364,7 +364,7 @@ struct hostif_ps_adhoc_set_request {
__le16 channel;
 } __packed;
 
-struct hostif_ps_adhoc_set_confirm_t {
+struct hostif_ps_adhoc_set_confirm {
struct hostif_hdr header;
__le16 result_code;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 669453b707ea..f4e7500c07db 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -249,7 +249,7 @@ struct ds_parms {
u8 channel;
 } __packed;
 
-struct cf_parms_t {
+struct cf_parms {
u8 count;
u8 period;
__le16 max_duration;
@@ -302,7 +302,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 35/76] staging: ks7010: Remove trailing _t from 'struct hostif_infrastructure_set_confirm_t'.

2018-03-30 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_confirm_t' with
'struct hostif_infrastructure_set_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 1d79f07f12cc..9deb53edb344 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -389,7 +389,7 @@ struct hostif_infrastructure_set_request {
u8 bssid[ETH_ALEN];
 } __packed;
 
-struct hostif_infrastructure_set_confirm_t {
+struct hostif_infrastructure_set_confirm {
struct hostif_hdr header;
__le16 result_code;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 7a0e0c610c50..cd23ed67cd45 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -181,7 +181,7 @@ struct hostif_mib_set_confirm {
__le32 mib_attribute;
 } __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 23/76] staging: ks7010: Remove trailing _t from 'struct rsn_t'.

2018-03-30 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_t' with 'struct rsn'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 8a203d759aa1..548ad0e8a5f0 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -260,7 +260,7 @@ struct ibss_parms {
__le16 atim_window;
 } __packed;
 
-struct rsn_t {
+struct rsn {
u8 size;
 #define RSN_BODY_SIZE 64
u8 body[RSN_BODY_SIZE];
-- 
2.16.3

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


[PATCH 28/76] staging: ks7010: Remove trailing _t from 'struct hostif_connect_indication_t'.

2018-03-30 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_connect_indication_t' with 'struct
hostif_connect_indication'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 46b19ddd23a0..7dba1f46da44 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -318,7 +318,7 @@ struct link_ap_info {
} __packed rsn;
 } __packed;
 
-struct hostif_connect_indication_t {
+struct hostif_connect_indication {
struct hostif_hdr header;
__le16 connect_code;
 #define RESULT_CONNECT0
-- 
2.16.3

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


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

2018-03-30 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 be33a704c7c4..1d79f07f12cc 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -373,13 +373,13 @@ struct hostif_ps_adhoc_set_confirm {
 #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 32/76] staging: ks7010: Remove trailing _t from 'struct hostif_ps_adhoc_set_request_t'.

2018-03-30 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 ad42c35d0f2d..665114736d17 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -352,13 +352,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 19/76] staging: ks7010: Remove trailing _t from 'struct fh_parms_t'.

2018-03-30 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 aa1f5fefa818..697cd52292f9 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -238,7 +238,7 @@ struct rate_set8 {
u8 rate_pad;
 } __packed;
 
-struct fh_parms_t {
+struct fh_parms {
__le16 dwell_time;
u8 hop_set;
u8 hop_pattern;
@@ -300,7 +300,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 12/76] staging: ks7010: Remove trailing _t from 'struct hostif_mib_set_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_mib_set_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index 5261810fbc76..7a0e0c610c50 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -175,7 +175,7 @@ struct hostif_mib_set_request {
struct hostif_mib_value mib_value;
 } __packed;
 
-struct hostif_mib_set_confirm_t {
+struct hostif_mib_set_confirm {
struct hostif_hdr header;
__le32 mib_status;
__le32 mib_attribute;
-- 
2.16.3

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


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

2018-03-30 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 fbc8e58eb544..46b19ddd23a0 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -291,7 +291,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 */
@@ -323,7 +323,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 17/76] staging: ks7010: Remove trailing _t from 'struct ssid_t'.

2018-03-30 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 fe85e22c4a5e..e87153786d61 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -225,7 +225,7 @@ struct hostif_start_confirm {
__le16 result_code;
 } __packed;
 
-struct ssid_t {
+struct ssid {
u8 size;
u8 body[IEEE80211_MAX_SSID_LEN];
u8 ssid_pad;
@@ -382,7 +382,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;
@@ -404,7 +404,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;
 
@@ -419,7 +419,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;
@@ -469,7 +469,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 08/76] staging: ks7010: Remove trailing _t from 'struct hostif_mib_get_request_t'.

2018-03-30 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 7869c80572bf..6e39d80c6ee9 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -142,7 +142,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 16/76] staging: ks7010: Remove trailing _t from 'struct hostif_start_confirm_t'.

2018-03-30 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_confirm_t' with 'struct
hostif_start_confirm'.

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

diff --git a/drivers/staging/ks7010/ks_hostif.h 
b/drivers/staging/ks7010/ks_hostif.h
index b8b37afecd8f..fe85e22c4a5e 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -220,7 +220,7 @@ struct hostif_start_request {
 #define MODE_ADHOC  3
 } __packed;
 
-struct hostif_start_confirm_t {
+struct hostif_start_confirm {
struct hostif_hdr header;
__le16 result_code;
 } __packed;
-- 
2.16.3

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


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

2018-03-30 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 697cd52292f9..669453b707ea 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -245,7 +245,7 @@ struct fh_parms {
u8 hop_index;
 } __packed;
 
-struct ds_parms_t {
+struct ds_parms {
u8 channel;
 } __packed;
 
@@ -301,7 +301,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 02/76] staging: ks7010: Remove trailing _t from 'struct wpa_suite_t'.

2018-03-30 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 01/76] staging: ks7010: Use the ARRAY_SIZE() macro to calculate array sizes.

2018-03-30 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 11/76] staging: ks7010: Remove trailing _t from 'struct hostif_mib_set_request_t'.

2018-03-30 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 de4e0ed6c576..5261810fbc76 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -169,7 +169,7 @@ struct hostif_mib_get_confirm {
struct hostif_mib_value mib_value;
 } __packed;
 
-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


  1   2   >