- bat_priv->bat_v.ogm_buff_len = BATADV_OGM2_HLEN;
- ogm_buff = kmalloc(bat_priv->bat_v.ogm_buff_len, GFP_ATOMIC);
Maybe use kzalloc to ensure it is zero?
Not really needed because each field is explicitly assigned later. But to be sure we sit on the safe side we can do that: in the end we are not in the fastpath here.
I know some of your structures have explicit align bytes. It would be good to ensure they are zero so that they could be used in the future without having a protocol version bump. So i think it is a good patterns to follow in general when not on the fast path.
Andrew