1. 20 Feb, 2014 2 commits
  2. 04 Feb, 2014 8 commits
    • Michal Kazior's avatar
      cfg80211: consider existing DFS interfaces · 9e0e2961
      Michal Kazior authored
      It was possible to break interface combinations in
      the following way:
       combo 1: iftype = AP, num_ifaces = 2, num_chans = 2,
       combo 2: iftype = AP, num_ifaces = 1, num_chans = 1, radar = HT20
      With the above interface combinations it was
      possible to:
       step 1. start AP on DFS channel by matching combo 2
       step 2. start AP on non-DFS channel by matching combo 1
      This was possible beacuse (step 2) did not consider
      if other interfaces require radar detection.
      The patch changes how cfg80211 tracks channels -
      instead of channel itself now a complete chandef
      is stored.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Antonio Quartulli's avatar
      cfg80211: fix channel configuration in IBSS join · fe94f3a4
      Antonio Quartulli authored
      When receiving an IBSS_JOINED event select the BSS object
      based on the {bssid, channel} couple rather than the bssid
      With the current approach if another cell having the same
      BSSID (but using a different channel) exists then cfg80211
      picks up the wrong BSS object.
      The result is a mismatching channel configuration between
      cfg80211 and the driver, that can lead to any sort of
      The issue can be triggered by having an IBSS sitting on
      given channel and then asking the driver to create a new
      cell using the same BSSID but with a different frequency.
      By passing the channel to cfg80211_get_bss() we can solve
      this ambiguity and retrieve/create the correct BSS object.
      All the users of cfg80211_ibss_joined() have been changed
      Moreover WARN when cfg80211_ibss_joined() gets a NULL
      channel as argument and remove a bogus call of the same
      function in ath6kl (it does not make sense to call
      cfg80211_ibss_joined() with a zero BSSID on ibss-leave).
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Arend van Spriel <arend@broadcom.com>
      Cc: Bing Zhao <bzhao@marvell.com>
      Cc: Jussi Kivilinna <jussi.kivilinna@iki.fi>
      Cc: libertas-dev@lists.infradead.org
      Acked-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
      [minor code cleanup in ath6kl]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      nl80211: fix scheduled scan RSSI matchset attribute confusion · ea73cbce
      Johannes Berg authored
      The scheduled scan matchsets were intended to be a list of filters,
      with the found BSS having to pass at least one of them to be passed
      to the host. When the RSSI attribute was added, however, this was
      broken and currently wpa_supplicant adds that attribute in its own
      matchset; however, it doesn't intend that to mean that anything
      that passes the RSSI filter should be passed to the host, instead
      it wants it to mean that everything needs to also have higher RSSI.
      This is semantically problematic because we have a list of filters
      like [ SSID1, SSID2, SSID3, RSSI ] with no real indication which
      one should be OR'ed and which one AND'ed.
      To fix this, move the RSSI filter attribute into each matchset. As
      we need to stay backward compatible, treat a matchset with only the
      RSSI attribute as a "default RSSI filter" for all other matchsets,
      but only if there are other matchsets (an RSSI-only matchset by
      itself is still desirable.)
      To make driver implementation easier, keep a global min_rssi_thold
      for the entire request as well. The only affected driver is ath6kl.
      I found this when I looked into the code after Raja Mani submitted
      a patch fixing the n_match_sets calculation to disregard the RSSI,
      but that patch didn't address the semantic issue.
      Reported-by: default avatarRaja Mani <rmani@qti.qualcomm.com>
      Acked-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Janusz Dziedzic's avatar
      nl80211: add Guard Interval support for set_bitrate_mask · 0b9323f6
      Janusz Dziedzic authored
      Allow to force SGI, LGI.
      Mainly for test purpose.
      Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      cfg80211: make connect ie param const · 4b5800fe
      Johannes Berg authored
      This required liberally sprinkling 'const' over brcmfmac
      and mwifiex but seems like a useful thing to do since the
      pointer can't really be written.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Jouni Malinen's avatar
      cfg80211: Clean up connect params and channel fetching · 664834de
      Jouni Malinen authored
      Addition of the frequency hints showed up couple of places in cfg80211
      where pointers could be marked const and a shared function could be used
      to fetch a valid channel.
      Signed-off-by: default avatarJouni Malinen <j@w1.fi>
      [fix mwifiex]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Jouni Malinen's avatar
      cfg80211: Advertise maximum associated STAs in AP mode · b43504cf
      Jouni Malinen authored
      This allows drivers to advertise the maximum number of associated
      stations they support in AP mode (including P2P GO). User space
      applications can use this for cleaner way of handling the limit (e.g.,
      hostapd rejecting IEEE 802.11 authentication without manual
      configuration of the limit) or to figure out what type of use cases can
      be executed with multiple devices before trying and failing.
      Signed-off-by: default avatarJouni Malinen <j@w1.fi>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Jouni Malinen's avatar
      cfg80211: Allow BSS hint to be provided for connect · 1df4a510
      Jouni Malinen authored
      This clarifies the expected driver behavior on the older
      NL80211_ATTR_MAC and NL80211_ATTR_WIPHY_FREQ attributes and adds a new
      set of similar attributes with _HINT postfix to enable use of a
      recommendation of the initial BSS to choose. This can be helpful for
      some drivers that can avoid an additional full scan on connection
      request if the information is provided to them (user space tools like
      wpa_supplicant already has that information available based on earlier
      In addition, this can be used to get more expected behavior for cases
      where a specific BSS should be picked first based on operations like
      Interworking network selection or WPS. These cases were already easily
      addressed with drivers that leave BSS selection to user space, but there
      was no convenient way to do this with drivers that take care of BSS
      selection internally without using the NL80211_ATTR_MAC which is not
      really desired since it is needed for other purposes to force the
      association to remain with the same BSS.
      Signed-off-by: default avatarJouni Malinen <j@w1.fi>
      [add const, fix policy]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  3. 09 Jan, 2014 1 commit
  4. 19 Dec, 2013 2 commits
    • Kyeyoon Park's avatar
      cfg80211: Add support for QoS mapping · fa9ffc74
      Kyeyoon Park authored
      This allows QoS mapping from external networks to be implemented as
      defined in IEEE Std 802.11-2012, 10.24.9. APs can use this to advertise
      DSCP ranges and exceptions for mapping frames to a specific UP over
      The payload of the QoS Map Set element (IEEE Std 802.11-2012,
      is sent to the driver through the new NL80211_ATTR_QOS_MAP attribute to
      configure the local behavior either on the AP (based on local
      configuration) or on a station (based on information received from the
      Signed-off-by: default avatarKyeyoon Park <kyeyoonp@qca.qualcomm.com>
      Signed-off-by: default avatarJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Johannes Berg's avatar
      nl80211: support vendor-specific events · 567ffc35
      Johannes Berg authored
      In addition to vendor-specific commands, also support vendor-specific
      events. These must be registered with cfg80211 before they can be used.
      They're also advertised in nl80211 in the wiphy information so that
      userspace knows can be expected. The events themselves are sent on a
      new multicast group called "vendor".
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  5. 16 Dec, 2013 1 commit
  6. 05 Dec, 2013 1 commit
  7. 03 Dec, 2013 2 commits
    • Johannes Berg's avatar
      nl80211: vendor command support · ad7e718c
      Johannes Berg authored
      Add support for vendor-specific commands to nl80211. This is
      intended to be used for really vendor-specific functionality
      that can't be implemented in a generic fashion for any reason.
      It's *NOT* intended to be used for any normal/generic feature
      or any optimisations that could be implemented across drivers.
      Currently, only vendor commands (with replies) are supported,
      no dump operations or vendor-specific notifications.
      Also add a function wdev_to_ieee80211_vif() to mac80211 which
      is needed for mac80211-based drivers wanting to implement any
      vendor commands.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Marek Kwaczynski's avatar
      nl80211/cfg80211: Set Operating Mode Notification · 60f4a7b1
      Marek Kwaczynski authored
      This attribute is needed for setting Operating Mode Notification
      in AP mode from User Space. This functionality is required when
      User Space received Assoc Request contains Operation Mode
      Notification element.
      Signed-off-by: default avatarMarek Kwaczynski <marek.kwaczynski@tieto.com>
      [fix typos, nl80211 documentation]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  8. 02 Dec, 2013 2 commits
  9. 25 Nov, 2013 4 commits
    • Luis R. Rodriguez's avatar
      cfg80211: move regulatory flags to their own variable · a2f73b6c
      Luis R. Rodriguez authored
      We'll expand this later, this will make it easier to
      classify and review what things are related to regulatory
      or not.
      Coccinelle only missed 4 hits, which I had to do manually,
      supplying the SmPL in case of merge conflicts.
      struct wiphy *wiphy;
      -wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY
      +wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG
      expression e;
      +e->regulatory_flags |= REGULATORY_CUSTOM_REG
      struct wiphy *wiphy;
      -wiphy->flags &= ~WIPHY_FLAG_CUSTOM_REGULATORY
      +wiphy->regulatory_flags &= ~REGULATORY_CUSTOM_REG
      struct wiphy *wiphy;
      -wiphy->flags & WIPHY_FLAG_CUSTOM_REGULATORY
      +wiphy->regulatory_flags & REGULATORY_CUSTOM_REG
      struct wiphy *wiphy;
      -wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY
      +wiphy->regulatory_flags |= REGULATORY_STRICT_REG
      expression e;
      +e->regulatory_flags |= REGULATORY_STRICT_REG
      struct wiphy *wiphy;
      -wiphy->flags &= ~WIPHY_FLAG_STRICT_REGULATORY
      +wiphy->regulatory_flags &= ~REGULATORY_STRICT_REG
      struct wiphy *wiphy;
      -wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY
      +wiphy->regulatory_flags & REGULATORY_STRICT_REG
      struct wiphy *wiphy;
      -wiphy->flags |= WIPHY_FLAG_DISABLE_BEACON_HINTS
      +wiphy->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS
      expression e;
      +e->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS
      struct wiphy *wiphy;
      -wiphy->flags &= ~WIPHY_FLAG_DISABLE_BEACON_HINTS
      +wiphy->regulatory_flags &= ~REGULATORY_DISABLE_BEACON_HINTS
      struct wiphy *wiphy;
      +wiphy->regulatory_flags & REGULATORY_DISABLE_BEACON_HINTS
      Generated-by: Coccinelle SmPL
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Cc: Peter Senna Tschudin <peter.senna@gmail.com>
      Cc: Mihir Shete <smihir@qti.qualcomm.com>
      Cc: Henri Bahini <hbahini@qca.qualcomm.com>
      Cc: Tushnim Bhattacharyya <tushnimb@qca.qualcomm.com>
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
      [fix up whitespace damage, overly long lines]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Janusz Dziedzic's avatar
      cfg80211/mac80211: DFS setup chandef for cac event · d2859df5
      Janusz Dziedzic authored
      To report channel width correctly we have
      to send correct channel parameters from
      mac80211 when calling cfg80211_cac_event().
      This is required in case of using channel width
      higher than 20MHz and we have to set correct
      dfs channel state after CAC (NL80211_DFS_AVAILABLE).
      Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Reviewed-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Luis R. Rodriguez's avatar
      cfg80211: force WIPHY_FLAG_CUSTOM_REGULATORY on wiphy_apply_custom_regulatory() · 222ea581
      Luis R. Rodriguez authored
      wiphy_apply_custom_regulatory() implies WIPHY_FLAG_CUSTOM_REGULATORY
      but we never enforced it, do that now and warn if the driver
      didn't set it. All drivers should be following this today already.
      Having WIPHY_FLAG_CUSTOM_REGULATORY does not however mean you will
      use wiphy_apply_custom_regulatory() though, you may have your own
      _orig value set up tools / helpers. The intel drivers are examples
      of this type of driver.
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    • Luis R. Rodriguez's avatar
      cfg80211: consolidate passive-scan and no-ibss flags · 8fe02e16
      Luis R. Rodriguez authored
      These two flags are used for the same purpose, just
      combine them into a no-ir flag to annotate no initiating
      radiation is allowed.
      Old userspace sending either flag will have it treated as
      the no-ir flag. To be considerate to older userspace we
      also send both the no-ir flag and the old no-ibss flags.
      Newer userspace will have to be aware of older kernels.
      Update all places in the tree using these flags with the
      following semantic patch:
      -NL80211_RRF_NO_IR | NL80211_RRF_NO_IR
      -IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_NO_IR
      Along with some hand-optimisations in documentation, to
      remove duplicates and to fix some indentation.
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
      [do all the driver updates in one go]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  10. 28 Oct, 2013 2 commits
  11. 18 Oct, 2013 1 commit
  12. 11 Oct, 2013 1 commit
  13. 26 Sep, 2013 1 commit
  14. 23 Aug, 2013 1 commit
  15. 12 Aug, 2013 1 commit
  16. 01 Aug, 2013 1 commit
  17. 31 Jul, 2013 1 commit
  18. 16 Jul, 2013 7 commits
  19. 19 Jun, 2013 1 commit