1. 29 6月, 2012 2 次提交
  2. 20 6月, 2012 1 次提交
  3. 07 6月, 2012 1 次提交
  4. 06 6月, 2012 1 次提交
    • J
      cfg80211: provide channel to join_mesh function · cc1d2806
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cc1d2806
  5. 17 5月, 2012 1 次提交
  6. 07 2月, 2012 2 次提交
    • J
      cfg80211: export cfg80211_ref_bss · 4c0c0b75
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4c0c0b75
    • J
      cfg80211: stop tracking authenticated state · 95de817b
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      95de817b
  7. 14 12月, 2011 1 次提交
    • V
      cfg80211: Fix race in bss timeout · adbde344
      Vasanthakumar Thiagarajan 提交于
      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: NKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: NVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      adbde344
  8. 22 11月, 2011 1 次提交
    • B
      wireless: Support ht-capabilities over-rides. · 7e7c8926
      Ben Greear 提交于
      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: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7e7c8926
  9. 10 11月, 2011 2 次提交
  10. 28 9月, 2011 2 次提交
  11. 15 9月, 2011 1 次提交
  12. 20 7月, 2011 1 次提交
  13. 06 7月, 2011 1 次提交
    • L
      cfg80211: fix deadlock with rfkill/sched_scan by adding new mutex · c10841ca
      Luciano Coelho 提交于
      There was a deadlock when rfkill-blocking a wireless interface,
      because we were locking the rdev mutex on NETDEV_GOING_DOWN to stop
      sched_scans that were eventually running.  The rfkill block code was
      already holding a mutex under rdev:
      
      kernel: =======================================================
      kernel: [ INFO: possible circular locking dependency detected ]
      kernel: 3.0.0-rc1-00049-g1fa7b6a2 #57
      kernel: -------------------------------------------------------
      kernel: kworker/0:1/4525 is trying to acquire lock:
      kernel: (&rdev->mtx){+.+.+.}, at: [<ffffffff8164c831>] cfg80211_netdev_notifier_call+0x131/0x5b0
      kernel:
      kernel: but task is already holding lock:
      kernel: (&rdev->devlist_mtx){+.+.+.}, at: [<ffffffff8164dcef>] cfg80211_rfkill_set_block+0x4f/0xa0
      kernel:
      kernel: which lock already depends on the new lock.
      
      To fix this, add a new mutex specifically for sched_scan, to protect
      the sched_scan_req element in the rdev struct, instead of using the
      global rdev mutex.
      Reported-by: NDuane Griffin <duaneg@dghda.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c10841ca
  14. 19 5月, 2011 1 次提交
    • J
      cfg80211: Use consistent BSS matching between scan and sme · ed9d0102
      Jouni Malinen 提交于
      cfg80211 scan code adds separate BSS entries if the same BSS shows up
      on multiple channels. However, sme implementation does not use the
      frequency when fetching the BSS entry. Fix this by adding channel
      information to cfg80211_roamed() and include it in cfg80211_get_bss()
      calls.
      
      Please note that drivers using cfg80211_roamed() need to be modified to
      fully implement this fix. This commit includes only minimal changes to
      avoid compilation issues; it maintains the old (broken) behavior for
      most drivers. ath6kl was the only one that I could test, so I updated
      it to provide the operating frequency in the roamed event.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ed9d0102
  15. 17 5月, 2011 1 次提交
    • J
      cfg80211: advertise possible interface combinations · 7527a782
      Johannes Berg 提交于
      Add the ability to advertise interface combinations in nl80211.
      This allows the driver to indicate what the combinations are
      that it supports. "Combinations" of just a single interface are
      implicit, as previously. Note that cfg80211 will enforce that
      the restrictions are met, but not for all drivers yet (once all
      drivers are updated, we can remove the flag and enforce for all).
      
      When no combinations are actually supported, an empty list will
      be exported so that userspace can know if the kernel exported
      this info or not (although it isn't clear to me what tools using
      the info should do if the kernel didn't export it).
      
      Since some interface types are purely virtual/software and don't
      fit the restrictions, those are exposed in a new list of pure SW
      types, not subject to restrictions. This mainly exists to handle
      AP-VLAN and monitor interfaces in mac80211.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7527a782
  16. 13 5月, 2011 2 次提交
  17. 12 5月, 2011 1 次提交
    • L
      cfg80211/nl80211: add support for scheduled scans · 807f8a8c
      Luciano Coelho 提交于
      Implement new functionality for scheduled scan offload.  With this feature we
      can scan automatically at certain intervals.
      
      The idea is that the hardware can perform scan automatically and filter on
      desired results without waking up the host unnecessarily.
      
      Add NL80211_CMD_START_SCHED_SCAN and NL80211_CMD_STOP_SCHED_SCAN
      commands to the nl80211 interface.  When results are available they are
      reported by NL80211_CMD_SCHED_SCAN_RESULTS events.  The userspace is
      informed when the scheduled scan has stopped with a
      NL80211_CMD_SCHED_SCAN_STOPPED event, which can be triggered either by
      the driver or by a call to NL80211_CMD_STOP_SCHED_SCAN.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      807f8a8c
  18. 06 5月, 2011 1 次提交
  19. 21 12月, 2010 1 次提交
  20. 07 12月, 2010 1 次提交
    • J
      cfg80211/mac80211: add mesh join/leave commands · 29cbe68c
      Johannes Berg 提交于
      Instead of tying mesh activity to interface up,
      add join and leave commands for mesh. Since we
      must be backward compatible, let cfg80211 handle
      joining a mesh if a mesh ID was pre-configured
      when the device goes up.
      
      Note that this therefore must modify mac80211 as
      well since mac80211 needs to lose the logic to
      start the mesh on interface up.
      
      We now allow querying mesh parameters before the
      mesh is connected, which simply returns defaults.
      Setting them (internally renamed to "update") is
      only allowed while connected. Specify them with
      the new mesh join command instead where needed.
      
      In mac80211, beaconing must now also follow the
      mesh enabled/not enabled state, which is done
      by testing the mesh ID.
      Signed-off-by: NJavier Cardona <javier@cozybit.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      29cbe68c
  21. 30 11月, 2010 1 次提交
  22. 07 10月, 2010 1 次提交
  23. 24 9月, 2010 1 次提交
  24. 17 9月, 2010 1 次提交
  25. 25 8月, 2010 1 次提交
  26. 03 6月, 2010 1 次提交
  27. 08 5月, 2010 1 次提交
    • J
      cfg80211/mac80211: better channel handling · f444de05
      Johannes Berg 提交于
      Currently (all tested with hwsim) you can do stupid
      things like setting up an AP on a certain channel,
      then adding another virtual interface and making
      that associate on another channel -- this will make
      the beaconing to move channel but obviously without
      the necessary IEs data update.
      
      In order to improve this situation, first make the
      configuration APIs (cfg80211 and nl80211) aware of
      multi-channel operation -- we'll eventually need
      that in the future anyway. There's one userland API
      change and one API addition. The API change is that
      now SET_WIPHY must be called with virtual interface
      index rather than only wiphy index in order to take
      effect for that interface -- luckily all current
      users (hostapd) do that. For monitor interfaces, the
      old setting is preserved, but monitors are always
      slaved to other devices anyway so no guarantees.
      
      The second userland API change is the introduction
      of a per virtual interface SET_CHANNEL command, that
      hostapd should use going forward to make it easier
      to understand what's going on (it can automatically
      detect a kernel with this command).
      
      Other than mac80211, no existing cfg80211 drivers
      are affected by this change because they only allow
      a single virtual interface.
      
      mac80211, however, now needs to be aware that the
      channel settings are per interface now, and needs
      to disallow (for now) real multi-channel operation,
      which is another important part of this patch.
      
      One of the immediate benefits is that you can now
      start hostapd to operate on a hardware that already
      has a connection on another virtual interface, as
      long as you specify the same channel.
      
      Note that two things are left unhandled (this is an
      improvement -- not a complete fix):
      
       * different HT/no-HT modes
      
         currently you could start an HT AP and then
         connect to a non-HT network on the same channel
         which would configure the hardware for no HT;
         that can be fixed fairly easily
      
       * CSA
      
         An AP we're connected to on a virtual interface
         might indicate switching channels, and in that
         case we would follow it, regardless of how many
         other interfaces are operating; this requires
         more effort to fix but is pretty rare after all
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f444de05
  28. 08 4月, 2010 1 次提交
    • J
      cfg80211: Add local-state-change-only auth/deauth/disassoc · d5cdfacb
      Jouni Malinen 提交于
      cfg80211 is quite strict on allowing authentication and association
      commands only in certain states. In order to meet these requirements,
      user space applications may need to clear authentication or
      association state in some cases. Currently, this can be done with
      deauth/disassoc command, but that ends up sending out Deauthentication
      or Disassociation frame unnecessarily. Add a new nl80211 attribute to
      allow this sending of the frame be skipped, but with all other
      deauth/disassoc operations being completed.
      
      Similar state change is also needed for IEEE 802.11r FT protocol in
      the FT-over-DS case which does not use Authentication frame exchange
      in a transition to another BSS. For this to work with cfg80211, an
      authentication entry needs to be created for the target BSS without
      sending out an Authentication frame. The nl80211 authentication
      command can be used for this purpose, too, with the new attribute to
      indicate that the command is only for changing local state. This
      enables wpa_supplicant to complete FT-over-DS transition successfully.
      Signed-off-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d5cdfacb
  29. 16 2月, 2010 1 次提交
    • J
      cfg80211/mac80211: allow registering for and sending action frames · 026331c4
      Jouni Malinen 提交于
      This implements a new command to register for action frames
      that userspace wants to handle instead of the in-kernel
      rejection. It is then responsible for rejecting ones that
      it decided not to handle. There is no unregistration, but
      the socket can be closed for that.
      
      Frames that are not registered for will not be forwarded
      to userspace and will be rejected by the kernel, the
      cfg80211 API helps implementing that.
      
      Additionally, this patch adds a new command that allows
      doing action frame transmission from userspace. It can be
      used either to exchange action frames on the current
      operational channel (e.g., with the AP with which we are
      currently associated) or to exchange off-channel Public
      Action frames with the remain-on-channel command.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      026331c4
  30. 20 1月, 2010 1 次提交
  31. 13 1月, 2010 1 次提交
    • J
      cfg80211: Store IEs from both Beacon and Probe Response frames · 34a6eddb
      Jouni Malinen 提交于
      Store information elements from Beacon and Probe Response frames in
      separate buffers to allow both sets to be made available through
      nl80211. This allows user space applications to get access to IEs from
      Beacon frames even if we have received Probe Response frames from the
      BSS. Previously, the IEs from Probe Response frames would have
      overridden the IEs from Beacon frames.
      
      This feature is of somewhat limited use since most protocols include
      the same (or extended) information in Probe Response frames. However,
      there are couple of exceptions where the IEs from Beacon frames could
      be of some use: TIM IE is only included in Beacon frames (and it would
      be needed to figure out the DTIM period used in the BSS) and at least
      some implementations of Wireless Provisioning Services seem to include
      the full IE only in Beacon frames).
      
      The new BSS attribute for scan results is added to allow both the IE
      sets to be delivered. This is done in a way that maintains the
      previously used behavior for applications that are not aware of the
      new NL80211_BSS_BEACON_IES attribute.
      Signed-off-by: NJouni Malinen <j@w1.fi>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      34a6eddb
  32. 29 12月, 2009 1 次提交
    • J
      cfg80211: add remain-on-channel command · 9588bbd5
      Jouni Malinen 提交于
      Add new commands for requesting the driver to remain awake
      on a specified channel for the specified amount of time
      (and another command to cancel such an operation). This
      can be used to implement userspace-controlled off-channel
      operations, like Public Action frame exchange on another
      channel than the operation channel.
      
      The off-channel operation should behave similarly to scan,
      i.e. the local station (if associated) moves into power
      save mode to request the AP to buffer frames for it and
      then moves to the other channel to allow the off-channel
      operation to be completed. The duration parameter can be
      used to request enough time to receive a response from
      the target station.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9588bbd5
  33. 22 12月, 2009 1 次提交
  34. 29 11月, 2009 1 次提交
    • A
      wireless : use a dedicated workqueue for cfg80211. · e60d7443
      Alban Browaeys 提交于
      This patch moves the works cleanup, scan and events to a cfg80211
      dedicated workqueue.
      
      Platform driver like eeepc-laptop ought to use works to rfkill (as
      new rfkill does lock in rfkill_unregister and the platform driver is
      called from rfkill_switch_all which also lock the same mutex).
      This raise a new issue in itself that the work scheduled by the platform
      driver to the global worqueue calls wiphy_unregister which flush_work
      scan and event works (which thus flush works on the global workqueue inside
      a work on the global workqueue) and also put on hold the  wdev_cleanup_work
       (which prevents the dev_put on netdev thus indefinite Usage count error on
      wifi device).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NAlban Browaeys <prahal@yahoo.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e60d7443
  35. 19 11月, 2009 1 次提交