mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[SCSI] libiscsi: Add local_ipaddr parameter in iscsi_conn struct
Add local_ipaddr param and support get/set operations on it. Signed-off-by: Adheer Chandravanshi <[email protected]> Signed-off-by: Vikas Chaudhary <[email protected]> Reviewed-by: Mike Christie <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
5af62f240b
commit
ae56ff4084
2 changed files with 7 additions and 0 deletions
|
|
@ -2945,6 +2945,7 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)
|
|||
free_pages((unsigned long) conn->data,
|
||||
get_order(ISCSI_DEF_MAX_RECV_SEG_LEN));
|
||||
kfree(conn->persistent_address);
|
||||
kfree(conn->local_ipaddr);
|
||||
kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task,
|
||||
sizeof(void*));
|
||||
if (session->leadconn == conn)
|
||||
|
|
@ -3269,6 +3270,8 @@ int iscsi_set_param(struct iscsi_cls_conn *cls_conn,
|
|||
sscanf(buf, "%d", &val);
|
||||
session->discovery_sess = !!val;
|
||||
break;
|
||||
case ISCSI_PARAM_LOCAL_IPADDR:
|
||||
return iscsi_switch_str_param(&conn->local_ipaddr, buf);
|
||||
default:
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
|
@ -3542,6 +3545,9 @@ int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
|
|||
case ISCSI_PARAM_TCP_RECV_WSF:
|
||||
len = sprintf(buf, "%u\n", conn->tcp_recv_wsf);
|
||||
break;
|
||||
case ISCSI_PARAM_LOCAL_IPADDR:
|
||||
len = sprintf(buf, "%s\n", conn->local_ipaddr);
|
||||
break;
|
||||
default:
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue