1. 10 6月, 2016 1 次提交
    • R
      brcmfmac: rework function picking free BSS index · d02fb8f1
      Rafał Miłecki 提交于
      The old implementation was overcomplicated and slightly bugged in some
      corner cases.
      
      Consider following state of BSS-es (limited to 6 for simplification):
      drvr->iflist[0]: { bsscfgidx:0, ndev->name:wlan1, }
      drvr->iflist[1]:  (null)
      drvr->iflist[2]: { bsscfgidx:2, ndev->name:wlan1-1, }
      drvr->iflist[3]: { bsscfgidx:3, ndev->name:wlan1-2, }
      drvr->iflist[4]:  (null)
      drvr->iflist[5]:  (null)
      In such case the next AP interface should bsscfgidx 4 (we don't use 1 as
      it's reserved for P2P).
      
      With old code the loop iterations were following:
      [ifidx = 0] [bsscfgidx = 2] [highest = 2]
      [ifidx = 1] [bsscfgidx = 2] [highest = 2] available = true
      [ifidx = 2] [bsscfgidx = 2] [highest = 2] bsscfgidx = highest + 1
      [ifidx = 3] [bsscfgidx = 3] [highest = 2] bsscfgidx = highest + 1
      [ifidx = 4] [bsscfgidx = 3] [highest = 2] available = true
      [ifidx = 5] [bsscfgidx = 3] [highest = 2] available = true
      There were 2 obvious problems:
      1) Having empty BSS at index 1 was resulting in available being always
         set to true, even if we would run out of BSS-es.
      2) Calculated bsscfgidx was invalid (3 instead of 4) resulting in driver
         not being able to create the 4th AP interface.
      
      New code is simpler, placed in file where it's really used, handles
      running out of free BSS-es and allows using 4 interfaces at the same
      time. It also looks for the first free BSS instead of one after the last
      in use. It works well with current driver (which doesn't allow deleting
      interfaces) and should be future proof (if we ever allow deleting).
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      d02fb8f1
  2. 26 4月, 2016 1 次提交
  3. 14 4月, 2016 1 次提交
  4. 12 4月, 2016 1 次提交
  5. 07 3月, 2016 11 次提交
  6. 06 2月, 2016 1 次提交
  7. 08 1月, 2016 4 次提交
  8. 07 1月, 2016 4 次提交
  9. 11 12月, 2015 7 次提交
  10. 30 11月, 2015 4 次提交
  11. 26 11月, 2015 3 次提交
  12. 18 11月, 2015 1 次提交
  13. 21 10月, 2015 1 次提交