]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: mgmt: Move command handlers into a table
authorJohan Hedberg <johan.hedberg@intel.com>
Tue, 28 Feb 2012 15:18:30 +0000 (17:18 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 1 Mar 2012 21:55:58 +0000 (23:55 +0200)
commit4a1ecbbd5539ff44847760ae62c9c79c57c18940
tree208b69caf263957571c5601c625157f46fea8f81
parenta6286a7439fae02ed6b37a116d6c688d3b824e77
Bluetooth: mgmt: Move command handlers into a table

By moving the command handlers into a table (the index being equal to
the opcode) the lookup is made a bit more efficient. Having a struct to
describe each handler also paves the way to add more meta-data for each
handler, e.g. the minimum message size for the command and allow
handling of common tasks like this in a centralized place.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c