Francois Romieu [mailto:rom...@fr.zoreil.com]
[...]
> > +static void rtl_request_firmware(struct r8152 *tp)
> > +{
> > + char *fw_name = NULL;
> > +
> > + if (tp->rtl_fw.fw)
> > + goto out_request;
> > +
> > + switch (tp->version) {
> > + case RTL_VER_01:
> > + fw_name
Hayes Wang :
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 937d132..63542cc 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
[...]
> +static void rtl_request_firmware(struct r8152 *tp)
> +{
> + char *fw_name = NULL;
> +
> + if (tp->rtl_fw.fw
2014-08-20 14:35 GMT+02:00 Hayes Wang:
> Is this necessary? Besides the check of the "start",
> there are checks of the "size" and rtl_fw_data_ok().
> I think they cover the situations which you indicate.
it's not necessary and it's better checked later as you did!
--
Daniele Forsi
--
To unsubs
Daniele Forsi [mailto:dfo...@gmail.com]
> Sent: Wednesday, August 20, 2014 8:01 PM
> To: Hayes Wang
> Cc: net...@vger.kernel.org; nic_swsd;
> linux-ker...@vger.kernel.org; USB list
> Subject: Re: [PATCH net-next 4/4] r8152: support firmware files
[...]
> > + start =
2014-08-20 10:58 GMT+02:00 Hayes Wang:
> The firmware file is composed of the fw header and the commands. Each
> command has the following type.
>
> cmd(2 bytes) + length(2 bytes) + data(variable bytes)
> +static bool rtl_fw_format_ok(struct rtl_fw *rtl_fw)
> + start = le32_to_cpu(
The firmware file is composed of the fw header and the commands. Each
command has the following type.
cmd(2 bytes) + length(2 bytes) + data(variable bytes)
Before applying the firmware, the driver would check the fw header and
each command.
Signed-off-by: Hayes Wang
---
drivers/net/usb