Skip to content

Commit

Permalink
qedi: Add get_generic_tlv_data handler.
Browse files Browse the repository at this point in the history
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Manish Rangankar authored and David S. Miller committed May 23, 2018
1 parent 534bbdf commit 269afb3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/scsi/qedi/qedi_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,21 @@ static int qedi_find_boot_info(struct qedi_ctx *qedi,
return ret;
}

static void qedi_get_generic_tlv_data(void *dev, struct qed_generic_tlvs *data)
{
struct qedi_ctx *qedi;

if (!dev) {
QEDI_INFO(NULL, QEDI_LOG_EVT,
"dev is NULL so ignoring get_generic_tlv_data request.\n");
return;
}
qedi = (struct qedi_ctx *)dev;

memset(data, 0, sizeof(struct qed_generic_tlvs));
ether_addr_copy(data->mac[0], qedi->mac);
}

/*
* Protocol TLV handler
*/
Expand Down Expand Up @@ -1078,6 +1093,7 @@ static struct qed_iscsi_cb_ops qedi_cb_ops = {
{
.link_update = qedi_link_update,
.get_protocol_tlv_data = qedi_get_protocol_tlv_data,
.get_generic_tlv_data = qedi_get_generic_tlv_data,
}
};

Expand Down

0 comments on commit 269afb3

Please sign in to comment.