aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev_api.c
diff options
context:
space:
mode:
authorKees Cook <[email protected]>2025-05-21 20:46:14 +0000
committerPaolo Abeni <[email protected]>2025-05-27 06:25:43 +0000
commit9ca6804ab7c34f65fcf2e29333a39e7807c30b60 (patch)
tree48c42fe2fc7cbe9aa9b2f35016c53d543dc8ad71 /net/core/dev_api.c
parentnet: usb: r8152: Convert to use struct sockaddr_storage internally (diff)
downloadkernel-9ca6804ab7c34f65fcf2e29333a39e7807c30b60.tar.gz
kernel-9ca6804ab7c34f65fcf2e29333a39e7807c30b60.zip
net: core: Convert dev_set_mac_address() to struct sockaddr_storage
All users of dev_set_mac_address() are now using a struct sockaddr_storage. Convert the internal data type to struct sockaddr_storage, drop the casts, and update pointer types. Acked-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/core/dev_api.c')
-rw-r--r--net/core/dev_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev_api.c b/net/core/dev_api.c
index b5f293e637d9..6011a5ef649d 100644
--- a/net/core/dev_api.c
+++ b/net/core/dev_api.c
@@ -319,20 +319,20 @@ EXPORT_SYMBOL(dev_set_allmulti);
/**
* dev_set_mac_address() - change Media Access Control Address
* @dev: device
- * @sa: new address
+ * @ss: new address
* @extack: netlink extended ack
*
* Change the hardware (MAC) address of the device
*
* Return: 0 on success, -errno on failure.
*/
-int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
+int dev_set_mac_address(struct net_device *dev, struct sockaddr_storage *ss,
struct netlink_ext_ack *extack)
{
int ret;
netdev_lock_ops(dev);
- ret = netif_set_mac_address(dev, (struct sockaddr_storage *)sa, extack);
+ ret = netif_set_mac_address(dev, ss, extack);
netdev_unlock_ops(dev);
return ret;