linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: johan.hedberg@gmail.com
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/5] Bluetooth: mgmt: Move command handlers into a table
Date: Thu, 01 Mar 2012 12:47:21 -0800	[thread overview]
Message-ID: <1330634841.3392.107.camel@aeonflux> (raw)
In-Reply-To: <1330634012-4502-3-git-send-email-johan.hedberg@gmail.com>

Hi Johan,

> 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>
> ---
>  net/bluetooth/mgmt.c |  219 ++++++++++++++++++--------------------------------
>  1 files changed, 79 insertions(+), 140 deletions(-)

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel



  reply	other threads:[~2012-03-01 20:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 20:33 [PATCH 1/5] Bluetooth: mgmt: Refactor hci_dev lookup for commands johan.hedberg
2012-03-01 20:33 ` [PATCH 2/5] Bluetooth: mgmt: Initialize HCI_MGMT flag for any command johan.hedberg
2012-03-01 20:46   ` Marcel Holtmann
2012-03-01 20:33 ` [PATCH 3/5] Bluetooth: mgmt: Move command handlers into a table johan.hedberg
2012-03-01 20:47   ` Marcel Holtmann [this message]
2012-03-01 20:33 ` [PATCH 4/5] Bluetooth: mgmt: Add defines for command sizes johan.hedberg
2012-03-01 20:47   ` Marcel Holtmann
2012-03-02 13:29   ` Andrei Emeltchenko
2012-03-01 20:33 ` [PATCH 5/5] Bluetooth: mgmt: Centralize message length checks johan.hedberg
2012-03-01 20:48   ` Marcel Holtmann
2012-03-01 20:45 ` [PATCH 1/5] Bluetooth: mgmt: Refactor hci_dev lookup for commands 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=1330634841.3392.107.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).