#include <linux/debugfs.h>
#include <linux/kstrtox.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include "smp.h"
#include "hci_debugfs.h"
#define DEFINE_QUIRK_ATTRIBUTE(__name, __quirk) … \
#define DEFINE_INFO_ATTRIBUTE(__name, __field) …
static int features_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int device_id_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int device_list_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int blacklist_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int blocked_keys_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int uuids_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int remote_oob_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int conn_info_min_age_set(void *data, u64 val)
{ … }
static int conn_info_min_age_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int conn_info_max_age_set(void *data, u64 val)
{ … }
static int conn_info_max_age_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static ssize_t use_debug_keys_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations use_debug_keys_fops = …;
static ssize_t sc_only_mode_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations sc_only_mode_fops = …;
DEFINE_INFO_ATTRIBUTE(…) …;
DEFINE_INFO_ATTRIBUTE(…) …;
void hci_debugfs_create_common(struct hci_dev *hdev)
{ … }
static int inquiry_cache_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int link_keys_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int dev_class_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int voice_setting_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static ssize_t ssp_debug_mode_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations ssp_debug_mode_fops = …;
static int auto_accept_delay_set(void *data, u64 val)
{ … }
static int min_encrypt_key_size_set(void *data, u64 val)
{ … }
static int min_encrypt_key_size_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int auto_accept_delay_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static ssize_t force_bredr_smp_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t force_bredr_smp_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations force_bredr_smp_fops = …;
static int idle_timeout_set(void *data, u64 val)
{ … }
static int idle_timeout_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int sniff_min_interval_set(void *data, u64 val)
{ … }
static int sniff_min_interval_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int sniff_max_interval_set(void *data, u64 val)
{ … }
static int sniff_max_interval_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
void hci_debugfs_create_bredr(struct hci_dev *hdev)
{ … }
static int identity_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int rpa_timeout_set(void *data, u64 val)
{ … }
static int rpa_timeout_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int random_address_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int static_address_show(struct seq_file *f, void *p)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static ssize_t force_static_address_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t force_static_address_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations force_static_address_fops = …;
static int white_list_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int resolv_list_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int identity_resolving_keys_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int long_term_keys_show(struct seq_file *f, void *ptr)
{ … }
DEFINE_SHOW_ATTRIBUTE(…);
static int conn_min_interval_set(void *data, u64 val)
{ … }
static int conn_min_interval_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int conn_max_interval_set(void *data, u64 val)
{ … }
static int conn_max_interval_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int conn_latency_set(void *data, u64 val)
{ … }
static int conn_latency_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int supervision_timeout_set(void *data, u64 val)
{ … }
static int supervision_timeout_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int adv_channel_map_set(void *data, u64 val)
{ … }
static int adv_channel_map_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int adv_min_interval_set(void *data, u64 val)
{ … }
static int adv_min_interval_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int adv_max_interval_set(void *data, u64 val)
{ … }
static int adv_max_interval_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int min_key_size_set(void *data, u64 val)
{ … }
static int min_key_size_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int max_key_size_set(void *data, u64 val)
{ … }
static int max_key_size_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static int auth_payload_timeout_set(void *data, u64 val)
{ … }
static int auth_payload_timeout_get(void *data, u64 *val)
{ … }
DEFINE_DEBUGFS_ATTRIBUTE(…);
static ssize_t force_no_mitm_read(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t force_no_mitm_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations force_no_mitm_fops = …;
DEFINE_QUIRK_ATTRIBUTE(…);
DEFINE_QUIRK_ATTRIBUTE(…);
void hci_debugfs_create_le(struct hci_dev *hdev)
{ … }
void hci_debugfs_create_conn(struct hci_conn *conn)
{ … }
static ssize_t dut_mode_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t dut_mode_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations dut_mode_fops = …;
static ssize_t vendor_diag_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static ssize_t vendor_diag_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations vendor_diag_fops = …;
void hci_debugfs_create_basic(struct hci_dev *hdev)
{ … }