aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/batman-adv/translation-table.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2009-12-12 23:39:41 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-03 16:42:29 -0800
commitbad2239e87d73fd999a9c5d5efa5024b16046c6c (patch)
tree17cd4a7f9a6f20cbde6e494d903e392561dddf00 /drivers/staging/batman-adv/translation-table.c
parentStaging: asus_oled: Add defines for asus vendor_id and device_id to be consistent with hid-ids.h (diff)
downloadlinux-dev-bad2239e87d73fd999a9c5d5efa5024b16046c6c.tar.xz
linux-dev-bad2239e87d73fd999a9c5d5efa5024b16046c6c.zip
Staging: batman-adv: replace internal logging mechanism.
batman-adv used its own logging infrastructure. Replace this with standard kernel logging, printk(), with compile time and runtime options to enable/disable different debug levels. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/translation-table.c')
-rw-r--r--drivers/staging/batman-adv/translation-table.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c
index c2190e177c56..c7122da98f1e 100644
--- a/drivers/staging/batman-adv/translation-table.c
+++ b/drivers/staging/batman-adv/translation-table.c
@@ -21,7 +21,6 @@
#include "main.h"
#include "translation-table.h"
-#include "log.h"
#include "soft-interface.h"
#include "types.h"
#include "hash.h"
@@ -82,12 +81,12 @@ void hna_local_add(uint8_t *addr)
MAC-flooding. */
if ((num_hna + 1 > (ETH_DATA_LEN - BAT_PACKET_LEN) / ETH_ALEN) ||
(num_hna + 1 > 255)) {
- debug_log(LOG_TYPE_ROUTES, "Can't add new local hna entry (%s): number of local hna entries exceeds packet size \n", hna_str);
+ bat_dbg(DBG_ROUTES, "Can't add new local hna entry (%s): number of local hna entries exceeds packet size \n", hna_str);
return;
}
- debug_log(LOG_TYPE_ROUTES, "Creating new local hna entry: %s \n",
- hna_str);
+ bat_dbg(DBG_ROUTES, "Creating new local hna entry: %s \n",
+ hna_str);
hna_local_entry = kmalloc(sizeof(struct hna_local_entry), GFP_ATOMIC);
if (!hna_local_entry)
@@ -113,7 +112,7 @@ void hna_local_add(uint8_t *addr)
hna_local_hash->size * 2);
if (swaphash == NULL)
- debug_log(LOG_TYPE_CRIT, "Couldn't resize local hna hash table \n");
+ printk(KERN_ERR "batman-adv:Couldn't resize local hna hash table \n");
else
hna_local_hash = swaphash;
}
@@ -205,8 +204,8 @@ static void hna_local_del(struct hna_local_entry *hna_local_entry,
char hna_str[ETH_STR_LEN];
addr_to_string(hna_str, hna_local_entry->addr);
- debug_log(LOG_TYPE_ROUTES, "Deleting local hna entry (%s): %s \n",
- hna_str, message);
+ bat_dbg(DBG_ROUTES, "Deleting local hna entry (%s): %s \n",
+ hna_str, message);
hash_remove(hna_local_hash, hna_local_entry->addr);
_hna_local_del(hna_local_entry);
@@ -291,7 +290,9 @@ void hna_global_add_orig(struct orig_node *orig_node,
memcpy(hna_global_entry->addr, hna_ptr, ETH_ALEN);
addr_to_string(hna_str, hna_global_entry->addr);
- debug_log(LOG_TYPE_ROUTES, "Creating new global hna entry: %s (via %s)\n", hna_str, orig_str);
+ bat_dbg(DBG_ROUTES,
+ "Creating new global hna entry: %s (via %s)\n",
+ hna_str, orig_str);
spin_lock_irqsave(&hna_global_hash_lock, flags);
hash_add(hna_global_hash, hna_global_entry);
@@ -333,7 +334,7 @@ void hna_global_add_orig(struct orig_node *orig_node,
hna_global_hash->size * 2);
if (swaphash == NULL)
- debug_log(LOG_TYPE_CRIT, "Couldn't resize global hna hash table \n");
+ printk(KERN_ERR "batman-adv:Couldn't resize global hna hash table \n");
else
hna_global_hash = swaphash;
}
@@ -386,7 +387,8 @@ void _hna_global_del_orig(struct hna_global_entry *hna_global_entry,
addr_to_string(orig_str, hna_global_entry->orig_node->orig);
addr_to_string(hna_str, hna_global_entry->addr);
- debug_log(LOG_TYPE_ROUTES, "Deleting global hna entry %s (via %s): %s \n", hna_str, orig_str, message);
+ bat_dbg(DBG_ROUTES, "Deleting global hna entry %s (via %s): %s \n",
+ hna_str, orig_str, message);
hash_remove(hna_global_hash, hna_global_entry->addr);
kfree(hna_global_entry);