batman-adv: remove ogm_emit and ogm_schedule API calls
[linux-2.6-microblaze.git] / net / batman-adv / send.c
index f2f1256..59e695b 100644 (file)
@@ -156,7 +156,7 @@ int batadv_send_unicast_skb(struct sk_buff *skb,
  * attempted.
  *
  * Return: NET_XMIT_SUCCESS on success, NET_XMIT_DROP on failure, or
- * NET_XMIT_POLICED if the skb is buffered for later transmit.
+ * -EINPROGRESS if the skb is buffered for later transmit.
  */
 int batadv_send_skb_to_orig(struct sk_buff *skb,
                            struct batadv_orig_node *orig_node,
@@ -188,7 +188,7 @@ int batadv_send_skb_to_orig(struct sk_buff *skb,
         * network coding fails, then send the packet as usual.
         */
        if (recv_if && batadv_nc_skb_forward(skb, neigh_node)) {
-               ret = NET_XMIT_POLICED;
+               ret = -EINPROGRESS;
        } else {
                batadv_send_unicast_skb(skb, neigh_node);
                ret = NET_XMIT_SUCCESS;
@@ -428,27 +428,7 @@ int batadv_send_skb_via_gw(struct batadv_priv *bat_priv, struct sk_buff *skb,
                                       orig_node, vid);
 }
 
-void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface)
-{
-       struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
-
-       if ((hard_iface->if_status == BATADV_IF_NOT_IN_USE) ||
-           (hard_iface->if_status == BATADV_IF_TO_BE_REMOVED))
-               return;
-
-       /* the interface gets activated here to avoid race conditions between
-        * the moment of activating the interface in
-        * hardif_activate_interface() where the originator mac is set and
-        * outdated packets (especially uninitialized mac addresses) in the
-        * packet queue
-        */
-       if (hard_iface->if_status == BATADV_IF_TO_BE_ACTIVATED)
-               hard_iface->if_status = BATADV_IF_ACTIVE;
-
-       bat_priv->bat_algo_ops->bat_ogm_schedule(hard_iface);
-}
-
-static void batadv_forw_packet_free(struct batadv_forw_packet *forw_packet)
+void batadv_forw_packet_free(struct batadv_forw_packet *forw_packet)
 {
        kfree_skb(forw_packet->skb);
        if (forw_packet->if_incoming)
@@ -604,45 +584,6 @@ out:
        atomic_inc(&bat_priv->bcast_queue_left);
 }
 
-void batadv_send_outstanding_bat_ogm_packet(struct work_struct *work)
-{
-       struct delayed_work *delayed_work;
-       struct batadv_forw_packet *forw_packet;
-       struct batadv_priv *bat_priv;
-
-       delayed_work = to_delayed_work(work);
-       forw_packet = container_of(delayed_work, struct batadv_forw_packet,
-                                  delayed_work);
-       bat_priv = netdev_priv(forw_packet->if_incoming->soft_iface);
-       spin_lock_bh(&bat_priv->forw_bat_list_lock);
-       hlist_del(&forw_packet->list);
-       spin_unlock_bh(&bat_priv->forw_bat_list_lock);
-
-       if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_DEACTIVATING)
-               goto out;
-
-       bat_priv->bat_algo_ops->bat_ogm_emit(forw_packet);
-
-       /* we have to have at least one packet in the queue to determine the
-        * queues wake up time unless we are shutting down.
-        *
-        * only re-schedule if this is the "original" copy, e.g. the OGM of the
-        * primary interface should only be rescheduled once per period, but
-        * this function will be called for the forw_packet instances of the
-        * other secondary interfaces as well.
-        */
-       if (forw_packet->own &&
-           forw_packet->if_incoming == forw_packet->if_outgoing)
-               batadv_schedule_bat_ogm(forw_packet->if_incoming);
-
-out:
-       /* don't count own packet */
-       if (!forw_packet->own)
-               atomic_inc(&bat_priv->batman_queue_left);
-
-       batadv_forw_packet_free(forw_packet);
-}
-
 void
 batadv_purge_outstanding_packets(struct batadv_priv *bat_priv,
                                 const struct batadv_hard_iface *hard_iface)