Re: [PATCH] Bluetooth: Add Device Added and Device Removed management events

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

 



Hi Marcel,

On Sun, Jun 29, 2014, Marcel Holtmann wrote:
> +static void device_added(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type,
> +			 u8 action)
> +{
> +	struct pending_cmd *cmd;
> +	struct mgmt_ev_device_added ev;
> +
> +	cmd = mgmt_pending_find(MGMT_OP_ADD_DEVICE, hdev);

This is not going to work since you're not creating a pending command
struct for either one of the new mgmt commands (i.e. using
mgmt_pending_add). Not using mgmt_pending_add makes perfect sense here
since this is all synchronous (no HCI commands etc). What I'd suggest is
to pass the struct sock to the function or even do the signal sending
inline in the command handler function (as it's not many lines of code
and you've only got a single caller).

> +static void device_removed(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
> +{
> +	struct pending_cmd *cmd;
> +	struct mgmt_ev_device_removed ev;
> +
> +	cmd = mgmt_pending_find(MGMT_OP_REMOVE_DEVICE, hdev);

Same here.

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