Commit 7c7b58d4 authored by Vijay Khemka's avatar Vijay Khemka Committed by David S. Miller

net/ncsi: Send device address as source address

After receiving device mac address from device, send this as
a source address for further commands instead of broadcast
address.

This will help in multi host NIC cards.
Signed-off-by: default avatarVijay Khemka <vijaykhemka@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e1027745
...@@ -369,7 +369,15 @@ int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca) ...@@ -369,7 +369,15 @@ int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca)
eh = skb_push(nr->cmd, sizeof(*eh)); eh = skb_push(nr->cmd, sizeof(*eh));
eh->h_proto = htons(ETH_P_NCSI); eh->h_proto = htons(ETH_P_NCSI);
eth_broadcast_addr(eh->h_dest); eth_broadcast_addr(eh->h_dest);
eth_broadcast_addr(eh->h_source);
/* If mac address received from device then use it for
* source address as unicast address else use broadcast
* address as source address
*/
if (nca->ndp->gma_flag == 1)
memcpy(eh->h_source, nca->ndp->ndev.dev->dev_addr, ETH_ALEN);
else
eth_broadcast_addr(eh->h_source);
/* Start the timer for the request that might not have /* Start the timer for the request that might not have
* corresponding response. Given NCSI is an internal * corresponding response. Given NCSI is an internal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment