diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2013-05-07 22:05:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-08 14:59:48 -0400 |
commit | bf591f51a53a589ee97b862881f4f07ed819fcbd (patch) | |
tree | 23ec4b9230f4a804c2159ab66e1e3f5ff1852953 /drivers/net/ethernet/emulex/benet/be_cmds.c | |
parent | b4c1df9378bc6ce9f7fc4fd18afa3a98b676c5fa (diff) |
be2net: fix payload_len value for GET_MAC_LIST cmd req
The buffer size for a FW cmd request must be big enough to fit the response,
else the cmd fails. For GET_MAC_LIST cmd, though the memory allocated for
the cmd is big enough to fit the response, the payload_len value in the
WRB hdr is being set to the request length only.
Fix this for GET_MAC_LIST cmd.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_cmds.c')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index e1e5bb9d9054..fd7b547698ab 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c | |||
@@ -2640,9 +2640,8 @@ int be_cmd_get_mac_from_list(struct be_adapter *adapter, u8 *mac, | |||
2640 | req = get_mac_list_cmd.va; | 2640 | req = get_mac_list_cmd.va; |
2641 | 2641 | ||
2642 | be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 2642 | be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
2643 | OPCODE_COMMON_GET_MAC_LIST, sizeof(*req), | 2643 | OPCODE_COMMON_GET_MAC_LIST, |
2644 | wrb, &get_mac_list_cmd); | 2644 | get_mac_list_cmd.size, wrb, &get_mac_list_cmd); |
2645 | |||
2646 | req->hdr.domain = domain; | 2645 | req->hdr.domain = domain; |
2647 | req->mac_type = MAC_ADDRESS_TYPE_NETWORK; | 2646 | req->mac_type = MAC_ADDRESS_TYPE_NETWORK; |
2648 | req->perm_override = 1; | 2647 | req->perm_override = 1; |