aboutsummaryrefslogtreecommitdiffstats
path: root/net/ncsi/ncsi-cmd.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2020-05-12 12:18:21 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-05-12 12:18:21 -0700
commit0fdc50dfab47d525b71a9f0d8310746cdc0c09c5 (patch)
tree42f5f09f2c8677389136541815394b76fba07600 /net/ncsi/ncsi-cmd.c
parentInput: add driver for the Cypress CY8CTMA140 touchscreen (diff)
parentLinux 5.6 (diff)
downloadlinux-dev-0fdc50dfab47d525b71a9f0d8310746cdc0c09c5.tar.xz
linux-dev-0fdc50dfab47d525b71a9f0d8310746cdc0c09c5.zip
Merge tag 'v5.6' into next
Sync up with mainline to get device tree and other changes.
Diffstat (limited to 'net/ncsi/ncsi-cmd.c')
-rw-r--r--net/ncsi/ncsi-cmd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c
index 0187e65176c0..ba9ae482141b 100644
--- a/net/ncsi/ncsi-cmd.c
+++ b/net/ncsi/ncsi-cmd.c
@@ -369,7 +369,15 @@ int ncsi_xmit_cmd(struct ncsi_cmd_arg *nca)
eh = skb_push(nr->cmd, sizeof(*eh));
eh->h_proto = htons(ETH_P_NCSI);
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
* corresponding response. Given NCSI is an internal