batman-adv: drop duplicated wifi_flags assignments

During the initialization of the batadv_wifi_net_device_state, it is enough
to write the wifi_flags once before the batadv_wifi_net_device_state is
added to the batadv_wifi_net_devices rhashtable.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
This commit is contained in:
Sven Eckelmann 2026-06-02 17:41:15 +02:00
parent e9dc4072c5
commit b2e44a67ef
No known key found for this signature in database
GPG Key ID: 4D0F772BD314F5CB

View File

@ -987,7 +987,6 @@ batadv_wifi_net_device_insert(struct net_device *net_dev, u32 wifi_flags)
if (!device_state)
return -ENOMEM;
device_state->wifi_flags = wifi_flags;
netdev_hold(net_dev, &device_state->dev_tracker, GFP_ATOMIC);
device_state->netdev = net_dev;
WRITE_ONCE(device_state->wifi_flags, wifi_flags);