Re: [PATCH 4/6] emulator/bthost: Add function to send RFCOMM UIH frames from bthost

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

 



Hi Marcin,

On Wed, Feb 12, 2014, Marcin Kraglak wrote:
> This will make RFCOMM UIH frame and fill with data passed by user.
> ---
>  emulator/bthost.c | 43 +++++++++++++++++++++++++++++++++++++++++++
>  emulator/bthost.h |  3 +++
>  2 files changed, 46 insertions(+)
> 
> diff --git a/emulator/bthost.c b/emulator/bthost.c
> index 92ae08a..6f3e538 100644
> --- a/emulator/bthost.c
> +++ b/emulator/bthost.c
> @@ -2174,6 +2174,49 @@ void bthost_add_channel_hook(struct bthost *bthost, uint16_t handle,
>  	conn->channel_hooks = hook;
>  }
>  
> +void bthost_send_uih(struct bthost *bthost, uint16_t handle, uint16_t cid,
> +			uint8_t channel, const void *data, uint16_t len)

Could we call this something like bthost_send_rfcomm() or
bthost_send_rfcomm_data() for clarity?

I also don't like the fact that you have to pass both cid and channel to
this function. Would it not be better to store enough RFCOMM specific
context and be able to lookup the necessary info just based on the
channel?

> +	hdr = (struct rfcomm_hdr *)uih_frame;

Coding style here (space before the variable name).

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