• Jakub Kicinski's avatar
    media: use eth_hw_addr_set() · 707182e4
    Jakub Kicinski authored
    Commit 406f42fa ("net-next: When a bond have a massive amount
    of VLANs...") introduced a rbtree for faster Ethernet address look
    up. To maintain netdev->dev_addr in this tree we need to make all
    the writes to it go through appropriate helpers.
    
    Convert media from memcpy(... 6) and memcpy(... addr_len) to
    eth_hw_addr_set():
    
      @@
      expression dev, np;
      @@
      - memcpy(dev->dev_addr, np, 6)
      + eth_hw_addr_set(dev, np)
      @@
      - memcpy(dev->dev_addr, np, dev->addr_len)
      + eth_hw_addr_set(dev, np)
    
    Make sure we don't cast off const qualifier from dev->dev_addr.
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    707182e4
dvb_net.c 41.5 KB