1. 26 11月, 2012 3 次提交
    • J
      nl80211/cfg80211: support VHT channel configuration · 3d9d1d66
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      3d9d1d66
    • J
      cfg80211: pass a channel definition struct · 683b6d3b
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      683b6d3b
    • J
      cfg80211: remove remain-on-channel channel type · 42d97a59
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      42d97a59
  2. 05 11月, 2012 1 次提交
  3. 17 10月, 2012 1 次提交
  4. 11 9月, 2012 1 次提交
  5. 07 8月, 2012 1 次提交
  6. 13 7月, 2012 1 次提交
    • J
      cfg80211: reduce monitor interface tracking · 4290cb4b
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      4290cb4b
  7. 12 7月, 2012 1 次提交
  8. 09 7月, 2012 2 次提交
    • J
      cfg80211: use wdev in mgmt-tx/ROC APIs · 71bbc994
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      71bbc994
    • J
      nl80211: prepare for non-netdev wireless devs · 89a54e48
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      89a54e48
  9. 04 7月, 2012 1 次提交
  10. 29 6月, 2012 5 次提交
  11. 20 6月, 2012 1 次提交
  12. 07 6月, 2012 1 次提交
  13. 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
  14. 17 5月, 2012 1 次提交
  15. 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
  16. 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
  17. 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
  18. 10 11月, 2011 2 次提交
  19. 28 9月, 2011 2 次提交
  20. 15 9月, 2011 1 次提交
  21. 20 7月, 2011 1 次提交
  22. 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
  23. 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
  24. 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
  25. 13 5月, 2011 2 次提交
  26. 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
  27. 06 5月, 2011 1 次提交
  28. 21 12月, 2010 1 次提交
  29. 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