)]}'
{
  "commit": "58905ca5b11a0ff3860f55b789cbbf052f7158a7",
  "tree": "7c7a4c937130855dfef41c2302deb7fb0b5a2eb7",
  "parents": [
    "02018b39a75057541c7946a9173561d1a76a0bfe"
  ],
  "author": {
    "name": "Johannes Berg",
    "email": "johannes@sipsolutions.net",
    "time": "Thu May 07 14:23:01 2009 +0200"
  },
  "committer": {
    "name": "John W. Linville",
    "email": "linville@tuxdriver.com",
    "time": "Mon May 11 15:23:54 2009 -0400"
  },
  "message": "mac80211: fix scan channel race\n\nWhen a software scan starts, it first sets sw_scanning, but\nleaves the scan_channel \"unset\" (it currently actually gets\ninitialised to a default). Now, when something else tries\nto (re)configure the hardware in the window between these two\nevents (after sw_scanning \u003d true, but before scan_channel is\nset), the current code switches to the (unset!) scan_channel.\nThis causes trouble, especially when switching bands and\nsending frames on the wrong channel.\n\nTo work around this, leave scan_channel initialised to NULL\nand use it to determine whether or not a switch to a different\nchannel should occur (and also use the same condition to check\nwhether to adjust power for scan or not).\n\nAdditionally, avoid reconfiguring the hardware completely when\nrecalculating idle resulted in no changes, this was the problem\nthat originally led us to discover the race condition in the\nfirst place, which was helpfully bisected by Pavel. This part\nof the patch should not be necessary with the other fixes, but\nnot calling the ieee80211_hw_config function when we know it to\nbe unnecessary is certainly a correct thing to do.\n\nUnfortunately, this patch cannot and does not fix the race\ncondition completely, but due to the way the scan code is\nstructured it makes the particular problem Pavel discovered\n(race while changing channel at the same time as transmitting\nframes) go away. To fix it completely, more work especially\nwith locking configuration is needed.\n\nBisected-by: Pavel Roskin \u003cproski@gnu.org\u003e\nSigned-off-by: Johannes Berg \u003cjohannes@sipsolutions.net\u003e\nSigned-off-by: John W. Linville \u003clinville@tuxdriver.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b6daf0219f4bb3a0d99ed1a68a484fcda754cd3",
      "old_mode": 33188,
      "old_path": "net/mac80211/iface.c",
      "new_id": "8c9f1c722cdb2921a99c27f786f945e36aea750e",
      "new_mode": 33188,
      "new_path": "net/mac80211/iface.c"
    },
    {
      "type": "modify",
      "old_id": "b80bc80e46cf9822417107128440b99955b21397",
      "old_mode": 33188,
      "old_path": "net/mac80211/main.c",
      "new_id": "76df5eabf268e05c4369c06bff6cea45805b78c6",
      "new_mode": 33188,
      "new_path": "net/mac80211/main.c"
    },
    {
      "type": "modify",
      "old_id": "c99ef8d04d3df6fc0e79588eed87526a74a6f34e",
      "old_mode": 33188,
      "old_path": "net/mac80211/scan.c",
      "new_id": "e51b99b1473c6c7422ff7b39bca055be2d82741f",
      "new_mode": 33188,
      "new_path": "net/mac80211/scan.c"
    }
  ]
}
