]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
s390/qeth: remove unused fallback in Layer3's MAC code
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 8 Nov 2018 14:06:21 +0000 (15:06 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Nov 2018 01:22:24 +0000 (17:22 -0800)
If the CREATE ADDR sent by qeth_l3_iqd_read_initial_mac() fails, its
callback sets a random MAC address on the net_device. The error then
propagates back, and qeth_l3_setup_netdev() bails out without
registering the net_device.

Any subsequent call to qeth_l3_setup_netdev() will then attempt a fresh
CREATE ADDR which either 1) also fails, or 2) sets a proper MAC address
on the net_device. Consequently, the net_device will never be registered
with a random MAC and we can drop the fallback code.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_l3_main.c

index 89d5e6fb21ac3232457dab2b3aec5b445862c772..674ff3344ff38a09f43e7a9927540b5eaeeab5bc 100644 (file)
@@ -949,9 +949,6 @@ static int qeth_l3_iqd_read_initial_mac_cb(struct qeth_card *card,
        if (cmd->hdr.return_code == 0)
                ether_addr_copy(card->dev->dev_addr,
                                cmd->data.create_destroy_addr.unique_id);
-       else
-               eth_random_addr(card->dev->dev_addr);
-
        return 0;
 }