1. 16 May, 2013 2 commits
    • Johannes Berg's avatar
      cfg80211: fix interface down/disconnect state handling · 2430816b
      Johannes Berg authored
      When the interface goes down, there's no need to call
      cfg80211_mlme_down() after __cfg80211_disconnect() as
      the latter will call the former (if appropriate.)
      
      Also, in __cfg80211_disconnect(), if the cfg80211 SME
      isn't used, __cfg80211_disconnected() may still need
      to be called (depending on the current state) so that
      the SME state gets cleared.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      2430816b
    • Johannes Berg's avatar
      cfg80211: fix wiphy_register error path · 03cd7e4e
      Johannes Berg authored
      If rfkill_register() fails in wiphy_register() the struct device
      is unregistered but everything else isn't (regulatory, debugfs)
      and we even leave the wiphy instance on all internal lists even
      though it will likely be freed soon, which is clearly a problem.
      Fix this by cleaning up properly.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      03cd7e4e
  2. 24 Mar, 2013 1 commit
    • Johannes Berg's avatar
      cfg80211: always check for scan end on P2P device · f9f47529
      Johannes Berg authored
      If a P2P device wdev is removed while it has a scan, then the
      scan completion might crash later as it is already freed by
      that time. To avoid the crash always check the scan completion
      when the P2P device is being removed for some reason. If the
      driver already canceled it, don't want and free it, otherwise
      warn and leak it to avoid later crashes.
      
      In order to do this, locking needs to be changed away from the
      rdev mutex (which can't always be guaranteed). For now, use
      the sched_scan_mtx instead, I'll rename it to just scan_mtx in
      a later patch.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f9f47529
  3. 20 Mar, 2013 1 commit
  4. 06 Mar, 2013 1 commit
    • Stanislaw Gruszka's avatar
      cfg80211/mac80211: disconnect on suspend · 81256969
      Stanislaw Gruszka authored
      If possible that after suspend, cfg80211 will receive request to
      disconnect what require action on interface that was removed during
      suspend.
      
      Problem can manifest itself by various warnings similar to below one:
      
      WARNING: at net/mac80211/driver-ops.h:12 ieee80211_bss_info_change_notify+0x2f9/0x300 [mac80211]()
      wlan0:  Failed check-sdata-in-driver check, flags: 0x4
      Call Trace:
       [<c043e0b3>] warn_slowpath_fmt+0x33/0x40
       [<f83707c9>] ieee80211_bss_info_change_notify+0x2f9/0x300 [mac80211]
       [<f83a660a>] ieee80211_recalc_ps_vif+0x2a/0x30 [mac80211]
       [<f83a6706>] ieee80211_set_disassoc+0xf6/0x500 [mac80211]
       [<f83a9441>] ieee80211_mgd_deauth+0x1f1/0x280 [mac80211]
       [<f8381b36>] ieee80211_deauth+0x16/0x20 [mac80211]
       [<f8261e70>] cfg80211_mlme_down+0x70/0xc0 [cfg80211]
       [<f8264de1>] __cfg80211_disconnect+0x1b1/0x1d0 [cfg80211]
      
      To fix the problem disconnect from any associated network before
      suspend. User space is responsible to establish connection again
      after resume. This basically need to be done by user space anyway,
      because associated stations can go away during suspend (for example
      NetworkManager disconnects on suspend and connect on resume by default).
      
      Patch also handle situation when driver refuse to suspend with wowlan
      configured and try to suspend again without it.
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      81256969
  5. 27 Feb, 2013 1 commit
  6. 15 Feb, 2013 2 commits
  7. 11 Feb, 2013 1 commit
  8. 25 Jan, 2013 1 commit
  9. 16 Jan, 2013 1 commit
  10. 11 Jan, 2013 1 commit
  11. 03 Jan, 2013 1 commit
  12. 05 Nov, 2012 1 commit
  13. 23 Oct, 2012 1 commit
  14. 18 Oct, 2012 3 commits
  15. 20 Aug, 2012 1 commit
    • Johannes Berg's avatar
      cfg80211: add P2P Device abstraction · 98104fde
      Johannes Berg authored
      In order to support using a different MAC address
      for the P2P Device address we must first have a
      P2P Device abstraction that can be assigned a MAC
      address.
      
      This abstraction will also be useful to support
      offloading P2P operations to the device, e.g.
      periodic listen for discoverability.
      
      Currently, the driver is responsible for assigning
      a MAC address to the P2P Device, but this could be
      changed by allowing a MAC address to be given to
      the NEW_INTERFACE command.
      
      As it has no associated netdev, a P2P Device can
      only be identified by its wdev identifier but the
      previous patches allowed using the wdev identifier
      in various APIs, e.g. remain-on-channel.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      98104fde
  16. 06 Aug, 2012 1 commit
  17. 17 Jul, 2012 3 commits
  18. 13 Jul, 2012 1 commit
    • Johannes Berg's avatar
      cfg80211: reduce monitor interface tracking · 4290cb4b
      Johannes Berg authored
      Revert commit b78e8cea
      ("cfg80211: track monitor channel") and remove the
      set_monitor_enabled() callback.
      
      Due to the tracking happening in NETDEV_PRE_UP, it had
      introduced bugs because the monitor interface callback
      would be called before the device was started. It looks
      like there's no way to fix this, and using NETDEV_PRE_UP
      is broken anyway (since there's no NETDEV_UP_FAIL), so
      remove all that code, track interfaces in NETDEV_UP and
      also stop tracking the monitor channel in cfg80211.
      
      This mostly reverts to before the tracking, except that
      we keep the interface count tracking so that setting the
      monitor channel can be rejected properly.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      4290cb4b
  19. 12 Jul, 2012 1 commit
  20. 09 Jul, 2012 2 commits
  21. 08 Jul, 2012 1 commit
  22. 04 Jul, 2012 1 commit
  23. 02 Jul, 2012 1 commit
  24. 29 Jun, 2012 6 commits
  25. 27 Jun, 2012 1 commit
  26. 20 Jun, 2012 1 commit
  27. 16 May, 2012 1 commit
  28. 16 Apr, 2012 1 commit
    • Johannes Berg's avatar
      cfg80211: enforce lack of interface combinations · 8e8b41f9
      Johannes Berg authored
      My grand plan to allow drivers to gradually move over
      to advertising virtual interface combinations and only
      enforce with drivers that do want it enforced doesn't
      seem to be working out, only Christian ever added the
      advertising (to carl9170), nobody else did.
      
      Begin enforcing combinations in cfg80211 so that users
      can rely on the information reported about a device.
      
      Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
      Cc: Jouni Malinen <jouni@qca.qualcomm.com>
      Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Jiri Slaby <jirislaby@gmail.com>
      Cc: Nick Kossifidis <mickflemm@gmail.com>
      Cc: Bob Copeland <me@bobcopeland.com>
      Cc: Bing Zhao <bzhao@marvell.com>
      Cc: Lennert Buytenhek <buytenh@wantstofly.org>
      Cc: Ivo van Doorn <IvDoorn@gmail.com>
      Cc: Gertjan van Wingerde <gwingerde@gmail.com>
      Cc: Helmut Schaa <helmut.schaa@googlemail.com>
      Cc: Luciano Coelho <coelho@ti.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      8e8b41f9