1. 02 Oct, 2018 1 commit
    • mpubbise@codeaurora.org's avatar
      mac80211: add stations tied to AP_VLANs during hw reconfig · 61a7b731
      mpubbise@codeaurora.org authored
      BugLink: https://bugs.launchpad.net/bugs/1792392
      
      [ Upstream commit 19103a4b
      
       ]
      
      As part of hw reconfig, only stations linked to AP interfaces are added
      back to the driver ignoring those which are tied to AP_VLAN interfaces.
      
      It is true that there could be stations tied to the AP_VLAN interface while
      serving 4addr clients or when using AP_VLAN for VLAN operations; we should
      be adding these stations back to the driver as part of hw reconfig, failing
      to do so can cause functional issues.
      
      In the case of ath10k driver, the following errors were observed.
      
      ath10k_pci : failed to install key for non-existent peer XX:XX:XX:XX:XX:XX
      Workqueue: events_freezable ieee80211_restart_work [mac80211]
      (unwind_backtrace) from (show_stack+0x10/0x14)
      (show_stack) (dump_stack+0x80/0xa0)
      (dump_stack) (warn_slowpath_common+0x68/0x8c)
      (warn_slowpath_common) (warn_slowpath_null+0x18/0x20)
      (warn_slowpath_null) (ieee80211_enable_keys+0x88/0x154 [mac80211])
      (ieee80211_enable_keys) (ieee80211_reconfig+0xc90/0x19c8 [mac80211])
      (ieee80211_reconfig]) (ieee80211_restart_work+0x8c/0xa0 [mac80211])
      (ieee80211_restart_work) (process_one_work+0x284/0x488)
      (process_one_work) (worker_thread+0x228/0x360)
      (worker_thread) (kthread+0xd8/0xec)
      (kthread) (ret_from_fork+0x14/0x24)
      
      Also while bringing down the AP VAP, WARN_ONs and errors related to peer
      removal were observed.
      
      ath10k_pci : failed to clear all peer wep keys for vdev 0: -2
      ath10k_pci : failed to disassociate station: 8c:fd:f0:0a:8c:f5 vdev 0: -2
      (unwind_backtrace) (show_stack+0x10/0x14)
      (show_stack) (dump_stack+0x80/0xa0)
      (dump_stack) (warn_slowpath_common+0x68/0x8c)
      (warn_slowpath_common) (warn_slowpath_null+0x18/0x20)
      (warn_slowpath_null) (sta_set_sinfo+0xb98/0xc9c [mac80211])
      (sta_set_sinfo [mac80211]) (__sta_info_flush+0xf0/0x134 [mac80211])
      (__sta_info_flush [mac80211]) (ieee80211_stop_ap+0xe8/0x390 [mac80211])
      (ieee80211_stop_ap [mac80211]) (__cfg80211_stop_ap+0xe0/0x3dc [cfg80211])
      (__cfg80211_stop_ap [cfg80211]) (cfg80211_stop_ap+0x30/0x44 [cfg80211])
      (cfg80211_stop_ap [cfg80211]) (genl_rcv_msg+0x274/0x30c)
      (genl_rcv_msg) (netlink_rcv_skb+0x58/0xac)
      (netlink_rcv_skb) (genl_rcv+0x20/0x34)
      (genl_rcv) (netlink_unicast+0x11c/0x204)
      (netlink_unicast) (netlink_sendmsg+0x30c/0x370)
      (netlink_sendmsg) (sock_sendmsg+0x70/0x84)
      (sock_sendmsg) (___sys_sendmsg.part.3+0x188/0x228)
      (___sys_sendmsg.part.3) (__sys_sendmsg+0x4c/0x70)
      (__sys_sendmsg) (ret_fast_syscall+0x0/0x44)
      
      These issues got fixed by adding the stations which are
      tied to AP_VLANs back to the driver.
      Signed-off-by: default avatarManikanta Pubbisetty <mpubbise@codeaurora.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
      Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
      61a7b731
  2. 07 Jun, 2018 1 commit
  3. 15 Dec, 2015 2 commits
    • Johannes Berg's avatar
      mac80211: reprogram in interface order · 1ea2c864
      Johannes Berg authored
      
      During reprogramming, mac80211 currently first adds all the channel
      contexts, then binds them to the vifs and then goes to reconfigure
      all the interfaces. Drivers might, perhaps implicitly, rely on the
      operation order for certain things that typically happen within a
      single function elsewhere in mac80211. To avoid problems with that,
      reorder the code in mac80211's restart/reprogramming to work fully
      within the interface loop so that the order of operations is like
      in normal operation.
      
      For iwlwifi, this fixes a firmware crash when reprogramming with an
      AP/GO interface active.
      Reported-by: default avatarDavid Spinadel <david.spinadel@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      1ea2c864
    • Johannes Berg's avatar
      mac80211: run scan completed work on reconfig failure · 74430f94
      Johannes Berg authored
      
      When reconfiguration during resume fails while a scan is pending
      for completion work, that work will never run, and the scan will
      be stuck forever. Factor out the code to recover this and call it
      also in ieee80211_handle_reconfig_failure().
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      74430f94
  4. 03 Nov, 2015 7 commits
  5. 14 Oct, 2015 1 commit
  6. 13 Oct, 2015 1 commit
  7. 08 Oct, 2015 1 commit
  8. 29 Sep, 2015 2 commits
  9. 22 Sep, 2015 2 commits
  10. 17 Jul, 2015 4 commits
  11. 10 Jun, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: convert HW flags to unsigned long bitmap · 30686bf7
      Johannes Berg authored
      
      As we're running out of hardware capability flags pretty quickly,
      convert them to use the regular test_bit() style unsigned long
      bitmaps.
      
      This introduces a number of helper functions/macros to set and to
      test the bits, along with new debugfs code.
      
      The occurrences of an explicit __clear_bit() are intentional, the
      drivers were never supposed to change their supported bits on the
      fly. We should investigate changing this to be a per-frame flag.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      30686bf7
  12. 20 May, 2015 1 commit
    • Michal Kazior's avatar
      mac80211: fix AP_VLAN crypto tailroom calculation · f9dca80b
      Michal Kazior authored
      
      Some splats I was seeing:
      
       (a) WARNING: CPU: 1 PID: 0 at /devel/src/linux/net/mac80211/wep.c:102 ieee80211_wep_add_iv
       (b) WARNING: CPU: 1 PID: 0 at /devel/src/linux/net/mac80211/wpa.c:73 ieee80211_tx_h_michael_mic_add
       (c) WARNING: CPU: 3 PID: 0 at /devel/src/linux/net/mac80211/wpa.c:433 ieee80211_crypto_ccmp_encrypt
      
      I've seen (a) and (b) with ath9k hw crypto and (c)
      with ath9k sw crypto. All of them were related to
      insufficient skb tailroom and I was able to
      trigger these with ping6 program.
      
      AP_VLANs may inherit crypto keys from parent AP.
      This wasn't considered and yielded problems in
      some setups resulting in inability to transmit
      data because mac80211 wouldn't resize skbs when
      necessary and subsequently drop some packets due
      to insufficient tailroom.
      
      For efficiency purposes don't inspect both AP_VLAN
      and AP sdata looking for tailroom counter. Instead
      update AP_VLAN tailroom counters whenever their
      master AP tailroom counter changes.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f9dca80b
  13. 07 Apr, 2015 1 commit
  14. 01 Apr, 2015 1 commit
    • Felix Fietkau's avatar
      mac80211: add an intermediate software queue implementation · ba8c3d6f
      Felix Fietkau authored
      
      This allows drivers to request per-vif and per-sta-tid queues from which
      they can pull frames. This makes it easier to keep the hardware queues
      short, and to improve fairness between clients and vifs.
      
      The task of scheduling packet transmission is left up to the driver -
      queueing is controlled by mac80211. Drivers can only dequeue packets by
      calling ieee80211_tx_dequeue. This makes it possible to add active queue
      management later without changing drivers using this code.
      
      This can also be used as a starting point to implement A-MSDU
      aggregation in a way that does not add artificially induced latency.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      [resolved minor context conflict, minor changes, endian annotations]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      ba8c3d6f
  15. 30 Mar, 2015 1 commit
  16. 16 Mar, 2015 2 commits
  17. 04 Mar, 2015 1 commit
  18. 03 Mar, 2015 2 commits
  19. 27 Jan, 2015 1 commit
  20. 23 Jan, 2015 1 commit
    • Emmanuel Grumbach's avatar
      mac80211: avoid races related to suspend flow · 4afaff17
      Emmanuel Grumbach authored
      
      When we go to suspend, there is complex set of states that
      avoids races. The quiescing variable is set whlie
      __ieee80211_suspend is running. Then suspended is set.
      The code makes sure there is no window without any of these
      flags.
      
      The problem is that workers can still be enqueued while we
      are quiescing. This leads to situations where the driver is
      already suspending and other flows like disassociation are
      handled by a worker.
      
      To fix this, we need to check quiescing and suspended flags
      in the worker itself and not only before enqueueing it.
      I also add here extensive documentation to ease the
      understanding of these complex issues.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      4afaff17
  21. 15 Jan, 2015 2 commits
    • Johannes Berg's avatar
      cfg80211: change bandwidth reporting to explicit field · b51f3bee
      Johannes Berg authored
      
      For some reason, we made the bandwidth separate flags, which
      is rather confusing - a single rate cannot have different
      bandwidths at the same time.
      
      Change this to no longer be flags but use a separate field
      for the bandwidth ('bw') instead.
      
      While at it, add support for 5 and 10 MHz rates - these are
      reported as regular legacy rates with their real bitrate,
      but tagged as 5/10 now to make it easier to distinguish them.
      
      In the nl80211 API, the flags are preserved, but the code
      now can also clearly only set a single one of the flags.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      b51f3bee
    • Johannes Berg's avatar
      mac80211: remove 80+80 MHz rate reporting · f89903d5
      Johannes Berg authored
      
      These rates are treated the same as 160 MHz in the spec,
      so it makes no sense to distinguish them. As no driver
      uses them yet, this is also not a problem, just remove
      them.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f89903d5
  22. 14 Jan, 2015 1 commit
  23. 06 Jan, 2015 1 commit
  24. 17 Dec, 2014 1 commit
  25. 25 Nov, 2014 1 commit