Merge branch 'message-callback' into kbuild/kconfig
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / batman-adv / aggregation.c
index ce8b8a6e5ae6462d8336236a1a46ad0cef8d2126..9862d16bbdc88e977914f8d13986e09ac6720fd6 100644 (file)
@@ -106,11 +106,14 @@ static void new_aggregated_packet(unsigned char *packet_buff,
 {
        struct forw_packet *forw_packet_aggr;
        unsigned long flags;
+       /* FIXME: each batman_if will be attached to a softif */
+       struct bat_priv *bat_priv = netdev_priv(soft_device);
 
        /* own packet should always be scheduled */
        if (!own_packet) {
                if (!atomic_dec_not_zero(&batman_queue_left)) {
-                       bat_dbg(DBG_BATMAN, "batman packet queue full\n");
+                       bat_dbg(DBG_BATMAN, bat_priv,
+                               "batman packet queue full\n");
                        return;
                }
        }
@@ -252,9 +255,9 @@ void receive_aggr_bat_packet(struct ethhdr *ethhdr, unsigned char *packet_buff,
        while (aggregated_packet(buff_pos, packet_len,
                                 batman_packet->num_hna)) {
 
-               /* network to host order for our 16bit seqno, and the
+               /* network to host order for our 32bit seqno, and the
                   orig_interval. */
-               batman_packet->seqno = ntohs(batman_packet->seqno);
+               batman_packet->seqno = ntohl(batman_packet->seqno);
 
                hna_buff = packet_buff + buff_pos + BAT_PACKET_LEN;
                receive_bat_packet(ethhdr, batman_packet,