batman-adv: Explicitly mark the common header structure
[linux-2.6-block.git] / net / batman-adv / soft-interface.c
index 987c75a775f9c034c5f6648fc13f05203f1419dc..bd8c7cfaeacf47f04a2e0d757a7325242073aaa5 100644 (file)
@@ -457,10 +457,10 @@ static void softif_batman_recv(struct sk_buff *skb, struct net_device *dev,
                batman_ogm_packet = (struct batman_ogm_packet *)
                                                        (skb->data + ETH_HLEN);
 
-       if (batman_ogm_packet->version != COMPAT_VERSION)
+       if (batman_ogm_packet->header.version != COMPAT_VERSION)
                goto out;
 
-       if (batman_ogm_packet->packet_type != BAT_OGM)
+       if (batman_ogm_packet->header.packet_type != BAT_OGM)
                goto out;
 
        if (!(batman_ogm_packet->flags & PRIMARIES_FIRST_HOP))
@@ -632,11 +632,11 @@ static int interface_tx(struct sk_buff *skb, struct net_device *soft_iface)
                        goto dropped;
 
                bcast_packet = (struct bcast_packet *)skb->data;
-               bcast_packet->version = COMPAT_VERSION;
-               bcast_packet->ttl = TTL;
+               bcast_packet->header.version = COMPAT_VERSION;
+               bcast_packet->header.ttl = TTL;
 
                /* batman packet type: broadcast */
-               bcast_packet->packet_type = BAT_BCAST;
+               bcast_packet->header.packet_type = BAT_BCAST;
 
                /* hw address of first interface is the orig mac because only
                 * this mac is known throughout the mesh */
@@ -725,8 +725,8 @@ void interface_rx(struct net_device *soft_iface,
                skb_push(skb, hdr_size);
                unicast_packet = (struct unicast_packet *)skb->data;
 
-               if ((unicast_packet->packet_type != BAT_UNICAST) &&
-                   (unicast_packet->packet_type != BAT_UNICAST_FRAG))
+               if ((unicast_packet->header.packet_type != BAT_UNICAST) &&
+                   (unicast_packet->header.packet_type != BAT_UNICAST_FRAG))
                        goto dropped;
 
                skb_reset_mac_header(skb);