Skip to content
Snippets Groups Projects
  1. May 24, 2013
  2. Apr 22, 2013
  3. Mar 24, 2013
    • 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
  4. Mar 06, 2013
    • 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
    • Johannes Berg's avatar
      cfg80211: refactor association parameters · f62fab73
      Johannes Berg authored
      
      cfg80211_mlme_assoc() has grown far too many arguments,
      make the caller build almost all of the driver struct
      and pass that to the function instead.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f62fab73
    • Johannes Berg's avatar
      cfg80211: add ability to override VHT capabilities · ee2aca34
      Johannes Berg authored
      
      For testing it's sometimes useful to be able to
      override certain VHT capability advertisement,
      add the ability to do that in cfg80211.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      ee2aca34
  5. Feb 15, 2013
  6. Feb 13, 2013
  7. Feb 11, 2013
    • Johannes Berg's avatar
      cfg80211: track hidden SSID networks properly · 776b3580
      Johannes Berg authored
      
      Currently, cfg80211 will copy beacon IEs from a previously
      received hidden SSID beacon to a probe response entry, if
      that entry is created after the beacon entry. However, if
      it is the other way around, or if the beacon is updated,
      such changes aren't propagated.
      
      Fix this by tracking the relation between the probe
      response and beacon BSS structs in this case.
      
      In case drivers have private data stored in a BSS struct
      and need access to such data from a beacon entry, cfg80211
      now provides the hidden_beacon_bss pointer from the probe
      response entry to the beacon entry.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      776b3580
  8. Jan 16, 2013
  9. Jan 03, 2013
  10. Nov 30, 2012
    • Johannes Berg's avatar
      cfg80211: fix BSS struct IE access races · 9caf0364
      Johannes Berg authored
      
      When a BSS struct is updated, the IEs are currently
      overwritten or freed. This can lead to races if some
      other CPU is accessing the BSS struct and using the
      IEs concurrently.
      
      Fix this by always allocating the IEs in a new struct
      that holds the data and length and protecting access
      to this new struct with RCU.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      9caf0364
  11. Nov 27, 2012
  12. Nov 26, 2012
    • Johannes Berg's avatar
      nl80211/cfg80211: support VHT channel configuration · 3d9d1d66
      Johannes Berg authored
      
      Change nl80211 to support specifying a VHT (or HT)
      using the control channel frequency (as before) and
      new attributes for the channel width and first and
      second center frequency. The old channel type is of
      course still supported for HT.
      
      Also change the cfg80211 channel definition struct
      to support these by adding the relevant fields to
      it (and removing the _type field.)
      
      This also adds new helper functions:
       - cfg80211_chandef_create to create a channel def
         struct given the control channel and channel type,
       - cfg80211_chandef_identical to check if two channel
         definitions are identical
       - cfg80211_chandef_compatible to check if the given
         channel definitions are compatible, and return the
         wider of the two
      
      This isn't entirely complete, but that doesn't matter
      until we have a driver using it. In particular, it's
      missing
       - regulatory checks on the usable bandwidth (if that
         even makes sense)
       - regulatory TX power (database can't deal with it)
       - a proper channel compatibility calculation for the
         new channel types
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      3d9d1d66
    • Johannes Berg's avatar
      cfg80211: pass a channel definition struct · 683b6d3b
      Johannes Berg authored
      
      Instead of passing a channel pointer and channel type
      to all functions and driver methods, pass a new channel
      definition struct. Right now, this struct contains just
      the control channel and channel type, but for VHT this
      will change.
      
      Also, add a small inline cfg80211_get_chandef_type() so
      that drivers don't need to use the _type field of the
      new structure all the time, which will change.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      683b6d3b
    • Johannes Berg's avatar
      cfg80211: remove remain-on-channel channel type · 42d97a59
      Johannes Berg authored
      
      As mwifiex (and mac80211 in the software case) are the
      only drivers actually implementing remain-on-channel
      with channel type, userspace can't be relying on it.
      This is the case, as it's used only for P2P operations
      right now.
      
      Rather than adding a flag to tell userspace whether or
      not it can actually rely on it, simplify all the code
      by removing the ability to use different channel types.
      Leave only the validation of the attribute, so that if
      we extend it again later (with the needed capability
      flag), it can't break userspace sending invalid data.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      42d97a59
  13. Nov 05, 2012
  14. Oct 17, 2012
  15. Sep 10, 2012
  16. Aug 06, 2012
  17. Jul 13, 2012
    • 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
  18. Jul 12, 2012
  19. Jul 09, 2012
    • Johannes Berg's avatar
      cfg80211: use wdev in mgmt-tx/ROC APIs · 71bbc994
      Johannes Berg authored
      
      The management frame and remain-on-channel APIs will be
      needed in the P2P device abstraction, so move them over
      to the new wdev-based APIs. Userspace can still use both
      the interface index and wdev identifier for them so it's
      backward compatible, but for the P2P Device wdev it will
      be able to use the wdev identifier only.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      71bbc994
    • Johannes Berg's avatar
      nl80211: prepare for non-netdev wireless devs · 89a54e48
      Johannes Berg authored
      
      In order to support a P2P device abstraction and
      Bluetooth high-speed AMPs, we need to have a way
      to identify virtual interfaces that don't have a
      netdev associated.
      
      Do this by adding a NL80211_ATTR_WDEV attribute
      to identify a wdev which may or may not also be
      a netdev.
      
      To simplify things, use a 64-bit value with the
      high 32 bits being the wiphy index for this new
      wdev identifier in the nl80211 API.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      89a54e48
  20. Jul 04, 2012
  21. Jun 29, 2012
  22. Jun 20, 2012
  23. Jun 06, 2012
  24. Jun 05, 2012
    • Johannes Berg's avatar
      cfg80211: provide channel to join_mesh function · cc1d2806
      Johannes Berg authored
      
      Just like the AP mode patch, instead of setting
      the channel and then joining the mesh network,
      provide the channel to join the network on to
      the join_mesh() function.
      
      Like in AP mode, you can also give the channel
      to the join-mesh nl80211 command now.
      
      Unlike AP mode, it picks a default channel if
      none was given.
      
      As libertas uses mesh mode interfaces but has
      no join_mesh callback and we can't simply break
      it, keep some compatibility code for that case
      and configure the channel directly for it.
      
      In the non-libertas case, where we store the
      channel until join, allow setting it while the
      interface is down.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      cc1d2806
  25. May 16, 2012
  26. Feb 06, 2012
    • Johannes Berg's avatar
      cfg80211: export cfg80211_ref_bss · 4c0c0b75
      Johannes Berg authored
      
      This is needed by mac80211 to keep a reference
      to a BSS alive for the auth process. Remove the
      old version of cfg80211_ref_bss() since it's
      not actually used.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      4c0c0b75
    • Johannes Berg's avatar
      cfg80211: stop tracking authenticated state · 95de817b
      Johannes Berg authored
      
      To track authenticated state seems to have been
      a design mistake in cfg80211. It is possible to
      have out of band authentication (FT), tracking
      multiple authentications caused more problems
      than it ever helped, and the implementation in
      mac80211 is too complex.
      
      Remove all this complexity, and let userspace
      do whatever it wants to, mac80211 can deal with
      that just fine. Association is still tracked of
      course, but authentication no longer is. Local
      auth state changes are thus no longer of value,
      so ignore them completely.
      
      This will also help implement SAE -- asking the
      driver to do an authentication is now almost
      equivalent to sending an authentication frame,
      with the exception of shared key authentication
      which is still handled completely.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      95de817b
  27. Dec 13, 2011
    • Vasanthakumar Thiagarajan's avatar
      cfg80211: Fix race in bss timeout · adbde344
      Vasanthakumar Thiagarajan authored
      
      It is quite possible to run into a race in bss timeout where
      the drivers see the bss entry just before notifying cfg80211
      of a roaming event but it got timed out by the time rdev->event_work
      got scehduled from cfg80211_wq. This would result in the following
      WARN-ON() along with the failure to notify the user space of
      the roaming. The other situation which is happening with ath6kl
      that runs into issue is when the driver reports roam to same AP
      event where the AP bss entry already got expired. To fix this,
      move cfg80211_get_bss() from __cfg80211_roamed() to cfg80211_roamed().
      
      [158645.538384] WARNING: at net/wireless/sme.c:586
      __cfg80211_roamed+0xc2/0x1b1()
      [158645.538810] Call Trace:
      [158645.538838]  [<c1033527>] warn_slowpath_common+0x65/0x7a
      [158645.538917]  [<c14cfacf>] ? __cfg80211_roamed+0xc2/0x1b1
      [158645.538946]  [<c103354b>] warn_slowpath_null+0xf/0x13
      [158645.539055]  [<c14cfacf>] __cfg80211_roamed+0xc2/0x1b1
      [158645.539086]  [<c14beb5b>] cfg80211_process_rdev_events+0x153/0x1cc
      [158645.539166]  [<c14bd57b>] cfg80211_event_work+0x26/0x36
      [158645.539195]  [<c10482ae>] process_one_work+0x219/0x38b
      [158645.539273]  [<c14bd555>] ? wiphy_new+0x419/0x419
      [158645.539301]  [<c10486cb>] worker_thread+0xf6/0x1bf
      [158645.539379]  [<c10485d5>] ? rescuer_thread+0x1b5/0x1b5
      [158645.539407]  [<c104b3e2>] kthread+0x62/0x67
      [158645.539484]  [<c104b380>] ? __init_kthread_worker+0x42/0x42
      [158645.539514]  [<c151309a>] kernel_thread_helper+0x6/0xd
      
      Reported-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      adbde344
  28. Nov 21, 2011
    • Ben Greear's avatar
      wireless: Support ht-capabilities over-rides. · 7e7c8926
      Ben Greear authored
      
      This allows users to disable features such as HT, HT40,
      and to modify the MCS, AMPDU, and AMSDU settings for
      drivers that support it.
      
      The MCS, AMPDU, and AMSDU features that may be disabled are
      are reported in the phy-info netlink message as a mask.
      
      Attemping to disable features that are not supported will
      take no affect, but will not return errors.  This is to aid
      backwards compatibility in user-space apps that may not be
      clever enough to deal with parsing the the capabilities mask.
      
      This patch only enables the infrastructure.  An additional
      patch will enable the feature in mac80211.
      
      Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      7e7c8926
  29. Nov 09, 2011
Loading