public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Fabien Chevalier <fchevalier@silicom.fr>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [PATCH] STLC2500 updated patch
Date: Mon, 08 Oct 2007 13:49:34 +0200	[thread overview]
Message-ID: <470A194E.4000106@silicom.fr> (raw)
In-Reply-To: <1191842227.7931.3.camel@aeonflux.holtmann.net>

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]


> please break this down into four separate patches. I hate big patches
> that try to fix everything in one go.
> 
Third on the list: Retrieve version string before anything else, remove 
bogus resets, add OCF & OGF comments.

Cheers,

Fabien

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: hciattach-stl2500-cleanup-and-fix-3.patch --]
[-- Type: text/x-patch; name="hciattach-stl2500-cleanup-and-fix-3.patch", Size: 1651 bytes --]

Index: tools/hciattach_st.c
===================================================================
--- tools/hciattach_st.c	(.../tags/20070928_1730)	(révision 107)
+++ tools/hciattach_st.c	(.../branches/20070928_1730)	(révision 107)
@@ -192,46 +197,42 @@
 {
 	unsigned char cmd[16];
 	unsigned char buf[254];
 	uint16_t version;
 	int len;
 
-	len = do_command(dd, 0x04, 0x0001, NULL, 0, buf, sizeof(buf));
+	/* Hci_Cmd_Ericsson_Read_Revision_Information */	
+	len = do_command(dd, 0xff, 0x000f, NULL, 0, buf, sizeof(buf));
 	if (len < 0)
 		return -1;
 
-	version = buf[2] << 8 | buf[1];
-
-	if (load_file(dd, version, ".ptc") < 0)
-		return -1;
+	printf("%s\n", buf);
 
-	len = do_command(dd, 0x03, 0x0003, NULL, 0, buf, sizeof(buf));
+	/* HCI_Read_Local_Version_Information */	
+	len = do_command(dd, 0x04, 0x0001, NULL, 0, buf, sizeof(buf));
 	if (len < 0)
 		return -1;
 
-	if (load_file(dd, buf[2] << 8 | buf[1], ".ssf") < 0)
-		return -1;
+	version = buf[2] << 8 | buf[1];
 
-	len = do_command(dd, 0x03, 0x0003, NULL, 0, buf, sizeof(buf));
-	if (len < 0)
+	if (load_file(dd, version, ".ptc") < 0)
 		return -1;
 
-	len = do_command(dd, 0xff, 0x000f, NULL, 0, buf, sizeof(buf));
-	if (len < 0)
+	if (load_file(dd, buf[2] << 8 | buf[1], ".ssf") < 0)
 		return -1;
 
-	printf("%s\n", buf);
-
 	cmd[0] = 0xfe;
 	cmd[1] = 0x06;
 	bacpy((bdaddr_t *) (cmd + 2), bdaddr);
 
+	/* Hci_Cmd_ST_Store_In_NVDS */	
 	len = do_command(dd, 0xff, 0x0022, cmd, 8, buf, sizeof(buf));
 	if (len < 0)
 		return -1;
 
+	/* HCI_Reset : applies parameters*/
 	len = do_command(dd, 0x03, 0x0003, NULL, 0, buf, sizeof(buf));
 	if (len < 0)
 		return -1;
 
 	return 0;
 }


[-- 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


  parent reply	other threads:[~2007-10-08 11:49 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 [this message]
2007-10-08 12:38   ` [Bluez-devel] " Fabien Chevalier
2007-10-09 16:52     ` 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=470A194E.4000106@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