CHROMIUM: bluetooth: set advertising intervals

This patch supports specification of advertising intervals in
bluetooth kernel subsystem.

A new set_advertising_intervals mgmt handler is added to support
the new mgmt opcode MGMT_OP_SET_ADVERTISING_INTERVALS. The
min_interval and max_interval are simply recorded in hdev struct.

The intervals together with other advertising parameters would be
sent to the controller before advertising is enabled in the procedure
of registering an advertisement.

In cases that advertising has been enabled before
set_advertising_intervals is invoked, it would re-enable advertising
to make the intervals take effect. This is less preferable since
bluetooth core specification states that the parameters should be set
before advertising is enabled. However, the advertising re-enabling
feature is kept since it might be useful in multi-advertisements.

BUG=chromium:602461
TEST=Perform the following steps to make and update kernel.
(cr) $ FEATURES="noclean" cros_workon_make --board=$BOARD --install
       chromeos-kernel-3_xx
(cr) $ ~/trunk/src/scripts/update_kernel.sh --remote $DUT_IP
       --remote_bootargs

Change-Id: I5177b63c14dfacd0d47092fc7c814476ef73e4d8
Signed-off-by: Joseph Hwang <josephsih@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/389072
Commit-Ready: Rahul Chaturvedi <rkc@chromium.org>
Tested-by: Rahul Chaturvedi <rkc@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
5 files changed