Re: [PATCH 08/14] android: Add support for handling remove bond command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Szymon,

On Thu, Oct 31, 2013, Szymon Janc wrote:
> ---
>  android/adapter.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/android/adapter.c b/android/adapter.c
> index 0f174a6..0a91149 100644
> --- a/android/adapter.c
> +++ b/android/adapter.c
> @@ -639,6 +639,26 @@ static bool cancel_bond(void *buf, uint16_t len)
>  				NULL) > 0;
>  }
>  
> +static bool remove_bond(void *buf, uint16_t len)
> +{
> +	struct hal_cmd_remove_bond *cmd = buf;
> +	struct mgmt_cp_unpair_device cp;
> +
> +	cp.disconnect = 1;
> +	cp.addr.type = BDADDR_BREDR;
> +	android2bdaddr(cmd->bdaddr, &cp.addr.bdaddr);
> +
> +	if (mgmt_send(adapter->mgmt, MGMT_OP_UNPAIR_DEVICE,
> +				adapter->index, sizeof(cp), &cp,
> +				NULL, NULL, NULL) == 0)
> +		return false;
> +
> +	send_bond_state_change(&cp.addr.bdaddr, HAL_STATUS_SUCCESS,
> +							HAL_BOND_STATE_NONE);

Wouldn't this state change make more sense to send in the mgmt command
complete callback?

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux