1. 09 Sep, 2016 11 commits
    • Kalle Valo's avatar
      Merge branch 'ath-current' into ath-next · 3cd32dde
      Kalle Valo authored
      Commit 3c97f5de ("ath10k: implement NAPI support") conflicts with
      ath-current. To avoid any merge problems merge ath-current to ath-next already now.
      
      Conflicts:
      	drivers/net/wireless/ath/ath10k/htt_rx.c
      3cd32dde
    • Daniel Wagner's avatar
      carl9170: Fix wrong completion usage · 78a9e170
      Daniel Wagner authored
      carl9170_usb_stop() is used from several places to flush and cleanup any
      pending work. The normal pattern is to send a request and wait for the
      irq handler to call complete(). The completion is not reinitialized
      during normal operation and as the old comment indicates it is important
      to keep calls to wait_for_completion_timeout() and complete() balanced.
      
      Calling complete_all() brings this equilibirum out of balance and needs
      to be fixed by a reinit_completion(). But that opens a small race
      window. It is possible that the sequence of complete_all(),
      reinit_completion() is faster than the wait_for_completion_timeout() can
      do its work. The wake up is not lost but the done counter test is after
      reinit_completion() has been executed. The only reason we don't see
      carl9170_exec_cmd() hang forever is we use the timeout version of
      wait_for_copletion().
      
      Let's fix this by reinitializing the completion (that is just setting
      done counter to 0) just before we send out an request. Now,
      carl9170_usb_stop() can be sure a complete() call is enough to make
      progess since there is only one waiter at max. This is a common pattern
      also seen in various drivers which use completion.
      Signed-off-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      78a9e170
    • Eric Bentley's avatar
      ath6kl: Allow the radio to report 0 dbm txpower without timing out · cabd34d0
      Eric Bentley authored
      The ath6kl driver attempts to get the txpower value from the radio by first
      clearing the existing stored value and then watching the value to become
      non-zero.
      
      APs allow setting client power to values from -127..127, but this radio
      is not capable of setting values less then 0 and so will report txpower
      as 0dbm for both negative and 0 client power values.
      
      When the radio has txpower set to 0dbm txpower (equivalent to 1mw) the
      ath6kl_cfg80211_get_txpower() function will remain in the
      wait_event_interruptible_timeout() loop waiting for the value to be
      non-zero, and will eventually timeout. This results in a 5 second delay in
      response. However, the correct value of zero is eventually returned.
      
      The 6004 defaults to 63dbm which is then limited by regulatory and
      hardware limits with max of 18dbm (6003 max is 16dbm), therefore we can
      use values larger then these to be able to determine when the value has
      been updated.
      
      To correct the issue, set the value to a nonsensical value (255) and wait
      for it to change to the valid value.
      
      Tested on both 6003 and 6004 based radios.  Return value of zero is
      correctly returned in an expected amount of time (similar to when
      returning non-zero values) when AP client power is set to both 0 and
      negative values.
      Signed-off-by: default avatarEric Bentley <eric.bentley@lairdtech.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      cabd34d0
    • Dan Kephart's avatar
      ath6kl: enable firmware crash dumps on the AR6004 · f3fa6314
      Dan Kephart authored
      The firmware crash dumps on the 6004 are the same as the 6003. Remove the
      statement guarding it from dumping on the 6004.  Renamed the
      REG_DUMP_COUNT_AR6003 to reflect support on both chips.
      Signed-off-by: default avatarDan Kephart <dan.kephart@lairdtech.com>
      Reviewed-by: default avatarSteve deRosier <steve.derosier@lairdtech.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      f3fa6314
    • Bob Copeland's avatar
      ath9k: remove repetitions of mask array size · b5182e15
      Bob Copeland authored
      The constant "123", which is the number of elements in
      mask_m / mask_p, is repeated several times in this function.
      
      Replace memsets with array initialization, and replace a loop
      conditional with ARRAY_SIZE() so that we don't repeat ourselves.
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Reviewed-by: default avatarOleksij Rempel <linux@rempel-privat.de>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      b5182e15
    • Ashok Raj Nagarajan's avatar
      ath10k: fix reporting channel survey data · 77eb3d69
      Ashok Raj Nagarajan authored
      When user requests for survey dump data, driver is providing wrong survey
      information. This information we sent is the survey data that we have
      collected during previous user request.
      
      This issue occurs because we request survey dump for wrong channel. With
      this change, we correctly display the correct and current survey
      information to userspace.
      
      Fixes: fa7937e3 ("ath10k: update bss channel survey information")
      Signed-off-by: default avatarAshok Raj Nagarajan <arnagara@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      77eb3d69
    • Mohammed Shafi Shajakhan's avatar
      ath10k: remove unnecessary error code assignment · fe79f631
      Mohammed Shafi Shajakhan authored
      The error assigned does not seems to be used anywhere,
      fixes nothing just a small cleanup
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      fe79f631
    • Felix Fietkau's avatar
      ath9k: improve powersave filter handling · 315c457f
      Felix Fietkau authored
      For non-aggregated frames, ath9k was leaving handling of powersave
      filtered packets to mac80211. This can be too slow if the intermediate
      queue is already filled with packets and mac80211 does not immediately
      send a new packet via drv_tx().
      
      Improve response time with filtered frames by triggering clearing the
      powersave filter internally.
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      315c457f
    • Felix Fietkau's avatar
      ath9k: use ieee80211_tx_status_noskb where possible · d94a461d
      Felix Fietkau authored
      It removes the need for undoing the padding changes to skb->data and it
      improves performance by eliminating one tx status lookup per MPDU in the
      status path. It is also useful for preparing a follow-up fix to better
      handle powersave filtering.
      
      A side effect is that these counters, available via debugfs, become now invalid:
      
      * dot11TransmittedFragmentCount
      * dot11FrameDuplicateCount,
      * dot11ReceivedFragmentCount
      * dot11MulticastReceivedFrameCount
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      [kvalo@qca.qualcomm.com: add a note about counters, thanks to Zefir Kurtisi]
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      d94a461d
    • Rajkumar Manoharan's avatar
      ath10k: fix throughput regression in multi client mode · 18f53fe0
      Rajkumar Manoharan authored
      commit 7a0adc83 ("ath10k: improve tx scheduling") is causing
      severe throughput drop in multi client mode. This issue is originally
      reported in veriwave setup with 50 clients with TCP downlink traffic.
      While increasing number of clients, the average throughput drops
      gradually. With 50 clients, the combined peak throughput is decreased
      to 98 Mbps whereas reverting given commit restored it to 550 Mbps.
      
      Processing txqs for every tx completion is causing overhead. Ideally for
      management frame tx completion, pending txqs processing can be avoided.
      The change partly reverts the commit "ath10k: improve tx scheduling".
      Processing pending txqs after all skbs tx completion will yeild enough
      room to burst tx frames.
      
      Fixes: 7a0adc83 ("ath10k: improve tx scheduling")
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      18f53fe0
    • Rajkumar Manoharan's avatar
      ath10k: implement NAPI support · 3c97f5de
      Rajkumar Manoharan authored
      Add NAPI support for rx and tx completion. NAPI poll is scheduled
      from interrupt handler. The design is as below
      
       - on interrupt
           - schedule napi and mask interrupts
       - on poll
         - process all pipes (no actual Tx/Rx)
         - process Rx within budget
         - if quota exceeds budget reschedule napi poll by returning budget
         - process Tx completions and update budget if necessary
         - process Tx fetch indications (pull-push)
         - push any other pending Tx (if possible)
         - before resched or napi completion replenish htt rx ring buffer
         - if work done < budget, complete napi poll and unmask interrupts
      
      This change also get rid of two tasklets (intr_tq and txrx_compl_task).
      
      Measured peak throughput with NAPI on IPQ4019 platform in controlled
      environment. No noticeable reduction in throughput is seen and also
      observed improvements in CPU usage. Approx. 15% CPU usage got reduced
      in UDP uplink case.
      
      DL: AP DUT Tx
      UL: AP DUT Rx
      
      IPQ4019 (avg. cpu usage %)
      
      ========
                      TOT              +NAPI
                    ===========      =============
      TCP DL       644 Mbps (42%)    645 Mbps (36%)
      TCP UL       673 Mbps (30%)    675 Mbps (26%)
      UDP DL       682 Mbps (49%)    680 Mbps (49%)
      UDP UL       720 Mbps (28%)    717 Mbps (11%)
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      3c97f5de
  2. 07 Sep, 2016 1 commit
  3. 02 Sep, 2016 13 commits
    • Miaoqing Pan's avatar
      ath9k: fix AR5416 access GPIO warning · db7b542e
      Miaoqing Pan authored
      The warning was seen on AR5416 chip, which invoke ath9k_hw_gio_get()
      before the GPIO initialized correctly.
      
          WARNING: CPU: 1 PID: 1159 at ~/drivers/net/wireless/ath/ath9k/hw.c:2776 ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw]
          ...
          CPU: 1 PID: 1159 Comm: systemd-udevd Not tainted 4.7.0-rc7-aptosid-amd64 #1 aptosid 4.7~rc7-1~git92.slh.3
          Hardware name:                  /DH67CL, BIOS BLH6710H.86A.0160.2012.1204.1156 12/04/2012
            0000000000000286 00000000f912d633 ffffffff81290fd3 0000000000000000
            0000000000000000 ffffffff81063fd4 ffff88040c6dc018 0000000000000000
            0000000000000002 0000000000000000 0000000000000100 ffff88040c6dc018
          Call Trace:
            [<ffffffff81290fd3>] ? dump_stack+0x5c/0x79
            [<ffffffff81063fd4>] ? __warn+0xb4/0xd0
            [<ffffffffa0668fb8>] ? ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw]
      Signed-off-by: default avatarMiaoqing Pan <miaoqing@codeaurora.org>
      Reported-by: default avatarStefan Lippers-Hollmann <s.l-h@gmx.de>
      Tested-by: default avatarStefan Lippers-Hollmann <s.l-h@gmx.de>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      db7b542e
    • Baoyou Xie's avatar
      ath9k: mark ath_fill_led_pin() static · c39265f7
      Baoyou Xie authored
      We get 1 warning about global functions without a declaration
      in the ath9k gpio driver when building with W=1:
      drivers/net/wireless/ath/ath9k/gpio.c:25:6: warning: no previous prototype for 'ath_fill_led_pin' [-Wmissing-prototypes]
      
      In fact, this function is only used in the file in which it is declared
      and don't need a declaration, but can be made static.
      so this patch marks it 'static'.
      Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      c39265f7
    • Colin Ian King's avatar
      ath10k: fix spelling mistake "montior" -> "monitor" · 7f03d306
      Colin Ian King authored
      Trivial fix to spelling mistake in ath10k_warn message.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarJulian Calaby <julian.calaby@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      7f03d306
    • Mohammed Shafi Shajakhan's avatar
      ath10k: Fix broken NULL func data frame status for 10.4 · 2cdce425
      Mohammed Shafi Shajakhan authored
      Older firmware with HTT delivers incorrect tx status for null func
      frames to driver, but this fixed in 10.2 and 10.4 firmware versions.
      Also this workaround results in reporting of incorrect null func status
      for 10.4. Fix this is by introducing a firmware feature flag for 10.4
      so that this workaround is skipped and proper tx status for null func
      frames are reported
      Signed-off-by: default avatarTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      2cdce425
    • Masahiro Yamada's avatar
      ath10k: replace config_enabled() with IS_REACHABLE() · 749bc03a
      Masahiro Yamada authored
      Commit 97f2645f ("tree-wide: replace config_enabled() with
      IS_ENABLED()") mostly did away with config_enabled().
      
      This is one of the postponed TODO items as config_enabled() is used
      for a tristate option here.  Theoretically, config_enabled() is
      equivalent to IS_BUILTIN(), but I guess IS_REACHABLE() is the best
      fit for this case because both CONFIG_HWMON and CONFIG_ATH10K are
      tristate.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      749bc03a
    • Maharaja Kennadyrajan's avatar
      ath10k: Added support for extended dbglog module id for 10.4 · afcbc82c
      Maharaja Kennadyrajan authored
      For 10.4 fw versions, dbglog module id has been extended from u32
      to u64, hence this patch fixes the same in the ath10k driver side.
      
      This patch doesn't break the older 10.4 releases. The FW change
      is already present in the older FWs.
      Signed-off-by: default avatarMaharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      afcbc82c
    • Daniel Wagner's avatar
      ath10k: use complete() instead complete_all() · 881ed54e
      Daniel Wagner authored
      There is only one waiter for the completion, therefore there
      is no need to use complete_all(). Let's make that clear by
      using complete() instead of complete_all().
      
      The usage pattern of the completion is:
      
      waiter context                          waker context
      
      scan.started
      ------------
      
      ath10k_start_scan()
        lockdep_assert_held(conf_mutex)
        auth10k_wmi_start_scan()
        wait_for_completion_timeout(scan.started)
      
      					ath10k_wmi_event_scan_start_failed()
      					  complete(scan.started)
      
      					ath10k_wmi_event_scan_started()
      					  complete(scan.started)
      
      scan.completed
      --------------
      
      ath10k_scan_stop()
        lockdep_assert_held(conf_mutex)
        ath10k_wmi_stop_scan()
        wait_for_completion_timeout(scan.completed)
      
      					__ath10k_scan_finish()
      					  complete(scan.completed)
      
      scan.on_channel
      ---------------
      
      ath10k_remain_on_channel()
        mutex_lock(conf_mutex)
        ath10k_start_scan()
        wait_for_completion_timeout(scan.on_channel)
      
      					ath10k_wmi_event_scan_foreign_chan()
      					  complete(scan.on_channel)
      
      offchan_tx_completed
      --------------------
      
      ath10k_offchan_tx_work()
        mutex_lock(conf_mutex)
        reinit_completion(offchan_tx_completed)
        wait_for_completion_timeout(offchan_tx_completed)
      
      					ath10k_report_offchain_tx()
      					  complete(offchan_tx_completed)
      
      install_key_done
      ----------------
      ath10k_install_key()
        lockep_assert_held(conf_mutex)
        reinit_completion(install_key_done)
        wait_for_completion_timeout(install_key_done)
      
      				        ath10k_htt_t2h_msg_handler()
      					  complete(install_key_done)
      
      vdev_setup_done
      ---------------
      
      ath10k_monitor_vdev_start()
        lockdep_assert_held(conf_mutex)
         reinit_completion(vdev_setup_done)
        ath10k_vdev_setup_sync()
          wait_for_completion_timeout(vdev_setup_done)
      
      					ath10k_wmi_event_vdev_start_resp()
      					  complete(vdev_setup_done)
      
      ath10k_monitor_vdev_stop()
        lockdep_assert_held(conf_mutex)
        reinit_completion(vdev_setup_done()
        ath10k_vdev_setup_sync()
          wait_for_completion_timeout(vdev_setup_done)
      
      					ath10k_wmi_event_vdev_stopped()
      					 complete(vdev_setup_done)
      
      thermal.wmi_sync
      ----------------
      ath10k_thermal_show_temp()
        mutex_lock(conf_mutex)
        reinit_completion(thermal.wmi_sync)
        wait_for_completion_timeout(thermal.wmi_sync)
      
      					ath10k_thermal_event_temperature()
      					  complete(thermal.wmi_sync)
      
      bss_survey_done
      ---------------
      ath10k_mac_update_bss_chan_survey
        lockdep_assert_held(conf_mutex)
        reinit_completion(bss_survey_done)
        wait_for_completion_timeout(bss_survey_done)
      
      					ath10k_wmi_event_pdev_bss_chan_info()
      					  complete(bss_survey_done)
      
      All complete() calls happen while the conf_mutex is taken. That means
      at max one waiter is possible.
      Signed-off-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      881ed54e
    • Ashok Raj Nagarajan's avatar
      ath10k: fix sending frame in management path in push txq logic · e4fd726f
      Ashok Raj Nagarajan authored
      In the wake tx queue path, we are not checking if the frame to be sent
      takes management path or not. For eg. QOS null func frame coming here will
      take the management path. Since we are not incrementing the descriptor
      counter (num_pending_mgmt_tx) w.r.t tx management, on tx completion it is
      possible to see negative values.
      
      When the above counter reaches a negative value, we will not be sending a
      probe response out.
      
          if (is_presp &&
      	ar->hw_params.max_probe_resp_desc_thres < htt->num_pending_mgmt_tx)
      
      For IPQ4019, max_probe_resp_desc_thres (u32) is 24 is compared against
      num_pending_mgmt_tx (int) and the above condtions comes true if the counter
      is negative and we drop the probe response.
      
      To avoid this, check on the wake tx queue path as well for the tx path of
      the frame and increment the appropriate counters
      
      Fixes: cac08552 "ath10k: move mgmt descriptor limit handle under mgmt_tx"
      Signed-off-by: default avatarAshok Raj Nagarajan <arnagara@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      e4fd726f
    • Rajkumar Manoharan's avatar
      ath10k: improve wake_tx_queue ops performance · 83e164b7
      Rajkumar Manoharan authored
      txqs_lock is interfering with wake_tx_queue submitting more frames.
      so queues don't get filled in and don't keep firmware/hardware busy
      enough. This change helps to reduce the txqs_lock contention and
      wake_tx_queue() blockage to being possible in txrx_unref().
      
      To reduce turn around time of wake_tx_queue ops and to maintain fairness
      among all txqs, the callback is updated to push first txq alone from
      pending list for every wake_tx_queue call. Remaining txqs will be
      processed later upon tx completion.
      
      Below improvements are observed in push-only mode and validated on
      IPQ4019 platform. With this change, in AP mode ~10Mbps increase is
      observed in downlink (AP -> STA) traffic and approx. 5-10% of CPU
      usage is reduced.
      
      Major improvement is observed in 1-hop Mesh mode topology in 11ACVHT80.
      Compared to Infra mode, CPU overhead is higher in Mesh mode due to path
      lookup and no fast-xmit support. So reducing spin lock contention is
      helping in Mesh.
      
                   TOT       +change
                 --------    --------
      TCP DL     545 Mbps    595 Mbps
      TCP UL     555 Mbps    585 Mbps
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      83e164b7
    • Mohammed Shafi Shajakhan's avatar
      ath10k: suppress warnings when getting wmi WDS peer event id · 03c41cc1
      Mohammed Shafi Shajakhan authored
      'WMI_10_4_WDS_PEER_EVENTID' is not yet handled/implemented for WDS mode,
      as of now suppress the warning message "Unknown eventid: 36903"
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      03c41cc1
    • Rajkumar Manoharan's avatar
      ath10k: fix group privacy action frame decryption for qca4019 · 7d42298e
      Rajkumar Manoharan authored
      Recent commit 46f6b060 ("mac80211: Encrypt "Group addressed privacy" action
      frames") encrypts group privacy action frames. But qca99x0 family chipset
      delivers broadcast/multicast management frames as encrypted and it should be
      decrypted by mac80211. Setting RX_FLAG_DECRYPTED stats for those frames is
      breaking mesh connection establishment.
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      7d42298e
    • Maharaja Kennadyrajan's avatar
      ath10k: hide kernel addresses from logs using %pK format specifier · 75b34800
      Maharaja Kennadyrajan authored
      With the %pK format specifier we hide the kernel addresses
      with the help of kptr_restrict sysctl.
      In this patch, %p is changed to %pK in the driver code.
      
      The sysctl is documented in Documentation/sysctl/kernel.txt.
      Signed-off-by: default avatarMaharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      75b34800
    • Tamizh chelvam's avatar
      ath10k: Add WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT wmi service · 64ed5771
      Tamizh chelvam authored
      WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT service has missed in
      the commit 7e247a9e ("ath10k: add dynamic tx mode switch
      config support for qca4019"). This patch adds the service to
      avoid mismatch between host and target.
      
      Fixes: 7e247a9e ("ath10k: add dynamic tx mode switch config support for qca4019")
      Signed-off-by: default avatarTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      64ed5771
  4. 31 Aug, 2016 13 commits
  5. 22 Aug, 2016 2 commits
    • Felix Fietkau's avatar
      ath9k: fix using sta->drv_priv before initializing it · 7711aaf0
      Felix Fietkau authored
      A station pointer can be passed to the driver on tx, before it has been
      marked as associated. Since ath9k_sta_state was initializing the entry
      too late, it resulted in some spurious crashes.
      
      Fixes: df3c6eb3 ("ath9k: Use sta_state() callback")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      7711aaf0
    • Felix Fietkau's avatar
      ath9k: fix client mode beacon configuration · 05860bed
      Felix Fietkau authored
      For pure station mode, iter_data.primary_beacon_vif was used and passed
      to ath_beacon_config, but not set to the station vif.
      This was causing the following warning:
      
      [  100.310919] ------------[ cut here ]------------
      [  100.315683] WARNING: CPU: 0 PID: 7 at compat-wireless-2016-06-20/drivers/net/wireless/ath/ath9k/beacon.c:642 ath9k_calculate_summary_state+0x250/0x60c [ath9k]()
      [  100.402028] CPU: 0 PID: 7 Comm: kworker/u2:1 Tainted: G        W       4.4.15 #5
      [  100.409676] Workqueue: phy0 ieee80211_ibss_leave [mac80211]
      [  100.415351] Stack : 8736e98c 870b4b20 87a25b54 800a6800 8782a080 80400d63 8039b96c 00000007
      [  100.415351]    803c5edc 87875914 80400000 800a47cc 87a25b54 800a6800 803a0fd8 80400000
      [  100.415351]    00000003 87875914 80400000 80094ae0 87a25b54 8787594c 00000000 801ef308
      [  100.415351]    803ffe70 801ef300 87193d58 87b3a400 87b3ad00 70687930 00000000 00000000
      [  100.415351]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [  100.415351]    ...
      [  100.451703] Call Trace:
      [  100.454235] [<800a6800>] vprintk_default+0x24/0x30
      [  100.459110] [<800a47cc>] printk+0x2c/0x38
      [  100.463190] [<800a6800>] vprintk_default+0x24/0x30
      [  100.468072] [<80094ae0>] print_worker_info+0x148/0x174
      [  100.473378] [<801ef308>] serial8250_console_putchar+0x0/0x44
      [  100.479122] [<801ef300>] wait_for_xmitr+0xc4/0xcc
      [  100.484014] [<87193d58>] ieee80211_ibss_leave+0xb90/0x1900 [mac80211]
      [  100.490590] [<80081604>] warn_slowpath_common+0xa0/0xd0
      [  100.495922] [<801a359c>] dump_stack+0x14/0x28
      [  100.500350] [<80071a00>] show_stack+0x50/0x84
      [  100.504784] [<80081604>] warn_slowpath_common+0xa0/0xd0
      [  100.510106] [<87024c60>] ath9k_calculate_summary_state+0x250/0x60c [ath9k]
      [  100.517105] [<800816b8>] warn_slowpath_null+0x18/0x24
      [  100.522256] [<87024c60>] ath9k_calculate_summary_state+0x250/0x60c [ath9k]
      [  100.529273] [<87025418>] ath9k_set_txpower+0x148/0x498 [ath9k]
      [  100.535302] [<871d2c64>] cleanup_module+0xa74/0xd4c [mac80211]
      [  100.541237] [<801ef308>] serial8250_console_putchar+0x0/0x44
      [  100.547042] [<800a5d18>] wake_up_klogd+0x54/0x68
      [  100.551730] [<800a6650>] vprintk_emit+0x404/0x43c
      [  100.556623] [<871b9db8>] ieee80211_sta_rx_notify+0x258/0x32c [mac80211]
      [  100.563475] [<871ba6a4>] ieee80211_sta_rx_queued_mgmt+0x63c/0x734 [mac80211]
      [  100.570693] [<871aa49c>] ieee80211_tx_prepare_skb+0x210/0x230 [mac80211]
      [  100.577609] [<800af5d4>] mod_timer+0x15c/0x190
      [  100.582220] [<871ba8b8>] ieee80211_sta_work+0xfc/0xe1c [mac80211]
      [  100.588539] [<871940b4>] ieee80211_ibss_leave+0xeec/0x1900 [mac80211]
      [  100.595122] [<8009ec84>] dequeue_task_fair+0x44/0x130
      [  100.600281] [<80092a34>] process_one_work+0x1f8/0x334
      [  100.605454] [<80093830>] worker_thread+0x2b4/0x408
      [  100.610317] [<8009357c>] worker_thread+0x0/0x408
      [  100.615019] [<8009357c>] worker_thread+0x0/0x408
      [  100.619705] [<80097b68>] kthread+0xdc/0xe8
      [  100.623886] [<80097a8c>] kthread+0x0/0xe8
      [  100.627961] [<80060878>] ret_from_kernel_thread+0x14/0x1c
      [  100.633448]
      [  100.634956] ---[ end trace aafbe57e9ae6862f ]---
      
      Fixes: cfda2d8e ("ath9k: Fix beacon configuration for addition/removal of interfaces")
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      05860bed