public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* HCI_MAX_DEV is a bit too small.
@ 2010-03-14 23:20 Peter Dons Tychsen
  2010-03-14 23:34 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Dons Tychsen @ 2010-03-14 23:20 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

HCI_MAX_DEV is set a bit low (16), causing hci_for_each_dev() to not
return all of the devices if you have more. This is not a disaster for
the library itself, as i can just copy hci_for_each_dev() and make a
version supporting more devices.

However, hcitool uses the library version of hci_for_each_dev(), so that
makes hcitool useless for a system with more devices. You could of
course fix this is hcitool, but changing HCI_MAX_DEV seem like the right
solution.

Can this be changed, or does it *need* to be 16?

If changed, it would be nice if it was raised to something like 256, to
keep the number in the power of 2. To be honest, i don't think this
should have been a constant at all, as the number of devices is
virtually endless. hci_for_each_dev() should probably have taken a MAX
parameter, but should not itself have set a limit. But to keep the API
intact, changing HCI_MAX_DEV could be a solution. 

Thanks,

/Pedro



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-21 22:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-14 23:20 HCI_MAX_DEV is a bit too small Peter Dons Tychsen
2010-03-14 23:34 ` Marcel Holtmann
2010-03-15  2:11   ` Peter Dons Tychsen
2010-03-15  8:34     ` Iain Hibbert
2010-03-21 22:26     ` Peter Dons Tychsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox