/* * NOTE: rbtn controls all radio devices, not only WLAN * but rfkill interface does not support "ANY" type * so "WLAN" type is used
*/
rbtn_data->rfkill = rfkill_alloc("dell-rbtn", &device->dev,
RFKILL_TYPE_WLAN, &rbtn_ops, device); if (!rbtn_data->rfkill) return -ENOMEM;
ret = rfkill_register(rbtn_data->rfkill); if (ret) {
rfkill_destroy(rbtn_data->rfkill);
rbtn_data->rfkill = NULL; return ret;
}
/* * This driver can also handle the "DELLABC6" device that * appears on the XPS 13 9350, but that device is disabled by * the DSDT unless booted with acpi_osi="!Windows 2012" * acpi_osi="!Windows 2013". * * According to Mario at Dell: * * DELLABC6 is a custom interface that was created solely to * have airplane mode support for Windows 7. For Windows 10 * the proper interface is to use that which is handled by * intel-hid. A OEM airplane mode driver is not used. * * Since the kernel doesn't identify as Windows 7 it would be * incorrect to do attempt to use that interface. * * Even if we override _OSI and bind to DELLABC6, we end up with * inconsistent behavior in which userspace can get out of sync * with the rfkill state as it conflicts with events from * intel-hid. * * The upshot is that it is better to just ignore DELLABC6 * devices.
*/
/* * Upon resume, some BIOSes send an ACPI notification thet triggers * an unwanted input event. In order to ignore it, we use a flag * that we set at suspend and clear once we have received the extra * ACPI notification. Since ACPI notifications are delivered * asynchronously to drivers, we clear the flag from the workqueue * used to deliver the notifications. This should be enough * to have the flag cleared only after we received the extra * notification, if any.
*/
status = acpi_os_execute(OSL_NOTIFY_HANDLER,
rbtn_clear_suspended_flag, rbtn_data); if (ACPI_FAILURE(status))
rbtn_clear_suspended_flag(rbtn_data);
switch (rbtn_data->type) { case RBTN_TOGGLE:
ret = rbtn_input_init(rbtn_data); break; case RBTN_SLIDER: if (auto_remove_rfkill && rbtn_chain_head.head)
ret = 0; else
ret = rbtn_rfkill_init(device); break; default:
ret = -EINVAL; break;
} if (ret)
rbtn_acquire(device, false);
/* * Some BIOSes send a notification at resume. * Ignore it to prevent unwanted input events.
*/ if (rbtn_data->suspended) {
dev_dbg(&device->dev, "ACPI notification ignored\n"); return;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.