2010-06-03 11:20:23

by Vikram

[permalink] [raw]
Subject: [PATCH] ath3k: add support for new firmware

updated new firmware has few critical bug fixes and shared antenna
support.

Signed-off-by: Vikram Kandukuri <[email protected]>
---
drivers/bluetooth/ath3k.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 128cae4..7bda549 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -122,9 +122,12 @@ static int ath3k_probe(struct usb_interface *intf,

data->udev = udev;

- if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
- kfree(data);
- return -EIO;
+ if (request_firmware(&firmware, "ath3k-2.fw", &udev->dev) < 0) {
+ BT_DBG("requesting old firmware");
+ if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
+ kfree(data);
+ return -EIO;
+ }
}

size = max_t(uint, firmware->size, 4096);
--
1.7.0


2010-06-03 17:34:12

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] ath3k: add support for new firmware

Hi Vikram,

> updated new firmware has few critical bug fixes and shared antenna
> support.
>
> Signed-off-by: Vikram Kandukuri <[email protected]>
> ---
> drivers/bluetooth/ath3k.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index 128cae4..7bda549 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -122,9 +122,12 @@ static int ath3k_probe(struct usb_interface *intf,
>
> data->udev = udev;
>
> - if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
> - kfree(data);
> - return -EIO;
> + if (request_firmware(&firmware, "ath3k-2.fw", &udev->dev) < 0) {
> + BT_DBG("requesting old firmware");
> + if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
> + kfree(data);
> + return -EIO;
> + }
> }
>
> size = max_t(uint, firmware->size, 4096);

can we just have a list of supported firmware in a table instead of just
hardcoding this. I think something similar to what iwlwifi for WiFi has
beend doing would be nice.

Regards

Marcel



2010-10-01 20:56:05

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] ath3k: add support for new firmware

On Thu, Jun 03, 2010 at 10:34:12AM -0700, Marcel Holtmann wrote:
> Hi Vikram,
>
> > updated new firmware has few critical bug fixes and shared antenna
> > support.
> >
> > Signed-off-by: Vikram Kandukuri <[email protected]>
> > ---
> > drivers/bluetooth/ath3k.c | 9 ++++++---
> > 1 files changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> > index 128cae4..7bda549 100644
> > --- a/drivers/bluetooth/ath3k.c
> > +++ b/drivers/bluetooth/ath3k.c
> > @@ -122,9 +122,12 @@ static int ath3k_probe(struct usb_interface *intf,
> >
> > data->udev = udev;
> >
> > - if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
> > - kfree(data);
> > - return -EIO;
> > + if (request_firmware(&firmware, "ath3k-2.fw", &udev->dev) < 0) {
> > + BT_DBG("requesting old firmware");
> > + if (request_firmware(&firmware, "ath3k-1.fw", &udev->dev) < 0) {
> > + kfree(data);
> > + return -EIO;
> > + }
> > }
> >
> > size = max_t(uint, firmware->size, 4096);
>
> can we just have a list of supported firmware in a table instead of just
> hardcoding this. I think something similar to what iwlwifi for WiFi has
> beend doing would be nice.

Vikram, you never followed up so this patch is not yet upstream....
Mind you, ath3k-2.fw is on the linux-firmware.git tree though.

Luis