Bluetooth: Use shorter "rand" name for "randomizer"
The common short form of "randomizer" is "rand" in many places (including the Bluetooth specification). The shorter version also makes for easier to read code with less forced line breaks. This patch renames all occurences of "randomizer" to "rand" in the Bluetooth subsystem code. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Marcel Holtmann
parent
c19a495c8b
commit
38da170306
@@ -3598,7 +3598,7 @@ static int add_remote_oob_data(struct sock *sk, struct hci_dev *hdev,
|
||||
}
|
||||
|
||||
err = hci_add_remote_oob_data(hdev, &cp->addr.bdaddr,
|
||||
cp->hash, cp->randomizer);
|
||||
cp->hash, cp->rand);
|
||||
if (err < 0)
|
||||
status = MGMT_STATUS_FAILED;
|
||||
else
|
||||
@@ -3619,10 +3619,8 @@ static int add_remote_oob_data(struct sock *sk, struct hci_dev *hdev,
|
||||
}
|
||||
|
||||
err = hci_add_remote_oob_ext_data(hdev, &cp->addr.bdaddr,
|
||||
cp->hash192,
|
||||
cp->randomizer192,
|
||||
cp->hash256,
|
||||
cp->randomizer256);
|
||||
cp->hash192, cp->rand192,
|
||||
cp->hash256, cp->rand256);
|
||||
if (err < 0)
|
||||
status = MGMT_STATUS_FAILED;
|
||||
else
|
||||
@@ -6771,8 +6769,8 @@ void mgmt_set_local_name_complete(struct hci_dev *hdev, u8 *name, u8 status)
|
||||
}
|
||||
|
||||
void mgmt_read_local_oob_data_complete(struct hci_dev *hdev, u8 *hash192,
|
||||
u8 *randomizer192, u8 *hash256,
|
||||
u8 *randomizer256, u8 status)
|
||||
u8 *rand192, u8 *hash256, u8 *rand256,
|
||||
u8 status)
|
||||
{
|
||||
struct pending_cmd *cmd;
|
||||
|
||||
@@ -6787,16 +6785,14 @@ void mgmt_read_local_oob_data_complete(struct hci_dev *hdev, u8 *hash192,
|
||||
mgmt_status(status));
|
||||
} else {
|
||||
if (test_bit(HCI_SC_ENABLED, &hdev->dev_flags) &&
|
||||
hash256 && randomizer256) {
|
||||
hash256 && rand256) {
|
||||
struct mgmt_rp_read_local_oob_ext_data rp;
|
||||
|
||||
memcpy(rp.hash192, hash192, sizeof(rp.hash192));
|
||||
memcpy(rp.randomizer192, randomizer192,
|
||||
sizeof(rp.randomizer192));
|
||||
memcpy(rp.rand192, rand192, sizeof(rp.rand192));
|
||||
|
||||
memcpy(rp.hash256, hash256, sizeof(rp.hash256));
|
||||
memcpy(rp.randomizer256, randomizer256,
|
||||
sizeof(rp.randomizer256));
|
||||
memcpy(rp.rand256, rand256, sizeof(rp.rand256));
|
||||
|
||||
cmd_complete(cmd->sk, hdev->id,
|
||||
MGMT_OP_READ_LOCAL_OOB_DATA, 0,
|
||||
@@ -6805,8 +6801,7 @@ void mgmt_read_local_oob_data_complete(struct hci_dev *hdev, u8 *hash192,
|
||||
struct mgmt_rp_read_local_oob_data rp;
|
||||
|
||||
memcpy(rp.hash, hash192, sizeof(rp.hash));
|
||||
memcpy(rp.randomizer, randomizer192,
|
||||
sizeof(rp.randomizer));
|
||||
memcpy(rp.rand, rand192, sizeof(rp.rand));
|
||||
|
||||
cmd_complete(cmd->sk, hdev->id,
|
||||
MGMT_OP_READ_LOCAL_OOB_DATA, 0,
|
||||
|
||||
Reference in New Issue
Block a user