Bluetooth: Only schedule LE tx links if LE-capable
RFC v2 1/5 Bluetooth: Only schedule LE tx links if LE-capable
T25seSBwZXJmb3JtIHR4IHNjaGVkdWxpbmcgZm9yIExFIGxpbmtzIGlmIHRoZSBob3N0IGNvbnRy b2xsZXINCmlzIExFLWNhcGFibGUuDQoNClNpZ25lZC1vZmYtYnk6IFBldGVyIEh1cmxleSA8cGV0 ZXJAaHVybGV5c29mdHdhcmUuY29tPg0KLS0tDQogbmV0L2JsdWV0b290aC9oY2lfY29yZS5jIHwg ICAgNCArKystDQogMSBmaWxlcyBjaGFuZ2VkLCAzIGluc2VydGlvbnMoKyksIDEgZGVsZXRpb25z KC0pDQoNCmRpZmYgLS1naXQgYS9uZXQvYmx1ZXRvb3RoL2hjaV9jb3JlLmMgYi9uZXQvYmx1ZXRv b3RoL2hjaV9jb3JlLmMNCmluZGV4IDgxNTI2OWIuLjQ3YTMxZmEgMTAwNjQ0DQotLS0gYS9uZXQv Ymx1ZXRvb3RoL2hjaV9jb3JlLmMNCisrKyBiL25ldC9ibHVldG9vdGgvaGNpX2NvcmUuYw0KQEAg LTE5OTUsNyArMTk5NSw5IEBAIHN0YXRpYyB2b2lkIGhjaV90eF90YXNrKHVuc2lnbmVkIGxvbmcg YXJnKQ0KIA0KIAloY2lfc2NoZWRfZXNjbyhoZGV2KTsNCiANCi0JaGNpX3NjaGVkX2xlKGhkZXYp Ow0KKwkvKiBPbmx5IHNjaGVkdWxlIGxlIGxpbmtzIGlmIGRldmljZSBpcyBsZS1jYXBhYmxlICov DQorCWlmIChsbXBfbGVfY2FwYWJsZShoZGV2KSkNCisJCWhjaV9zY2hlZF9sZShoZGV2KTsNCiAN CiAJLyogU2VuZCBuZXh0IHF1ZXVlZCByYXcgKHVua25vd24gdHlwZSkgcGFja2V0ICovDQogCXdo aWxlICgoc2tiID0gc2tiX2RlcXVldWUoJmhkZXYtPnJhd19xKSkpDQotLSANCjEuNy40LjENCg0K
Luiz Augusto von Dentz
maintainerHi Peter,
Quoted 24 lines · Peter Hurley
Only perform tx scheduling for LE links if the host controller is LE-capable.
Signed-off-by Peter Hurley <[email protected]>---
net/bluetooth/hci_core.c | 4 +++-1 files changed, 3 insertions(+), 1 deletions(-)net/bluetooth/hci_core.c +3
-2@@ -1995,7 +1995,9 @@ static void hci_tx_task(unsigned long arg) hci_sched_esco(hdev); - hci_sched_le(hdev); + /* Only schedule le links if device is le-capable */ + if (lmp_le_capable(hdev)) + hci_sched_le(hdev); /* Send next queued raw (unknown type) packet */ while ((skb = skb_dequeue(&hdev->raw_q))) --
Quoted 3 lines
1.7.4.1
Any reasons why you choose to not add the check inside hci_sched_le?
Signature · 1 line
Luiz Augusto von Dentz
A message that is not in the archive (sent off-list or not yet received): 1313666245.17513.9.camel@THOR
Hi Peter,
Quoted 5 lines · Peter Hurley
Quoted 1 line · Luiz Augusto von Dentz
Any reasons why you choose to not add the check inside
hci_sched_le?Only to make it really obvious that LE transmission is not required on the vast majority of BT controllers :)
... yet. Are you aware LE is not optional on Bluetooth 4.0? Therefore any modern BT device claiming to support 4.0 will have LE support on its controller (host support is another thing).
But I suppose we will still see plenty of 2.1 devices for a long time...
My two cents,
Signature · 3 lines
Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil
Hi Anderson,
Quoted 4 lines · Anderson Lizardo
Hi Peter,
Quoted 1 line · Peter Hurley
On Thu, 2011-08-18 at 03:43 -0400, Luiz Augusto von Dentz wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Any reasons why you choose to not add the check inside
hci_sched_le?Only to make it really obvious that LE transmission is not required on the vast majority of BT controllers :)
... yet. Are you aware LE is not optional on Bluetooth 4.0? Therefore any modern BT device claiming to support 4.0 will have LE support on its controller (host support is another thing).
I was aware of that, but that's an important point you make.
Quoted 1 line
But I suppose we will still see plenty of 2.1 devices for a long time...
As I noted to Andre earlier, this particular test will be unnecessary when Luiz's proposal (using the LE connection count to bypass LE scheduling when 0). I feel Luiz's approach is the more effective approach anyway.
Regards,
Peter Hurley
Hi Peter,
Quoted 13 lines · Peter Hurley
Only perform tx scheduling for LE links if the host controller is LE-capable.
Signed-off-by Peter Hurley <[email protected]>---
net/bluetooth/hci_core.c| 4 +++-1 files changed, 3 insertions(+), 1 deletions(-)net/bluetooth/hci_core.c +0
-0
net/bluetooth/hci_core.c static void hci_tx_task(unsigned long arg) · line 2000
Quoted 7 lines
net/bluetooth/hci_core.c +3
-1@@ -1995,7 +1995,9 @@ static void hci_tx_task(unsigned long arg)hci_sched_esco (hdev); -hci_sched_le (hdev); +/* Only schedule le links if device is le-capable */ +if (lmp_le_capable (hdev)) +hci_sched_le (hdev);
You may use lmp_host_le_capable macro here since it tells you if the _host_ supports LE (lmp_le_capable macro tells you if the _controller_ supports LE).
BR,
Andre
SGkgQW5kcmUsDQoNCk9uIFRodSwgMjAxMS0wOC0xOCBhdCAxODoxMiAtMDQwMCwgQW5kcmUgR3Vl ZGVzIHdyb3RlOg0KPiBZb3UgbWF5IHVzZSBsbXBfaG9zdF9sZV9jYXBhYmxlIG1hY3JvIGhlcmUg c2luY2UgaXQgdGVsbHMgeW91IGlmDQo+IHRoZSBfaG9zdF8gc3VwcG9ydHMgTEUgKGxtcF9sZV9j YXBhYmxlIG1hY3JvIHRlbGxzIHlvdSBpZiB0aGUNCj4gX2NvbnRyb2xsZXJfIHN1cHBvcnRzIExF KS4NCg0KVGhhbmtzIGZvciBwb2ludGluZyB0aGF0IG91dC4gVGhpcyBzZXJpZXMgaXMgYWN0dWFs bHkgc2V2ZXJhbCBtb250aHMgb2xkDQphbmQgc28sIHByZWRhdGVzIHRoZSBpbmNsdXNpb24gb2Yg bG1wX2hvc3RfbGVfY2FwYWJsZSwgYnV0IEknbGwga2VlcA0KdGhhdCBpbiBtaW5kIGZvciBmdXR1 cmUgY29kZS4NCg0KVGhpcyBwYXJ0aWN1bGFyIHRlc3Qgd2lsbCBiZSBzdXBlcmZsdW91cyB3aGVu IEx1aXoncyBwcm9wb3NhbCBoZXJlDQpodHRw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