We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4960ec commit 5e2c59eCopy full SHA for 5e2c59e
net/bluetooth/mgmt.c
@@ -6005,8 +6005,7 @@ static int read_adv_features(struct sock *sk, struct hci_dev *hdev,
6005
return err;
6006
}
6007
6008
-static bool tlv_data_is_valid(struct hci_dev *hdev, u32 adv_flags, u8 *data,
6009
- u8 len, bool is_adv_data)
+static bool tlv_data_is_valid(u32 adv_flags, u8 *data, u8 len, bool is_adv_data)
6010
{
6011
u8 max_len = HCI_MAX_AD_LENGTH;
6012
int i, cur_len;
@@ -6168,8 +6167,8 @@ static int add_advertising(struct sock *sk, struct hci_dev *hdev,
6168
6167
goto unlock;
6169
6170
6171
- if (!tlv_data_is_valid(hdev, flags, cp->data, cp->adv_data_len, true) ||
6172
- !tlv_data_is_valid(hdev, flags, cp->data + cp->adv_data_len,
+ if (!tlv_data_is_valid(flags, cp->data, cp->adv_data_len, true) ||
+ !tlv_data_is_valid(flags, cp->data + cp->adv_data_len,
6173
cp->scan_rsp_len, false)) {
6174
err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING,
6175
MGMT_STATUS_INVALID_PARAMS);
0 commit comments