RE: [PATCH v3 2/4] shared/gatt-client: Add CSRK part to support signed write

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

 



Hi Marcel,

> > +bool bt_gatt_client_set_local_csrk(struct bt_gatt_client *client,
> > +				bool valid_local_csrk,
> > +				uint8_t key[16]);
> 
> why do we have the parameter valid_local_csrk. I find that highly confusing. If you
> do not have a valid CSRK, then do not call this function. It should be that simple.
> 

My initial purpose to set this parameter valid_local_csrk here, user can call one API
to set flag valid_local_csrk ture/false and CSRK key in one time.
According to your proposal, I think it really result in confusion for user.

So for more clear to call API , I think we should split two API for upper layer:
1. When we need to set CSRK , check the CSRK is valid , then call bt_gatt_client_set_local_csrk
  Just to pass one parameter key to function and in the function to set flag valid_local_csrk is true.

2 When two device dispair each other, we should give user possibility to unset flag and CSRK.
  So in this condition , we have to create bt_gatt_client_unset_local_csrk(struct bt_gatt_client *client)
  to clear CSRK and set flag valid_local_csrk to false.

Do you think this thought would be ok for you?

Best Regards
Chaojie Gu
--
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