0010-NOTFORMERGE-ec-lenovo-h8-wlan-trackpoint-touchpad-bl.patch 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. From 7786aea5d38e6e132a259c2a00cf75f493fc12fd Mon Sep 17 00:00:00 2001
  2. From: Francis Rowe <info@gluglug.org.uk>
  3. Date: Mon, 13 Oct 2014 00:14:53 +0100
  4. Subject: [PATCH 10/17] NOTFORMERGE: ec/lenovo/h8:
  5. wlan/trackpoint/touchpad/bluetooth/wwan
  6. Permanently enable them.
  7. Change-Id: Ic76ab9ab9c865f30312378e18af58bece6c3260a
  8. Signed-off-by: Francis Rowe <info@gluglug.org.uk>
  9. ---
  10. src/ec/lenovo/h8/h8.c | 21 +++++++++++----------
  11. src/ec/lenovo/pmh7/pmh7.c | 11 ++++-------
  12. 2 files changed, 15 insertions(+), 17 deletions(-)
  13. diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
  14. index 46480f4..b6bc406 100644
  15. --- a/src/ec/lenovo/h8/h8.c
  16. +++ b/src/ec/lenovo/h8/h8.c
  17. @@ -252,9 +252,11 @@ static void h8_enable(struct device *dev)
  18. ec_write(H8_FAN_CONTROL, H8_FAN_CONTROL_AUTO);
  19. - if (get_option(&val, "wlan") != CB_SUCCESS)
  20. - val = 1;
  21. - h8_wlan_enable(val);
  22. + // Permanently enable wifi
  23. + // Intel wifi could be a security risk because it uses firmware. Wlan chip has DMA
  24. + // and could leak data over a side-channel. Using another manufacturer is recommended.
  25. + // see http://libreboot.org/docs/index.html#recommended_wifi
  26. + h8_wlan_enable(1);
  27. h8_trackpoint_enable(1);
  28. h8_usb_power_enable(1);
  29. @@ -262,14 +264,13 @@ static void h8_enable(struct device *dev)
  30. if (get_option(&val, "volume") == CB_SUCCESS)
  31. ec_write(H8_VOLUME_CONTROL, val);
  32. - if (get_option(&val, "bluetooth") != CB_SUCCESS)
  33. - val = 1;
  34. - h8_bluetooth_enable(val);
  35. -
  36. - if (get_option(&val, "wwan") != CB_SUCCESS)
  37. - val = 1;
  38. + // Permanently enable bluetooth.
  39. + // NOTE: bluetooth is a potential security risk. Physical removal of the bluetooth module is recommended.
  40. + h8_bluetooth_enable(1);
  41. - h8_wwan_enable(val);
  42. + // Permanently enable wwan.
  43. + // NOTE: wwan is a security risk (remove access plus DMA). Physical removal of both the wwan and sim card is recommended.
  44. + h8_wwan_enable(1);
  45. if (conf->has_uwb) {
  46. if (get_option(&val, "uwb") != CB_SUCCESS)
  47. diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c
  48. index cc6e891..38aef16 100644
  49. --- a/src/ec/lenovo/pmh7/pmh7.c
  50. +++ b/src/ec/lenovo/pmh7/pmh7.c
  51. @@ -106,7 +106,6 @@ static void enable_dev(struct device *dev)
  52. {
  53. struct ec_lenovo_pmh7_config *conf = dev->chip_info;
  54. struct resource *resource;
  55. - u8 val;
  56. resource = new_resource(dev, EC_LENOVO_PMH7_INDEX);
  57. resource->flags = IORESOURCE_IO | IORESOURCE_FIXED;
  58. @@ -118,13 +117,11 @@ static void enable_dev(struct device *dev)
  59. pmh7_backlight_enable(conf->backlight_enable);
  60. pmh7_dock_event_enable(conf->dock_event_enable);
  61. - if (get_option(&val, "touchpad") != CB_SUCCESS)
  62. - val = 1;
  63. - pmh7_touchpad_enable(val);
  64. + // Permanently enable touchpad
  65. + pmh7_touchpad_enable(1);
  66. - if (get_option(&val, "trackpoint") != CB_SUCCESS)
  67. - val = 1;
  68. - pmh7_trackpoint_enable(val);
  69. + // Permanently enable trackpoint
  70. + pmh7_trackpoint_enable(1);
  71. }
  72. struct chip_operations ec_lenovo_pmh7_ops = {
  73. --
  74. 1.9.1