firmware: turris-mox-rwtm: Use ETH_ALEN instead of hardcoded 6
authorMarek Behún <kabel@kernel.org>
Sat, 31 Aug 2024 09:20:36 +0000 (11:20 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 2 Sep 2024 09:42:09 +0000 (09:42 +0000)
Use the ETH_ALEN macro instead of hardcoded 6 for MAC address length.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-3-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/firmware/turris-mox-rwtm.c

index 67d7b65..d3ce093 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/debugfs.h>
 #include <linux/dma-mapping.h>
 #include <linux/hw_random.h>
+#include <linux/if_ether.h>
 #include <linux/mailbox_client.h>
 #include <linux/minmax.h>
 #include <linux/module.h>
@@ -69,7 +70,7 @@ struct mox_rwtm {
        int has_board_info;
        u64 serial_number;
        int board_version, ram_size;
-       u8 mac_address1[6], mac_address2[6];
+       u8 mac_address1[ETH_ALEN], mac_address2[ETH_ALEN];
 
        /* public key burned in eFuse */
        int has_pubkey;