From: Padmanabh Ratnakar Date: Fri, 3 Feb 2012 09:49:46 +0000 (+0000) Subject: be2net: Fix link status query command X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57cd80d4d511748f3973accc6919e7e1e1936ebb;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git be2net: Fix link status query command Version number in query link status command is getting overwritten in be_wrb_cmd_hdr_prepare() routine. Move the initialization to fix this issue. Also initialize the domain field. Signed-off-by: Padmanabh Ratnakar Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 0fcb45624796..dd6e8e2b3476 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -1257,11 +1257,13 @@ int be_cmd_link_status_query(struct be_adapter *adapter, u8 *mac_speed, } req = embedded_payload(wrb); + be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, + OPCODE_COMMON_NTWK_LINK_STATUS_QUERY, sizeof(*req), wrb, NULL); + if (adapter->generation == BE_GEN3 || lancer_chip(adapter)) req->hdr.version = 1; - be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_LINK_STATUS_QUERY, sizeof(*req), wrb, NULL); + req->hdr.domain = dom; status = be_mcc_notify_wait(adapter); if (!status) {