Skip to content

Commit d9b0e59

Browse files
Lijun Pankuba-moo
authored andcommitted
ibmvnic: save changed mac address to adapter->mac_addr
After mac address change request completes successfully, the new mac address need to be saved to adapter->mac_addr as well as netdev->dev_addr. Otherwise, adapter->mac_addr still holds old data. Fixes: 62740e9 ("net/ibmvnic: Update MAC address settings after adapter reset") Signed-off-by: Lijun Pan <ljp@linux.ibm.com> Link: https://lore.kernel.org/r/20201020223919.46106-1-ljp@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 287d354 commit d9b0e59

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4235,8 +4235,13 @@ static int handle_change_mac_rsp(union ibmvnic_crq *crq,
42354235
dev_err(dev, "Error %ld in CHANGE_MAC_ADDR_RSP\n", rc);
42364236
goto out;
42374237
}
4238+
/* crq->change_mac_addr.mac_addr is the requested one
4239+
* crq->change_mac_addr_rsp.mac_addr is the returned valid one.
4240+
*/
42384241
ether_addr_copy(netdev->dev_addr,
42394242
&crq->change_mac_addr_rsp.mac_addr[0]);
4243+
ether_addr_copy(adapter->mac_addr,
4244+
&crq->change_mac_addr_rsp.mac_addr[0]);
42404245
out:
42414246
complete(&adapter->fw_done);
42424247
return rc;

0 commit comments

Comments
 (0)