Re: [PATCH v4] Bluetooth: Override status if local user rejects pairing

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

 



Hi Jaganath,

On Fri, Jul 13, 2012, Jaganath Kanakkassery wrote:
> --- a/include/net/bluetooth/mgmt.h
> +++ b/include/net/bluetooth/mgmt.h
> @@ -42,6 +42,7 @@
>  #define MGMT_STATUS_NOT_POWERED		0x0f
>  #define MGMT_STATUS_CANCELLED		0x10
>  #define MGMT_STATUS_INVALID_INDEX	0x11
> +#define MGMT_STATUS_AUTH_REJECTED	0x12

Why this? You didn't have it in v3. The existing STATUS_REJECTED should
be enough, right?

> @@ -2659,6 +2659,8 @@ static void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
>  		else
>  			secure = 0;
>  
> +		conn->auth_rejected = false;
> +
>  		mgmt_pin_code_request(hdev, &ev->bdaddr, secure);
>  	}
>  

I think it would be cleaner to set this to false immediately after the
conn lookup in this function. Also, when HCI_PAIRABLE is not set you
should set auth_rejected to true since that's also a local rejection
(even though it's an automatic one).

> @@ -3139,6 +3141,8 @@ static void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
>  		else
>  			cp.oob_data = 0x00;
>  
> +		conn->auth_rejected = false;
> +
>  		hci_send_cmd(hdev, HCI_OP_IO_CAPABILITY_REPLY,
>  			     sizeof(cp), &cp);
>  	} else {

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