1. 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
  2. 22 11月, 2011 2 次提交
  3. 01 11月, 2011 1 次提交
  4. 01 10月, 2011 1 次提交
    • A
      mac80211: data path modification for TDLS peers · 941c93cd
      Arik Nemtsov 提交于
      Mark the STA entries of enabled TDLS peers with a new "peer authorized"
      flag.
      
      During link setup, allow special TDLS setup frames through the AP, but
      otherwise drop all packets destined to the peer. This is required by the
      TDLS (802.11z) specification in order to prevent reordering of MSDUs
      between the AP and direct paths.
      
      When setup completes and the peer is authorized, send data directly,
      bypassing the AP.
      
      In the Rx path, allow data to be received directly from TDLS peers.
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Cc: Kalyan C Gaddam <chakkal@iit.edu>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      941c93cd
  5. 28 9月, 2011 1 次提交
  6. 14 9月, 2011 1 次提交
  7. 23 8月, 2011 1 次提交
    • T
      mac80211: update mesh peering frame format · 8db09850
      Thomas Pedersen 提交于
      This patch updates the mesh peering frames to the format specified in
      the recently ratified 802.11s standard. Several changes took place to
      make this happen:
      
      	- Change RX path to handle new self-protected frames
      	- Add new Peering management IE
      	- Remove old Peer Link IE
      	- Remove old plink_action field in ieee80211_mgmt header
      
      These changes by themselves would either break peering, or work by
      coincidence, so squash them all into this patch.
      Signed-off-by: NThomas Pedersen <thomas@cozybit.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8db09850
  8. 13 8月, 2011 1 次提交
  9. 21 7月, 2011 1 次提交
  10. 20 7月, 2011 1 次提交
  11. 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
  12. 17 5月, 2011 2 次提交
    • Y
      cfg80211: make stripping of 802.11 header optional from AMSDU · 8b3becad
      Yogesh Ashok Powar 提交于
      Currently the devices that have already stripped IEEE 802.11
      header from the AMSDU SKB can not use ieee80211_amsdu_to_8023s
      routine. This patch enhances ieee80211_amsdu_to_8023s() API by
      changing mandatory removing of IEEE 802.11 header from AMSDU
      to optional.
      Signed-off-by: NYogesh Ashok Powar <yogeshp@marvell.com>
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8b3becad
    • 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
  13. 13 5月, 2011 1 次提交
  14. 29 1月, 2011 1 次提交
  15. 22 1月, 2011 1 次提交
    • B
      cfg80211: Extend channel to frequency mapping for 802.11j · 59eb21a6
      Bruno Randolf 提交于
      Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
      IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
      channel numbers in the 2GHz and 5GHz band we can't map from channel to
      frequency without knowing the band. This is no problem as in most contexts we
      know the band. In places where we don't know the band (and WEXT compatibility)
      we assume the 2GHz band for channels below 14.
      
      This patch does not implement all channel to frequency mappings defined in
      802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
      channels as well as 802.11y channels have been omitted.
      
      The following drivers have been updated to reflect the API changes:
      iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
      The drivers have been compile-tested only.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NBrian Prodoehl <bprodoehl@gmail.com>
      Acked-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      59eb21a6
  16. 14 12月, 2010 1 次提交
  17. 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
  18. 25 11月, 2010 1 次提交
  19. 07 10月, 2010 1 次提交
  20. 17 9月, 2010 1 次提交
  21. 28 8月, 2010 1 次提交
  22. 25 8月, 2010 2 次提交
  23. 16 6月, 2010 1 次提交
  24. 01 4月, 2010 1 次提交
    • Z
      mac80211: support paged rx SKBs · e3cf8b3f
      Zhu Yi 提交于
      Mac80211 drivers can now pass paged SKBs to mac80211 via
      ieee80211_rx{_irqsafe}. The implementation currently use
      skb_linearize() in a few places i.e. management frame
      handling, software decryption, defragmentation and A-MSDU
      process. We will optimize them one by one later.
      Signed-off-by: NZhu Yi <yi.zhu@intel.com>
      Cc: Kalle Valo <kalle.valo@iki.fi>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e3cf8b3f
  25. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  26. 23 1月, 2010 1 次提交
  27. 23 12月, 2009 1 次提交
  28. 22 12月, 2009 1 次提交
  29. 20 11月, 2009 2 次提交
    • J
      cfg80211: disallow bridging managed/adhoc interfaces · ad4bb6f8
      Johannes Berg 提交于
      A number of people have tried to add a wireless interface
      (in managed mode) to a bridge and then complained that it
      doesn't work. It cannot work, however, because in 802.11
      networks all packets need to be acknowledged and as such
      need to be sent to the right address. Promiscuous doesn't
      help here. The wireless address format used for these
      links has only space for three addresses, the
       * transmitter, which must be equal to the sender (origin)
       * receiver (on the wireless medium), which is the AP in
         the case of managed mode
       * the recipient (destination), which is on the APs local
         network segment
      
      In an IBSS, it is similar, but the receiver and recipient
      must match and the third address is used as the BSSID.
      
      To avoid such mistakes in the future, disallow adding a
      wireless interface to a bridge.
      
      Felix has recently added a four-address mode to the AP
      and client side that can be used (after negotiating that
      it is possible, which must happen out-of-band by setting
      up both sides) for bridging, so allow that case.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ad4bb6f8
    • J
      cfg80211: introduce capability for 4addr mode · 9bc383de
      Johannes Berg 提交于
      It's very likely that not many devices will support
      four-address mode in station or AP mode so introduce
      capability bits for both modes, set them in mac80211
      and check them when userspace tries to use the mode.
      Also, keep track of 4addr in cfg80211 (wireless_dev)
      and not in mac80211 any more. mac80211 can also be
      improved for the VLAN case by not looking at the
      4addr flag but maintaining the station pointer for
      it correctly. However, keep track of use_4addr for
      station mode in mac80211 to avoid all the derefs.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9bc383de
  30. 12 11月, 2009 1 次提交
    • F
      mac80211: implement support for 4-address frames for AP and client mode · f14543ee
      Felix Fietkau 提交于
      In some situations it might be useful to run a network with an
      Access Point and multiple clients, but with each client bridged
      to a network behind it. For this to work, both the client and the
      AP need to transmit 4-address frames, containing both source and
      destination MAC addresses.
      With this patch, you can configure a client to communicate using
      only 4-address frames for data traffic.
      On the AP side you can enable 4-address frames for individual
      clients by isolating them in separate AP VLANs which are configured
      in 4-address mode.
      Such an AP VLAN will be limited to one client only, and this client
      will be used as the destination for all traffic on its interface,
      regardless of the destination MAC address in the packet headers.
      The advantage of this mode compared to regular WDS mode is that it's
      easier to configure and does not require a static list of peer MAC
      addresses on any side.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f14543ee
  31. 29 8月, 2009 1 次提交
    • J
      cfg80211: clean up properly on interface type change · 3d54d255
      Johannes Berg 提交于
      When the interface type changes while connected, and the
      driver does not require the interface to be down for a
      type change, it is currently possible to get very strange
      results unless the driver takes special care, which it
      shouldn't have to.
      
      To fix this, take care to disconnect/leave IBSS when
      changing the interface type -- even if the driver may fail
      the call. Also process all events that may be pending to
      avoid running into a situation where an event is reported
      but only processed after the type has already changed,
      which would lead to missing events and warnings.
      
      A side effect of this is that you will have disconnected
      or left the IBSS even if the mode change ultimately fails,
      but since the intention was to change it and thus leave or
      disconnect, this is not a problem.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3d54d255
  32. 14 8月, 2009 1 次提交
    • J
      mac80211: Use 3-address format for mesh broadcast frames. · 3c5772a5
      Javier Cardona 提交于
      The 11s task group recently changed the frame mesh multicast/broadcast frame
      format to use 3-address.  This was done to avoid interactions with widely
      deployed lazy-WDS access points.
      
      This patch changes the format of group addressed frames, both mesh-originated
      and proxied, to use the data format defined in draft D2.08 and forward.  The
      address fields used for group addressed frames is:
      
      In 802.11 header
       ToDS:0  FromDS:1
       addr1: DA  (broadcast/multicast address)
       addr2: TA
       addr3: Mesh SA
      
      In address extension header:
       addr4: SA  (only present if frame was proxied)
      
      Note that this change breaks backward compatibility with earlier mesh stack
      versions.
      Signed-off-by: NAndrey Yurovsky <andrey@cozybit.com>
      Signed-off-by: NJavier Cardona <javier@cozybit.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3c5772a5
  33. 25 7月, 2009 2 次提交
    • Z
      cfg80211: avoid setting default_key if add_key fails · 1e056665
      Zhu Yi 提交于
      In cfg80211_upload_connect_keys(), we call add_key, set_default_key
      and set_default_mgmt_key (if applicable) one by one. If one of these
      operations fails, we should stop calling the following functions.
      Because if the key is not added successfully, we should not set it as
      default key anyway.
      Signed-off-by: NZhu Yi <yi.zhu@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1e056665
    • J
      cfg80211: rework key operation · fffd0934
      Johannes Berg 提交于
      This reworks the key operation in cfg80211, and now only
      allows, from userspace, configuring keys (via nl80211)
      after the connection has been established (in managed
      mode), the IBSS been joined (in IBSS mode), at any time
      (in AP[_VLAN] modes) or never for all the other modes.
      
      In order to do shared key authentication correctly, it
      is now possible to give a WEP key to the AUTH command.
      To configure static WEP keys, these are given to the
      CONNECT or IBSS_JOIN command directly, for a userspace
      SME it is assumed it will configure it properly after
      the connection has been established.
      
      Since mac80211 used to check the default key in IBSS
      mode to see whether or not the network is protected,
      it needs an update in that area, as well as an update
      to make use of the WEP key passed to auth() for shared
      key authentication.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fffd0934
  34. 11 7月, 2009 1 次提交
  35. 04 6月, 2009 1 次提交