1. 20 Feb, 2014 2 commits
  2. 13 Feb, 2014 1 commit
  3. 12 Feb, 2014 1 commit
    • Johannes Berg's avatar
      mac80211: add NAPI support back · 06d181a8
      Johannes Berg authored
      NAPI was originally added to mac80211 a long time ago (by John in
      commit 4e6cbfd0 in July 2010), but then removed years later
      (by Stanislaw in commit 30c97120 in February 2013). No driver
      ever used it, so that was fine.
      
      Now I'm adding support for NAPI to our driver, so add some code
      to mac80211 again  to support NAPI. John was originally wrapping
      some (but not nearly all NAPI-related functions), but that doesn't
      scale very well with the number of functions that are there, some
      of which are even only inlines. Thus, instead of doing that, let
      the drivers manage the NAPI struct, except for napi_add() which is
      needed so mac80211 knows how to call napi_gro_receive().
      
      Also remove some no longer needed definitions that were left when
      NAPI support was removed.
      Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Reviewed-by: default avatarEyal Shapira <eyal@wizery.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      06d181a8
  4. 11 Feb, 2014 1 commit
  5. 06 Feb, 2014 3 commits
  6. 04 Feb, 2014 11 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>
      9e0e2961
    • 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
      only.
      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
      problem.
      
      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
      accordingly.
      
      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>
      fe94f3a4
    • 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>
      ea73cbce
    • Johannes Berg's avatar
      mac80211: remove module handling from rate control ops · cc01f9b5
      Johannes Berg authored
      There's not a single rate control algorithm actually in
      a separate module where the module refcount would be
      required. Similarly, there's no specific rate control
      module.
      
      Therefore, all the module handling code in rate control
      is really just dead code, so remove it.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      cc01f9b5
    • Johannes Berg's avatar
      mac80211: make rate control ops const · 631ad703
      Johannes Berg authored
      Change the code to allow making all the rate control ops
      const, nothing ever needs to change them. Also change all
      drivers to make use of this and mark the ops const.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      631ad703
    • 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>
      0b9323f6
    • 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>
      4b5800fe
    • 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>
      664834de
    • 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>
      b43504cf
    • 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
      scans).
      
      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>
      1df4a510
    • Luciano Coelho's avatar
      mac80211: only set CSA beacon when at least one beacon must be transmitted · 66e01cf9
      Luciano Coelho authored
      A beacon should never have a Channel Switch Announcement information
      element with a count of 0, because a count of 1 means switch just
      before the next beacon.  So, if a count of 0 was valid in a beacon, it
      would have been transmitted in the next channel already, which is
      useless.  A CSA count equal to zero is only meaningful in action
      frames or probe_responses.
      
      Fix the ieee80211_csa_is_complete() and ieee80211_update_csa()
      functions accordingly.
      
      With a CSA count of 0, we won't transmit any CSA beacons, because the
      switch will happen before the next TBTT.  To avoid extra work and
      potential confusion in the drivers, complete the CSA immediately,
      instead of waiting for the driver to call ieee80211_csa_finish().
      
      To keep things simpler, we also switch immediately when the CSA count
      is 1, while in theory we should delay the switch until just before the
      next TBTT.
      
      Additionally, move the ieee80211_csa_finish() function to cfg.c,
      where it makes more sense.
      Tested-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      Acked-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      66e01cf9
  7. 22 Jan, 2014 4 commits
  8. 21 Jan, 2014 12 commits
  9. 19 Jan, 2014 4 commits
  10. 17 Jan, 2014 1 commit
    • Eric Dumazet's avatar
      ipv4: fix a dst leak in tunnels · 6c7e7610
      Eric Dumazet authored
      This patch :
      
      1) Remove a dst leak if DST_NOCACHE was set on dst
         Fix this by holding a reference only if dst really cached.
      
      2) Remove a lockdep warning in __tunnel_dst_set()
          This was reported by Cong Wang.
      
      3) Remove usage of a spinlock where xchg() is enough
      
      4) Remove some spurious inline keywords.
         Let compiler decide for us.
      
      Fixes: 7d442fab ("ipv4: Cache dst in tunnels")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Cong Wang <cwang@twopensource.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Maciej Żenczykowski <maze@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c7e7610