Merge "diag: Use correct bridge index while sending data"
This commit is contained in:
commit
bff6b51c07
2 changed files with 6 additions and 6 deletions
|
@ -999,7 +999,7 @@ static int diag_send_raw_data_remote(int proc, void *buf, int len,
|
||||||
(void *)driver->hdlc_encode_buf);
|
(void *)driver->hdlc_encode_buf);
|
||||||
|
|
||||||
send_data:
|
send_data:
|
||||||
err = diagfwd_bridge_write(proc, driver->hdlc_encode_buf,
|
err = diagfwd_bridge_write(bridge_index, driver->hdlc_encode_buf,
|
||||||
driver->hdlc_encode_buf_len);
|
driver->hdlc_encode_buf_len);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err_ratelimited("diag: Error writing Callback packet to proc: %d, err: %d\n",
|
pr_err_ratelimited("diag: Error writing Callback packet to proc: %d, err: %d\n",
|
||||||
|
@ -2570,7 +2570,7 @@ static int diag_user_process_raw_data(const char __user *buf, int len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (remote_proc) {
|
if (remote_proc) {
|
||||||
ret = diag_send_raw_data_remote(remote_proc - 1,
|
ret = diag_send_raw_data_remote(remote_proc,
|
||||||
(void *)(user_space_data + token_offset),
|
(void *)(user_space_data + token_offset),
|
||||||
len, USER_SPACE_RAW_DATA);
|
len, USER_SPACE_RAW_DATA);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
@ -3422,15 +3422,15 @@ static int __init diagchar_init(void)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
ret = diag_masks_init();
|
ret = diag_masks_init();
|
||||||
|
if (ret)
|
||||||
|
goto fail;
|
||||||
|
ret = diag_remote_init();
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
ret = diag_mux_init();
|
ret = diag_mux_init();
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
ret = diagfwd_init();
|
ret = diagfwd_init();
|
||||||
if (ret)
|
|
||||||
goto fail;
|
|
||||||
ret = diag_remote_init();
|
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
ret = diagfwd_bridge_init();
|
ret = diagfwd_bridge_init();
|
||||||
|
|
|
@ -107,7 +107,7 @@ static int diagfwd_bridge_mux_write_done(unsigned char *buf, int len,
|
||||||
|
|
||||||
if (id < 0 || id >= NUM_REMOTE_DEV)
|
if (id < 0 || id >= NUM_REMOTE_DEV)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
ch = &bridge_info[id];
|
ch = &bridge_info[buf_ctx];
|
||||||
if (ch->dev_ops && ch->dev_ops->fwd_complete)
|
if (ch->dev_ops && ch->dev_ops->fwd_complete)
|
||||||
ch->dev_ops->fwd_complete(ch->ctxt, buf, len, 0);
|
ch->dev_ops->fwd_complete(ch->ctxt, buf, len, 0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue