-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth: SSP: Improve BR SC only mode #78837
base: main
Are you sure you want to change the base?
Bluetooth: SSP: Improve BR SC only mode #78837
Conversation
subsys/bluetooth/host/classic/ssp.c
Outdated
if (IS_ENABLED(CONFIG_BT_SMP_SC_ONLY) && | ||
(!(evt->key_type == BT_LK_AUTH_COMBINATION_P256))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix your split line indentation and alignement. It should be N tabs + 0-7 spaces so that you align right after the (
of the previous line. The clang-format inline annotations point this out as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I noticed it. I recently discovered that Zephyr's tab occupies 8 character positions.
I was just wondering why there was a compliance issue before. Actually, I pay attention to these formats when making commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
subsys/bluetooth/host/classic/ssp.c
Outdated
LOG_ERR("For SC only mode, link key type should be %d", | ||
BT_LK_AUTH_COMBINATION_P256); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
5151780
to
7de336e
Compare
a8e779b
to
cab5898
Compare
subsys/bluetooth/host/classic/ssp.c
Outdated
LOG_ERR("For SC only mode, link key type should be %d", | ||
BT_LK_AUTH_COMBINATION_P256); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small improvement still: the convention when we get unexpected/invalid data from the controller is to use LOG_WRN()
instead of LOG_ERR()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Updated.
Actively disconnect the connection with error code `BT_HCI_ERR_AUTH_FAIL` when the notified link key type is not `BT_LK_AUTH_COMBINATION_P256` in BR SC only mode. Signed-off-by: Lyle Zhu <[email protected]>
cab5898
to
8e2527e
Compare
Actively disconnect the connection with error code
BT_HCI_ERR_AUTH_FAIL
when the notified link key type is notBT_LK_AUTH_COMBINATION_P256
in BR SC only mode.