diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /drivers/net/wireless/eagle/esp_debug.h | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'drivers/net/wireless/eagle/esp_debug.h')
-rwxr-xr-x | drivers/net/wireless/eagle/esp_debug.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/drivers/net/wireless/eagle/esp_debug.h b/drivers/net/wireless/eagle/esp_debug.h new file mode 100755 index 00000000..7f198924 --- /dev/null +++ b/drivers/net/wireless/eagle/esp_debug.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2011 Espressif System. + * + */ + +#ifndef _DEBUG_H_ + +#define assert(v) BUG_ON(!(v)) + +#define ASSERT(v) BUG_ON(!(v)) + +#include <linux/slab.h> +#include <linux/debugfs.h> +#include <asm/uaccess.h> + +typedef enum esp_type { + ESP_BOOL, + ESP_U8, + ESP_U16, + ESP_U32, + ESP_U64 +} esp_type; + +struct dentry *esp_dump_var(const char *name, struct dentry *parent, void *value, esp_type type); + +struct dentry *esp_dump_array(const char *name, struct dentry *parent, struct debugfs_blob_wrapper *blob); + +struct dentry *esp_dump(const char *name, struct dentry *parent, void *data, int size); + +struct dentry *esp_debugfs_add_sub_dir(const char *name); + +int esp_debugfs_init(void); + +void esp_debugfs_exit(void); + +enum { + ESP_DBG_ERROR = BIT(0), + ESP_DBG_TRACE = BIT(1), + ESP_DBG_LOG = BIT(2), + ESP_DBG = BIT(3), + ESP_SHOW = BIT(4), + ESP_DBG_TXAMPDU = BIT(5), + ESP_DBG_OP = BIT(6), + ESP_DBG_PS = BIT(7), + ESP_DBG_ALL = 0xffffffff +}; + +extern unsigned int esp_msg_level; + +#ifdef ESP_ANDROID_LOGGER +extern bool log_off; +#endif /* ESP_ANDROID_LOGGER */ + +#if defined(ANDROID) && defined(ESP_ANDROID_LOGGER) +#include "esp_android.h" +#define esp_dbg(mask, fmt, args...) do { \ + if (esp_msg_level & mask) \ + { \ + if (log_off) \ + printk(fmt, ##args); \ + else \ + logger_write(4, "esp_wifi", fmt, ##args); \ + } \ + } while (0) +#else +#define esp_dbg(mask, fmt, args...) do { \ + if (esp_msg_level & mask) \ + printk(fmt, ##args); \ + } while (0) +#endif /* ANDROID && ESP_ANDROID_LOGGER */ + +void show_buf(u8 *buf, u32 len); + +#ifdef HOST_RC +struct sip_rc_status; +struct ieee80211_tx_rate; + +void esp_show_rcstatus(struct sip_rc_status *rcstatus); + +void esp_show_tx_rates(struct ieee80211_tx_rate *rates); +#endif /* HOST_RC */ + +#endif /* _DEBUG_H_ */ |