)]}'
{
  "commit": "d003922dab6a66027344a787e9846ecf35a706a8",
  "tree": "1fa27e13eafd7d2cfceaeeb7c70009e29467ccfa",
  "parents": [
    "68d2413bec7e1d97e906eafb05e78d925a5ca128"
  ],
  "author": {
    "name": "Henrique de Moraes Holschuh",
    "email": "hmh@hmh.eng.br",
    "time": "Thu Oct 09 21:49:33 2008 -0300"
  },
  "committer": {
    "name": "John W. Linville",
    "email": "linville@tuxdriver.com",
    "time": "Fri Oct 31 19:00:09 2008 -0400"
  },
  "message": "rfkill: add master_switch_mode and EPO lock to rfkill and rfkill-input\n\nAdd of software-based sanity to rfkill and rfkill-input so that it can\nreproduce what hardware-based EPO switches do, blocking all transmitters\nand locking down any further attempts to unblock them until the switch is\ndeactivated.\n\nrfkill-input is responsible for issuing the EPO control requests, like\nbefore.\n\nWhile an rfkill EPO is active, all transmitters are locked to one of the\nBLOCKED states and all attempts to change that through the rfkill API\n(userspace and kernel) will be either ignored or return -EPERM errors.\n\nThe lock will be released upon receipt of EV_SW SW_RFKILL_ALL ON by\nrfkill-input, or should modular rfkill-input be unloaded.\n\nThis makes rfkill and rfkill-input extend the operation of an existing\nwireless master kill switch to all wireless devices in the system, even\nthose that are not under hardware or firmware control.\n\nSince the above is the expected operational behavior for the master rfkill\nswitch, the EPO lock functionality is not optional.\n\nAlso, extend rfkill-input to allow for three different behaviors when it\nreceives an EV_SW SW_RFKILL_ALL ON input event.  The user can set which\nbehavior he wants through the master_switch_mode parameter:\n\nmaster_switch_mode \u003d 0: EV_SW SW_RFKILL_ALL ON just unlocks rfkill\ncontroller state changes (so that the rfkill userspace and kernel APIs can\nnow be used to change rfkill controller states again), but doesn\u0027t change\nany of their states (so they will all remain blocked).  This is the safest\nmode of operation, as it requires explicit operator action to re-enable a\ntransmitter.\n\nmaster_switch_mode \u003d 1: EV_SW SW_RFKILL_ALL ON causes rfkill-input to\nattempt to restore the system to the state before the last EV_SW\nSW_RFKILL_ALL OFF event, or to the default global states if no EV_SW\nSW_RFKILL_ALL OFF ever happened.   This is the recommended mode of\noperation for laptops.\n\nmaster_switch_mode \u003d 2: tries to unblock all rfkill controllers (i.e.\nenable all transmitters) when an EV_SW SW_RFKILL_ALL ON event is received.\nThis is the default mode of operation, as it mimics the previous behavior\nof rfkill-input.\n\nIn order to implement these features in a clean way, the entire event\nhandling of rfkill-input was refactored into a single worker function.\n\nProtection against input event DoS (repeatedly firing rfkill events for\nrfkill-input to process) was removed during the code refactoring.  It will\nbe added back in a future patch.\n\nNote that with these changes, rfkill-input doesn\u0027t need to explicitly\nhandle any radio types for which KEY_\u003cradio type\u003e or SW_\u003cradio type\u003e events\ndo not exist yet.\n\nCode to handle EV_SW SW_{WLAN,WWAN,BLUETOOTH,WIMAX,...} was added as it\nmight be needed in the future (and its implementation is not that obvious),\nbut is currently #ifdef\u0027d out to avoid wasting resources.\n\nSigned-off-by: Henrique de Moraes Holschuh \u003chmh@hmh.eng.br\u003e\nCc: Ivo van Doorn \u003cIvDoorn@gmail.com\u003e\nCc: Dmitry Torokhov \u003cdtor@mail.ru\u003e\nSigned-off-by: John W. Linville \u003clinville@tuxdriver.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b65f0799df485dfea9d0346a3d3ede5c7fc5afba",
      "old_mode": 33188,
      "old_path": "Documentation/rfkill.txt",
      "new_id": "4d3ee317a4a3e84181047ab417a3e2a88c4995bc",
      "new_mode": 33188,
      "new_path": "Documentation/rfkill.txt"
    },
    {
      "type": "modify",
      "old_id": "bfdade72e066f65c52a3bd82a70807b51de6a3f0",
      "old_mode": 33188,
      "old_path": "net/rfkill/rfkill-input.c",
      "new_id": "7706541f9f79d0c77fa39623e4e12fb436bb7753",
      "new_mode": 33188,
      "new_path": "net/rfkill/rfkill-input.c"
    },
    {
      "type": "modify",
      "old_id": "d1e03e85cbed5aecade1f3961d269c98aab10262",
      "old_mode": 33188,
      "old_path": "net/rfkill/rfkill-input.h",
      "new_id": "fe8df6b5b935f4b9a3848f646c3d074e906c22f6",
      "new_mode": 33188,
      "new_path": "net/rfkill/rfkill-input.h"
    },
    {
      "type": "modify",
      "old_id": "fdf87d2ab25e358ddf8e5d9aec29e5392a2cf432",
      "old_mode": 33188,
      "old_path": "net/rfkill/rfkill.c",
      "new_id": "e348eab756f340e2bca739eaf43b3f7a9ac0d0de",
      "new_mode": 33188,
      "new_path": "net/rfkill/rfkill.c"
    }
  ]
}
