1. 26 11月, 2013 1 次提交
  2. 10 10月, 2013 1 次提交
  3. 26 9月, 2013 1 次提交
  4. 16 7月, 2013 1 次提交
    • A
      cfg80211/nl80211: Add packet coalesce support · be29b99a
      Amitkumar Karwar 提交于
      In most cases, host that receives IPv4 and IPv6 multicast/broadcast
      packets does not do anything with these packets. Therefore the
      reception of these unwanted packets causes unnecessary processing
      and power consumption.
      
      Packet coalesce feature helps to reduce number of received
      interrupts to host by buffering these packets in firmware/hardware
      for some predefined time. Received interrupt will be generated when
      one of the following events occur.
      a) Expiration of hardware timer whose expiration time is set to
      maximum coalescing delay of matching coalesce rule.
      b) Coalescing buffer in hardware reaches it's limit.
      c) Packet doesn't match any of the configured coalesce rules.
      
      This patch adds set/get configuration support for packet coalesce.
      User needs to configure following parameters for creating a coalesce
      rule.
      a) Maximum coalescing delay
      b) List of packet patterns which needs to be matched
      c) Condition for coalescence. pattern 'match' or 'no match'
      Multiple such rules can be created.
      
      This feature needs to be advertised during driver initialization.
      Drivers are supposed to do required firmware/hardware settings based
      on user configuration.
      Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: NBing Zhao <bzhao@marvell.com>
      [fix kernel-doc, change free function, fix copy/paste error]
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      be29b99a
  5. 04 6月, 2013 1 次提交
    • J
      cfg80211: separate internal SME implementation · ceca7b71
      Johannes Berg 提交于
      The current internal SME implementation in cfg80211 is
      very mixed up with the MLME handling, which has been
      causing issues for a long time. There are three things
      that the implementation has to provide:
       * a basic SME implementation for nl80211's connect()
         call (for drivers implementing auth/assoc, which is
         really just mac80211) and wireless extensions
       * MLME events for the userspace SME
       * SME events (connected, disconnected etc.) for all
         different SME implementation possibilities (driver,
         cfg80211 and userspace)
      
      To achieve these goals it isn't necessary to track the
      software SME's connection status outside of it's state
      (which is the part that caused many issues.) Instead,
      track it only in the SME data (wdev->conn) and in the
      general case only track whether the wdev is connected
      or not (via wdev->current_bss.)
      
      Also separate the internal implementation to not have
      callbacks from the SME events, but rather call it from
      the API functions that the driver (or rather mac80211)
      calls. This separates the code better.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ceca7b71
  6. 27 5月, 2013 1 次提交
  7. 25 5月, 2013 4 次提交
  8. 22 4月, 2013 1 次提交
  9. 24 3月, 2013 1 次提交
    • J
      cfg80211: always check for scan end on P2P device · f9f47529
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      f9f47529
  10. 06 3月, 2013 3 次提交
    • S
      cfg80211/mac80211: disconnect on suspend · 81256969
      Stanislaw Gruszka 提交于
      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: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      81256969
    • J
      cfg80211: refactor association parameters · f62fab73
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      f62fab73
    • J
      cfg80211: add ability to override VHT capabilities · ee2aca34
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      ee2aca34
  11. 15 2月, 2013 1 次提交
  12. 13 2月, 2013 1 次提交
  13. 12 2月, 2013 1 次提交
    • J
      cfg80211: track hidden SSID networks properly · 776b3580
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      776b3580
  14. 17 1月, 2013 1 次提交
  15. 03 1月, 2013 2 次提交
  16. 30 11月, 2012 1 次提交
    • J
      cfg80211: fix BSS struct IE access races · 9caf0364
      Johannes Berg 提交于
      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: NJohannes Berg <johannes.berg@intel.com>
      9caf0364
  17. 27 11月, 2012 1 次提交
  18. 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
  19. 05 11月, 2012 1 次提交
  20. 17 10月, 2012 1 次提交
  21. 11 9月, 2012 1 次提交
  22. 07 8月, 2012 1 次提交
  23. 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
  24. 12 7月, 2012 1 次提交
  25. 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
  26. 04 7月, 2012 1 次提交
  27. 29 6月, 2012 5 次提交