Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-21 Thread Pali Rohár
On Wednesday 21 January 2015 12:01:31 Pavel Machek wrote: Strange, where do you see DOS style line breaks? Checkpatch here does not warn about that, and they really should not be there. If that would be the only pieces, then I would have fixed it already. That is not the big deal.

Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-21 Thread Pavel Machek
Hi! Speaking about formatting, could you properly format your emails, that is inserting newline after ~78 columns, to make them easier to reply to? or you get an email client that can handle that part. My email client is configured ok. Your is not. You are speaking on public mailing

Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-20 Thread Johan Hedberg
Hi Pavel, On Tue, Dec 23, 2014, Pavel Machek wrote: + while (1) { + int cmd, len; + + fw_pos += cmd_len; + + if (fw_pos = fw_entry-size) + break; + + if (fw_pos + 2 fw_entry-size) { +

Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-20 Thread Marcel Holtmann
Hi Pavel, Add HCI driver for H4 with Nokia extensions. This device is used on Nokia N900 cell phone. Older version of this driver lived in staging, before being reverted in a4102f90e87cfaa3fdbed6fdf469b23f0eeb4bfd . Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel

Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-20 Thread Pavel Machek
Hi! Add HCI driver for H4 with Nokia extensions. This device is used on Nokia N900 cell phone. Older version of this driver lived in staging, before being reverted in a4102f90e87cfaa3fdbed6fdf469b23f0eeb4bfd . Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel

Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-20 Thread Pavel Machek
On Tue 2015-01-20 10:28:50, Johan Hedberg wrote: Hi Pavel, On Tue, Dec 23, 2014, Pavel Machek wrote: + while (1) { + int cmd, len; + + fw_pos += cmd_len; + + if (fw_pos = fw_entry-size) + break; + + if (fw_pos + 2

Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-19 Thread Marcel Holtmann
Hi Pavel, Add HCI driver for H4 with Nokia extensions. This device is used on Nokia N900 cell phone. Older version of this driver lived in staging, before being reverted in a4102f90e87cfaa3fdbed6fdf469b23f0eeb4bfd . Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel

Re: [PATCH] bluetooth: Add hci_h4p driver

2015-01-18 Thread Pavel Machek
Hi! Add HCI driver for H4 with Nokia extensions. This device is used on Nokia N900 cell phone. Older version of this driver lived in staging, before being reverted in a4102f90e87cfaa3fdbed6fdf469b23f0eeb4bfd . Any news here? I'd like the driver to hit 3.20...

Re: [PATCH] bluetooth: Add hci_h4p driver

2014-12-23 Thread Pavel Machek
Hi! + /* We should always send word aligned data to h4+ devices */ + if (skb-len % 2) { + err = skb_pad(skb, 1); + if (!err) + *skb_put(skb, 1) = 0x00; + } + if (err) + return err; This is crazy code. if (skb-len

Re: [PATCH] bluetooth: Add hci_h4p driver

2014-12-23 Thread Pavel Machek
Hi! Add hci_h4p bluetooth driver. This device is used for example on Nokia N900 cell phone. the driver is called nokia_h4p. And you could be a little bit more verbose here explaining where the driver came from. Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel

[PATCH] bluetooth: Add hci_h4p driver

2014-12-23 Thread Pavel Machek
Add HCI driver for H4 with Nokia extensions. This device is used on Nokia N900 cell phone. Older version of this driver lived in staging, before being reverted in a4102f90e87cfaa3fdbed6fdf469b23f0eeb4bfd . Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel s...@debian.org

Re: bluetooth: Add hci_h4p driver

2014-12-20 Thread Pavel Machek
Hi! I have trouble understanding... h4p_hci_open() seems to be called as soon as I insmod the driver. Who does that? Is it some kind of udev magic? As soon as you do hci_register_dev, it will bring up the device and run the basic initialization. That is needed to get the address,

[PATCH] bluetooth: Add hci_h4p driver

2014-12-20 Thread Pavel Machek
Add hci_h4p bluetooth driver. This device is used for example on Nokia N900 cell phone. Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel s...@debian.org Thanks-to: Joe Perches j...@perches.com --- Please apply,

Re: [PATCH] bluetooth: Add hci_h4p driver

2014-12-20 Thread Paul Bolle
Pavel, On Sat, 2014-12-20 at 21:23 +0100, Pavel Machek wrote: --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -243,4 +243,13 @@ config BT_WILINK Say Y here to compile support for Texas Instrument's WiLink7 driver into the kernel or say M to compile it as

Re: [PATCH] bluetooth: Add hci_h4p driver

2014-12-20 Thread Marcel Holtmann
Hi Pavel, Add hci_h4p bluetooth driver. This device is used for example on Nokia N900 cell phone. the driver is called nokia_h4p. And you could be a little bit more verbose here explaining where the driver came from. Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel

Re: bluetooth: Add hci_h4p driver

2014-12-20 Thread Marcel Holtmann
Hi Pavel, I have trouble understanding... h4p_hci_open() seems to be called as soon as I insmod the driver. Who does that? Is it some kind of udev magic? As soon as you do hci_register_dev, it will bring up the device and run the basic initialization. That is needed to get the address,

Re: bluetooth: Add hci_h4p driver

2014-12-19 Thread Pavel Machek
Hi! And you want to set the QUIRK_INVALID_BADDR. At least you want to do that in the final submission. Ok, I found out that I can do it and result works, provided that I do hciconfig hci0 up/down first. I have trouble understanding... h4p_hci_open() seems to be called as soon as I insmod

Re: bluetooth: Add hci_h4p driver

2014-12-19 Thread Marcel Holtmann
Hi Pavel, And you want to set the QUIRK_INVALID_BADDR. At least you want to do that in the final submission. Ok, I found out that I can do it and result works, provided that I do hciconfig hci0 up/down first. that should not be the case. Actually hciconfig uses old ioctl. A full

Re: bluetooth: Add hci_h4p driver

2014-12-18 Thread Pavel Machek
Hi! + h4p_simple_send_frame(info, skb); + + if (!wait_for_completion_interruptible_timeout(info-init_completion, + msecs_to_jiffies(1000))) { + printk(h4p: negotiation did not return\n); Memory leak in the error case

Re: bluetooth: Add hci_h4p driver

2014-12-18 Thread Pavel Machek
Hi! On Thu 2014-12-18 20:31:53, Pavel Machek wrote: Hi! + h4p_simple_send_frame(info, skb); + + if (!wait_for_completion_interruptible_timeout(info-init_completion, +msecs_to_jiffies(1000))) { + printk(h4p: negotiation

Re: bluetooth: Add hci_h4p driver

2014-12-15 Thread Oliver Neukum
Hi, a few remarks about possible issues. Regards Oliver +static int h4p_send_negotiation(struct h4p_info *info) +{ + struct h4p_neg_cmd *neg_cmd; + struct h4p_neg_hdr *neg_hdr; + struct sk_buff *skb; + int err, len; + u16 sysclk = 38400; + +

Re: bluetooth: Add hci_h4p driver

2014-12-15 Thread Marcel Holtmann
Hi Pavel, diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index 4547dc2..0fc7d3a 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -243,4 +243,14 @@ config BT_WILINK Say Y here to compile support for Texas Instrument's WiLink7 driver

Re: bluetooth: Add hci_h4p driver

2014-12-14 Thread Pavel Machek
On Sun 2014-12-14 01:07:42, Marcel Holtmann wrote: Hi Pavel, My notes say that Marcel wanted different filenames, but I'd need advice exactly what filenames. I guess platform data supprort should be removed altogether, rather than renamed. Yes, the platform support should go away.

Re: bluetooth: Add hci_h4p driver

2014-12-14 Thread Pavel Machek
On Sun 2014-12-14 00:30:13, Marcel Holtmann wrote: Hi Pavel, Add hci_h4p bluetooth driver to staging tree. This device is used for example on Nokia N900 cell phone. Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel s...@debian.org Thanks-to: Joe Perches

Re: bluetooth: Add hci_h4p driver

2014-12-14 Thread Pavel Machek
On Sun 2014-12-14 00:30:13, Marcel Holtmann wrote: Hi Pavel, Add hci_h4p bluetooth driver to staging tree. This device is used for example on Nokia N900 cell phone. Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel s...@debian.org Thanks-to: Joe Perches

Re: bluetooth: Add hci_h4p driver

2014-12-14 Thread Pavel Machek
Hi! Hacks surrounding bluetooth address were removed; this results in working driver with address that is probably not unique. Just set HCI_QUIRK_INVALID_BDADDR and let someone deal with that in userspace. You can use the btmgmt public-addr command for testing. Ok, it took me a while

Re: bluetooth: Add hci_h4p driver

2014-12-14 Thread Marcel Holtmann
Hi Pavel, Hacks surrounding bluetooth address were removed; this results in working driver with address that is probably not unique. Just set HCI_QUIRK_INVALID_BDADDR and let someone deal with that in userspace. You can use the btmgmt public-addr command for testing. Ok, it took me a

Re: bluetooth: Add hci_h4p driver

2014-12-14 Thread Pavel Machek
Hi! Firmware load was converted to hci_cmd_sync(). Unfortunately, the firmware is needed after every open/close, so the setup mechanism does not quite fit. (But code is now way cleaner). What is the reason for that? Does it mean that the device will always loose all its settings when

Re: bluetooth: Add hci_h4p driver

2014-12-14 Thread Pavel Machek
Hi! Hacks surrounding bluetooth address were removed; this results in working driver with address that is probably not unique. Just set HCI_QUIRK_INVALID_BDADDR and let someone deal with that in userspace. You can use the btmgmt public-addr command for testing. Ok, it took me

bluetooth: Add hci_h4p driver

2014-12-13 Thread Pavel Machek
Add hci_h4p bluetooth driver to staging tree. This device is used for example on Nokia N900 cell phone. Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel s...@debian.org Thanks-to: Joe Perches j...@perches.com --- I'd prefer to resurect the driver in staging/ in order not

Re: bluetooth: Add hci_h4p driver

2014-12-13 Thread Marcel Holtmann
Hi Pavel, Add hci_h4p bluetooth driver to staging tree. This device is used for example on Nokia N900 cell phone. Signed-off-by: Pavel Machek pa...@ucw.cz Thanks-to: Sebastian Reichel s...@debian.org Thanks-to: Joe Perches j...@perches.com --- I'd prefer to resurect the driver in

Re: bluetooth: Add hci_h4p driver

2014-12-13 Thread Pavel Machek
Hi! My notes say that Marcel wanted different filenames, but I'd need advice exactly what filenames. I guess platform data supprort should be removed altogether, rather than renamed. Yes, the platform support should go away. This should be purely based on DT. Can you also start using

Re: bluetooth: Add hci_h4p driver

2014-12-13 Thread Marcel Holtmann
Hi Pavel, My notes say that Marcel wanted different filenames, but I'd need advice exactly what filenames. I guess platform data supprort should be removed altogether, rather than renamed. Yes, the platform support should go away. This should be purely based on DT. Can you also start