From: Johan Hedberg Date: Tue, 25 Feb 2014 17:56:31 +0000 (+0200) Subject: Bluetooth: Fix advertising address type when toggling connectable X-Git-Tag: v3.15-rc1~113^2~159^2^2~37^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4858cb942b9afa57c1220aa5d9b536a0d7ec623;p=pandora-kernel.git Bluetooth: Fix advertising address type when toggling connectable When the connectable setting is toggled using mgmt_set_connectable the HCI_CONNECTABLE flag will only be set once the related HCI commands succeed. When determining what kind of advertising to do we need to therefore also check whether there is a pending Set Connectable command in addition to the current flag value. The enable_advertising function was already taking care of this for the advertising type with the help of the get_adv_type function, but was failing to do the same for the address type selection. This patch converts the get_adv_type function to be more generic in that it returns the expected connectable state and updates the enable_advertising function to use the return value both for the advertising type as well as the advertising address type. Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann --- Reading git-diff-tree failed