#define pr_fmt(fmt) …
#include <linux/acpi.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/mutex.h>
#include <linux/string_helpers.h>
#include <linux/types.h>
#include <linux/dmi.h>
#include <linux/wmi.h>
#include "firmware_attributes_class.h"
#include "think-lmi.h"
static bool debug_support;
module_param(debug_support, bool, 0444);
MODULE_PARM_DESC(…) …;
#define LENOVO_BIOS_SETTING_GUID …
#define LENOVO_SET_BIOS_SETTINGS_GUID …
#define LENOVO_SAVE_BIOS_SETTINGS_GUID …
#define LENOVO_BIOS_PASSWORD_SETTINGS_GUID …
#define LENOVO_SET_BIOS_PASSWORD_GUID …
#define LENOVO_GET_BIOS_SELECTIONS_GUID …
#define LENOVO_DEBUG_CMD_GUID …
#define LENOVO_OPCODE_IF_GUID …
#define LENOVO_SET_BIOS_CERT_GUID …
#define LENOVO_UPDATE_BIOS_CERT_GUID …
#define LENOVO_CLEAR_BIOS_CERT_GUID …
#define LENOVO_CERT_TO_PASSWORD_GUID …
#define LENOVO_SET_BIOS_SETTING_CERT_GUID …
#define LENOVO_SAVE_BIOS_SETTING_CERT_GUID …
#define LENOVO_CERT_THUMBPRINT_GUID …
#define TLMI_POP_PWD …
#define TLMI_PAP_PWD …
#define TLMI_HDD_PWD …
#define TLMI_SMP_PWD …
#define TLMI_CERT …
static const struct tlmi_err_codes tlmi_errs[] = …;
static const char * const encoding_options[] = …;
static const char * const level_options[] = …;
static struct think_lmi tlmi_priv;
static const struct class *fw_attr_class;
static DEFINE_MUTEX(tlmi_mutex);
static inline struct tlmi_pwd_setting *to_tlmi_pwd_setting(struct kobject *kobj)
{ … }
static inline struct tlmi_attr_setting *to_tlmi_attr_setting(struct kobject *kobj)
{ … }
static int tlmi_errstr_to_err(const char *errstr)
{ … }
static int tlmi_extract_error(const struct acpi_buffer *output)
{ … }
static int tlmi_simple_call(const char *guid, const char *arg)
{ … }
static int tlmi_extract_output_string(const struct acpi_buffer *output,
char **string)
{ … }
static int tlmi_get_pwd_settings(struct tlmi_pwdcfg *pwdcfg)
{ … }
static int tlmi_save_bios_settings(const char *password)
{ … }
static int tlmi_opcode_setting(char *setting, const char *value)
{ … }
static int tlmi_setting(int item, char **value, const char *guid_string)
{ … }
static int tlmi_get_bios_selections(const char *item, char **value)
{ … }
static ssize_t is_enabled_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static struct kobj_attribute auth_is_pass_set = …;
static ssize_t current_password_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_current_password = …;
static ssize_t new_password_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_new_password = …;
static ssize_t min_password_length_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static struct kobj_attribute auth_min_pass_length = …;
static ssize_t max_password_length_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static struct kobj_attribute auth_max_pass_length = …;
static ssize_t mechanism_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static struct kobj_attribute auth_mechanism = …;
static ssize_t encoding_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t encoding_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_encoding = …;
static ssize_t kbdlang_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t kbdlang_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_kbdlang = …;
static ssize_t role_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static struct kobj_attribute auth_role = …;
static ssize_t index_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t index_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_index = …;
static ssize_t level_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t level_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_level = …;
static ssize_t cert_thumbprint(char *buf, const char *arg, int count)
{ … }
static ssize_t certificate_thumbprint_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static struct kobj_attribute auth_cert_thumb = …;
static ssize_t cert_to_password_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_cert_to_password = …;
static ssize_t certificate_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_certificate = …;
static ssize_t signature_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_signature = …;
static ssize_t save_signature_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute auth_save_signature = …;
static umode_t auth_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static struct attribute *auth_attrs[] = …;
static const struct attribute_group auth_attr_group = …;
static ssize_t display_name_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t current_value_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{ … }
static ssize_t possible_values_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{ … }
static ssize_t type_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t current_value_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute attr_displ_name = …;
static struct kobj_attribute attr_possible_values = …;
static struct kobj_attribute attr_current_val = …;
static struct kobj_attribute attr_type = …;
static umode_t attr_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static struct attribute *tlmi_attrs[] = …;
static const struct attribute_group tlmi_attr_group = …;
static void tlmi_attr_setting_release(struct kobject *kobj)
{ … }
static void tlmi_pwd_setting_release(struct kobject *kobj)
{ … }
static const struct kobj_type tlmi_attr_setting_ktype = …;
static const struct kobj_type tlmi_pwd_setting_ktype = …;
static ssize_t pending_reboot_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static struct kobj_attribute pending_reboot = …;
static const char * const save_mode_strings[] = …;
static ssize_t save_settings_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t save_settings_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute save_settings = …;
static ssize_t debug_cmd_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute debug_cmd = …;
static void tlmi_release_attr(void)
{ … }
static int tlmi_validate_setting_name(struct kset *attribute_kset, char *name)
{ … }
static int tlmi_sysfs_init(void)
{ … }
static struct tlmi_pwd_setting *tlmi_create_auth(const char *pwd_type,
const char *pwd_role)
{ … }
static int tlmi_analyze(void)
{ … }
static void tlmi_remove(struct wmi_device *wdev)
{ … }
static int tlmi_probe(struct wmi_device *wdev, const void *context)
{ … }
static const struct wmi_device_id tlmi_id_table[] = …;
MODULE_DEVICE_TABLE(wmi, tlmi_id_table);
static struct wmi_driver tlmi_driver = …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
module_wmi_driver(…) …;