aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2015-06-21 04:39:26 -0400
committerDarren Hart <dvhart@linux.intel.com>2015-06-22 14:05:28 -0400
commitf992efbb0326ddf57c9d2f759c44a3339ab56a76 (patch)
treec316b460fd280831f708861b7a5c7c6e4d823c09 /drivers/platform
parent5ee7041e5bc0fe8ba04a554dc2f9a18f709bc005 (diff)
dell-laptop: Update information about wireless control
Make sure that all existing SMBIOS calls for wireless control are properly documented. This commit also add new documentation released by Dell. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/dell-laptop.c158
1 files changed, 119 insertions, 39 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 83e3d7f9d923..ab89103150b5 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -423,45 +423,125 @@ static inline int dell_smi_error(int value)
423 } 423 }
424} 424}
425 425
426/* Derived from information in DellWirelessCtl.cpp: 426/*
427 Class 17, select 11 is radio control. It returns an array of 32-bit values. 427 * Derived from information in smbios-wireless-ctl:
428 428 *
429 Input byte 0 = 0: Wireless information 429 * cbSelect 17, Value 11
430 430 *
431 result[0]: return code 431 * Return Wireless Info
432 result[1]: 432 * cbArg1, byte0 = 0x00
433 Bit 0: Hardware switch supported 433 *
434 Bit 1: Wifi locator supported 434 * cbRes1 Standard return codes (0, -1, -2)
435 Bit 2: Wifi is supported 435 * cbRes2 Info bit flags:
436 Bit 3: Bluetooth is supported 436 *
437 Bit 4: WWAN is supported 437 * 0 Hardware switch supported (1)
438 Bit 5: Wireless keyboard supported 438 * 1 WiFi locator supported (1)
439 Bits 6-7: Reserved 439 * 2 WLAN supported (1)
440 Bit 8: Wifi is installed 440 * 3 Bluetooth (BT) supported (1)
441 Bit 9: Bluetooth is installed 441 * 4 WWAN supported (1)
442 Bit 10: WWAN is installed 442 * 5 Wireless KBD supported (1)
443 Bits 11-15: Reserved 443 * 6 Uw b supported (1)
444 Bit 16: Hardware switch is on 444 * 7 WiGig supported (1)
445 Bit 17: Wifi is blocked 445 * 8 WLAN installed (1)
446 Bit 18: Bluetooth is blocked 446 * 9 BT installed (1)
447 Bit 19: WWAN is blocked 447 * 10 WWAN installed (1)
448 Bits 20-31: Reserved 448 * 11 Uw b installed (1)
449 result[2]: NVRAM size in bytes 449 * 12 WiGig installed (1)
450 result[3]: NVRAM format version number 450 * 13-15 Reserved (0)
451 451 * 16 Hardware (HW) switch is On (1)
452 Input byte 0 = 2: Wireless switch configuration 452 * 17 WLAN disabled (1)
453 result[0]: return code 453 * 18 BT disabled (1)
454 result[1]: 454 * 19 WWAN disabled (1)
455 Bit 0: Wifi controlled by switch 455 * 20 Uw b disabled (1)
456 Bit 1: Bluetooth controlled by switch 456 * 21 WiGig disabled (1)
457 Bit 2: WWAN controlled by switch 457 * 20-31 Reserved (0)
458 Bits 3-6: Reserved 458 *
459 Bit 7: Wireless switch config locked 459 * cbRes3 NVRAM size in bytes
460 Bit 8: Wifi locator enabled 460 * cbRes4, byte 0 NVRAM format version number
461 Bits 9-14: Reserved 461 *
462 Bit 15: Wifi locator setting locked 462 *
463 Bits 16-31: Reserved 463 * Set QuickSet Radio Disable Flag
464*/ 464 * cbArg1, byte0 = 0x01
465 * cbArg1, byte1
466 * Radio ID value:
467 * 0 Radio Status
468 * 1 WLAN ID
469 * 2 BT ID
470 * 3 WWAN ID
471 * 4 UWB ID
472 * 5 WIGIG ID
473 * cbArg1, byte2 Flag bits:
474 * 0 QuickSet disables radio (1)
475 * 1-7 Reserved (0)
476 *
477 * cbRes1 Standard return codes (0, -1, -2)
478 * cbRes2 QuickSet (QS) radio disable bit map:
479 * 0 QS disables WLAN
480 * 1 QS disables BT
481 * 2 QS disables WWAN
482 * 3 QS disables UWB
483 * 4 QS disables WIGIG
484 * 5-31 Reserved (0)
485 *
486 * Wireless Switch Configuration
487 * cbArg1, byte0 = 0x02
488 *
489 * cbArg1, byte1
490 * Subcommand:
491 * 0 Get config
492 * 1 Set config
493 * 2 Set WiFi locator enable/disable
494 * cbArg1,byte2
495 * Switch settings (if byte 1==1):
496 * 0 WLAN sw itch control (1)
497 * 1 BT sw itch control (1)
498 * 2 WWAN sw itch control (1)
499 * 3 UWB sw itch control (1)
500 * 4 WiGig sw itch control (1)
501 * 5-7 Reserved (0)
502 * cbArg1, byte2 Enable bits (if byte 1==2):
503 * 0 Enable WiFi locator (1)
504 *
505 * cbRes1 Standard return codes (0, -1, -2)
506 * cbRes2 QuickSet radio disable bit map:
507 * 0 WLAN controlled by sw itch (1)
508 * 1 BT controlled by sw itch (1)
509 * 2 WWAN controlled by sw itch (1)
510 * 3 UWB controlled by sw itch (1)
511 * 4 WiGig controlled by sw itch (1)
512 * 5-6 Reserved (0)
513 * 7 Wireless sw itch config locked (1)
514 * 8 WiFi locator enabled (1)
515 * 9-14 Reserved (0)
516 * 15 WiFi locator setting locked (1)
517 * 16-31 Reserved (0)
518 *
519 * Read Local Config Data (LCD)
520 * cbArg1, byte0 = 0x10
521 * cbArg1, byte1 NVRAM index low byte
522 * cbArg1, byte2 NVRAM index high byte
523 * cbRes1 Standard return codes (0, -1, -2)
524 * cbRes2 4 bytes read from LCD[index]
525 * cbRes3 4 bytes read from LCD[index+4]
526 * cbRes4 4 bytes read from LCD[index+8]
527 *
528 * Write Local Config Data (LCD)
529 * cbArg1, byte0 = 0x11
530 * cbArg1, byte1 NVRAM index low byte
531 * cbArg1, byte2 NVRAM index high byte
532 * cbArg2 4 bytes to w rite at LCD[index]
533 * cbArg3 4 bytes to w rite at LCD[index+4]
534 * cbArg4 4 bytes to w rite at LCD[index+8]
535 * cbRes1 Standard return codes (0, -1, -2)
536 *
537 * Populate Local Config Data from NVRAM
538 * cbArg1, byte0 = 0x12
539 * cbRes1 Standard return codes (0, -1, -2)
540 *
541 * Commit Local Config Data to NVRAM
542 * cbArg1, byte0 = 0x13
543 * cbRes1 Standard return codes (0, -1, -2)
544 */
465 545
466static int dell_rfkill_set(void *data, bool blocked) 546static int dell_rfkill_set(void *data, bool blocked)
467{ 547{