Re: [PATCH 2/2] Bluetooth: Use reject error code in pair device method

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

 



Hi Lukasz,

On Fri, Jan 23, 2015, Lukasz Rymanowski wrote:
> >>               if (PTR_ERR(conn) == -EBUSY)
> >>                       status = MGMT_STATUS_BUSY;
> >> +             else if (PTR_ERR(conn) == -EOPNOTSUPP)
> >> +                     status = MGMT_STATUS_REJECTED;
> >>               else
> >>                       status = MGMT_STATUS_CONNECT_FAILED;
> >
> > Good catch, but I'd like to keep this consistent with our handling of LE
> > support elsewhere. Particularly, I'd like to follow the same semantics
> > as the mgmt_le_support() helper function, meaning if the HW doesn't
> > support LE we get NOT_SUPPORTED whereas if it does support LE but it's
> > simply not enabled we get REJECTED.
> >
> > You could e.g. use EOPNOTSUPP for non-LE HW and ECONNREFUSED for LE not
> > enabled (feel free to propose a better errno to mgmt status mapping).
> >
> Ok.
> I could not found any better error code than  ECONNREFUSED so I will go for it.
> 
> Also going with your proposal I should probably change hci_connect_acl
> in the same way.
> Meaning return EOPNOTSUPP if it is LE only chip and ECONNREFUSED if it
> is dual but
> BREDR is disabled.
> 
> Do you agree?

Yes, sounds reasonable.

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