int raw_state;
struct acpi_backend_data *priv_data = io_op->backend->data;
- raw_state = state & WIFI_STA; /* bit 0 */
- raw_state |= (state & BT_STA) << 0x1; /* bit 1 */
+ raw_state = !!(state & WIFI_STA); /* bit 0 */
+ raw_state |= !!(state & BT_STA) << 0x1; /* bit 1 */
dprintk("set_wireless raw_state: %x\n", raw_state);
if (retval < 0)
return retval;
+ dprintk("get_display raw_state: %x\n", raw_state);
+
/* Backend specific to backend-neutral conversion */
*state = (raw_state & LCD_CSTE) ? DISPLAY_LCD_ON : 0;
*state |= (raw_state & CRT_CSTE) ? DISPLAY_CRT_ON : 0;
return -EINVAL;
}
+ dprintk("set_display raw_state: %x\n", matched);
+
retval = omnibook_acpi_execute(priv_data->ec_handle, SET_DISPLAY_METHOD, &matched, NULL);
if (retval < 0)
return retval;
* Disable Acer support, acerhk module should provided better
support with a far more complete autodetection database
(see http://www2.informatik.hu-berlin.de/~tauber/acerhk/)
+* Fix and improve bluetooth handling for TSM30X class laptops
2.20060921 Mathieu Bérard <math_b@users.sourceforge.net>
* The minimal required kernel version is now 2.6.9 (kref API)
if ((retval = nbsmi_smi_read_command(&aerial_op, &data)))
goto out;
+ dprintk("get_wireless (kill switch) raw_state: %x\n", data);
+
*state = data ? KILLSWITCH : 0;
aerial_op.read_addr = SMI_GET_AERIAL;
if ((retval = nbsmi_smi_read_command(&aerial_op, &data)))
goto out;
+ dprintk("get_wireless (aerial) raw_state: %x\n", data);
+
*state |= (data & WLEX_MASK) ? WIFI_EX : 0;
*state |= (data & WLAT_MASK) ? WIFI_STA : 0;
*state |= (data & BTEX_MASK) ? BT_EX : 0;
static int omnibook_nbsmi_set_wireless(const struct omnibook_operation *io_op, unsigned int state)
{
int retval = 0;
- u8 data = 0;
+ u8 data;
struct omnibook_operation aerial_op;
aerial_op.write_addr = SMI_SET_AERIAL;
- data |= state & BT_STA;
- data |= (state & WIFI_STA) << 0x1;
+ data = !!(state & BT_STA);
+ data |= !!(state & WIFI_STA) << 0x1;
+
+ dprintk("set_wireless raw_state: %x\n", data);
retval = nbsmi_smi_write_command(&aerial_op, data);
if (retval < 0)
return retval;
+ dprintk("get_hotkeys raw_state: %x\n", data);
+
*state = (data & SMI_FN_KEYS_MASK) ? HKEY_FN : 0;
*state |= (data & SMI_STICK_KEYS_MASK) ? HKEY_STICK : 0;
*state |= (data & SMI_FN_TWICE_LOCK_MASK) ? HKEY_TWICE_LOCK : 0;
data |= (state & HKEY_TWICE_LOCK) ? SMI_FN_TWICE_LOCK_MASK : 0;
data |= (state & HKEY_DOCK) ? SMI_FN_DOCK_MASK : 0;
+ dprintk("set_hotkeys (Fn interface) raw_state: %x\n", data);
+
retval = nbsmi_smi_write_command(&hotkeys_op, data);
if (retval < 0)
return retval;
hotkeys_op.write_addr = SMI_SET_FN_F5_INTERFACE;
data = !!(state & HKEY_FNF5);
+ dprintk("set_hotkeys (Fn F5) raw_state: %x\n", data);
+
retval = nbsmi_smi_write_command(&hotkeys_op, data);
if (retval < 0)
return retval;