summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-14 09:22:32 -0700
committerJakub Kicinski <kuba@kernel.org>2021-10-14 09:22:32 -0700
commit2b4731b153b4621064d9e899a92f6c03199630f1 (patch)
tree8aa30e71b50c2a2c3f1d5b3b923631ed86ff814e /include/linux
parent201f1a2d77f6b641ee9eb0ed7725833d1405d159 (diff)
parent923ca6f61887c9ed5797af096ffb23bdb6e4c6fa (diff)
downloadcachepc-linux-2b4731b153b4621064d9e899a92f6c03199630f1.tar.gz
cachepc-linux-2b4731b153b4621064d9e899a92f6c03199630f1.zip
Merge branch 'ethernet-more-netdev-dev_addr-write-removals'
Jakub Kicinski says: ==================== ethernet: more netdev->dev_addr write removals Another series removing direct writes to netdev->dev_addr. ==================== Link: https://lore.kernel.org/r/20211013204435.322561-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/etherdevice.h5
-rw-r--r--include/linux/qed/qed_eth_if.h2
-rw-r--r--include/linux/qed/qed_if.h2
-rw-r--r--include/linux/qed/qed_rdma_if.h3
4 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 3cf546d2ffd1..76f7ff684cbf 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -269,8 +269,11 @@ static inline void eth_zero_addr(u8 *addr)
*/
static inline void eth_hw_addr_random(struct net_device *dev)
{
+ u8 addr[ETH_ALEN];
+
+ eth_random_addr(addr);
+ __dev_addr_set(dev, addr, ETH_ALEN);
dev->addr_assign_type = NET_ADDR_RANDOM;
- eth_random_addr(dev->dev_addr);
}
/**
diff --git a/include/linux/qed/qed_eth_if.h b/include/linux/qed/qed_eth_if.h
index 4df0bf0a0864..e1bf3219b4e6 100644
--- a/include/linux/qed/qed_eth_if.h
+++ b/include/linux/qed/qed_eth_if.h
@@ -331,7 +331,7 @@ struct qed_eth_ops {
int (*configure_arfs_searcher)(struct qed_dev *cdev,
enum qed_filter_config_mode mode);
int (*get_coalesce)(struct qed_dev *cdev, u16 *coal, void *handle);
- int (*req_bulletin_update_mac)(struct qed_dev *cdev, u8 *mac);
+ int (*req_bulletin_update_mac)(struct qed_dev *cdev, const u8 *mac);
};
const struct qed_eth_ops *qed_get_eth_ops(void);
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index ad220d5da18f..0dae7fcc5ef2 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -1113,7 +1113,7 @@ struct qed_common_ops {
*
* Return: Int.
*/
- int (*update_mac)(struct qed_dev *cdev, u8 *mac);
+ int (*update_mac)(struct qed_dev *cdev, const u8 *mac);
/**
* update_mtu(): API to inform the change in the mtu.
diff --git a/include/linux/qed/qed_rdma_if.h b/include/linux/qed/qed_rdma_if.h
index aeb242cefebf..3b76c07fbcf8 100644
--- a/include/linux/qed/qed_rdma_if.h
+++ b/include/linux/qed/qed_rdma_if.h
@@ -662,7 +662,8 @@ struct qed_rdma_ops {
u8 connection_handle,
struct qed_ll2_stats *p_stats);
int (*ll2_set_mac_filter)(struct qed_dev *cdev,
- u8 *old_mac_address, u8 *new_mac_address);
+ u8 *old_mac_address,
+ const u8 *new_mac_address);
int (*iwarp_set_engine_affin)(struct qed_dev *cdev, bool b_reset);