From: Fabien Chevalier <fchevalier@silicom.fr>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] STLC2500 updated patch
Date: Mon, 08 Oct 2007 14:38:46 +0200 [thread overview]
Message-ID: <470A24D6.70901@silicom.fr> (raw)
In-Reply-To: <1191842227.7931.3.camel@aeonflux.holtmann.net>
[-- Attachment #1: Type: text/plain, Size: 206 bytes --]
And finally the last of the list:
* Makes the firmware & parameters download optional : even though those
are supposed to be mandatory, practive shows that the chip can run
without them.
Cheers,
Fabien
[-- Attachment #2: hciattach-stl2500-cleanup-and-fix-4.patch --]
[-- Type: text/x-patch, Size: 1474 bytes --]
--- tools/hciattach_st.c 2007-10-08 13:47:07.000000000 +0200
+++ ../tools/hciattach_st.c 2007-10-08 14:35:41.000000000 +0200
@@ -122,7 +122,7 @@
unsigned char cmd[256];
unsigned char buf[256];
uint8_t seqnum = 0;
- int fd, size, len;
+ int fd, size, len, found_fw_file;
memset(filename, 0, sizeof(filename));
@@ -138,6 +138,7 @@
return -errno;
}
+ found_fw_file = 0;
while (1) {
d = readdir(dir);
if (!d)
@@ -152,10 +153,14 @@
snprintf(filename, sizeof(filename), "%s/%s",
pathname, d->d_name);
+ found_fw_file = 1;
}
closedir(dir);
+ if (!found_fw_file)
+ return -ENOENT;
+
printf("Loading file %s\n", filename);
fd = open(filename, O_RDONLY);
@@ -194,6 +199,7 @@
unsigned char buf[254];
uint16_t version;
int len;
+ int err;
/* Hci_Cmd_Ericsson_Read_Revision_Information */
len = do_command(dd, 0xff, 0x000f, NULL, 0, buf, sizeof(buf));
@@ -209,11 +215,21 @@
version = buf[2] << 8 | buf[1];
- if (load_file(dd, version, ".ptc") < 0)
- return -1;
+ err = load_file(dd, version, ".ptc");
+ if (err < 0) {
+ if (err == -ENOENT)
+ fprintf(stderr, "No ROM patch file loaded.\n");
+ else
+ return -1;
+ }
- if (load_file(dd, buf[2] << 8 | buf[1], ".ssf") < 0)
- return -1;
+ err = load_file(dd, buf[2] << 8 | buf[1], ".ssf");
+ if (err < 0) {
+ if (err == -ENOENT)
+ fprintf(stderr, "No static settings file loaded.\n");
+ else
+ return -1;
+ }
cmd[0] = 0xfe;
cmd[1] = 0x06;
[-- Attachment #3: fchevalier.vcf --]
[-- Type: text/x-vcard, Size: 242 bytes --]
begin:vcard
fn:Fabien CHEVALIER
n:CHEVALIER;Fabien
org:SILICOM
adr:;;4 rue de Jouanet; RENNES ATALANTE;;35700;FRANCE
email;internet:fchevalier@silicom.fr
title:Software & Studies Engineer
tel;work:+33 (0) 2 99 84 17 17
version:2.1
end:vcard
next prev parent reply other threads:[~2007-10-08 12:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 11:17 [PATCH] STLC2500 updated patch Fabien Chevalier
2007-10-08 11:17 ` [Bluez-devel] " Marcel Holtmann
2007-10-08 11:28 ` Fabien Chevalier
2007-10-08 11:36 ` Fabien Chevalier
2007-10-08 11:49 ` Fabien Chevalier
2007-10-08 12:38 ` Fabien Chevalier [this message]
2007-10-09 16:52 ` [Bluez-devel] " Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=470A24D6.70901@silicom.fr \
--to=fchevalier@silicom.fr \
--cc=bluez-devel@lists.sourceforge.net \
--cc=marcel@holtmann.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox