mirror_ubuntu-kernels/drivers/net/wireless/intel/iwlwifi/mvm
Naftali Goldstein a2113cc44d iwlwifi: mvm: fix race in sync rx queue notification
Consider the following flow:
 1. Driver starts to sync the rx queues due to a delba.
    mvm->queue_sync_cookie=1.
    This rx-queues-sync is synchronous, so it doesn't increment the
    cookie until all rx queues handle the notification from FW.
 2. During this time, driver starts to sync rx queues due to nssn sync
    required.
    The cookie's value is still 1, but it doesn't matter since this
    rx-queue-sync is non-synchronous so in the notification handler the
    cookie is ignored.
    What _does_ matter is that this flow increments the cookie to 2
    immediately.
    Remember though that the FW won't start servicing this command until
    it's done with the previous one.
 3. FW is still handling the first command, so it sends a notification
    with internal_notif->sync=1, and internal_notif->cookie=0, which
    triggers a WARN_ONCE.

The solution for this race is to only use the mvm->queue_sync_cookie in
case of a synchronous sync-rx-queues. This way in step 2 the cookie's
value won't change so we avoid the WARN.

The commit in the "fixes" field is the first commit to introduce
non-synchronous sending of this command to FW.

Fixes: 3c514bf831 ("iwlwifi: mvm: add a loose synchronization of the NSSN across Rx queues")
Signed-off-by: Naftali Goldstein <naftali.goldstein@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-10-09 13:01:04 +03:00
..
binding.c iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
coex.c iwlwifi: mvm: simplify some return conditions 2019-02-04 12:27:18 +02:00
constants.h iwlwifi: mvm: drop BA sessions on too many old-SN frames 2019-09-06 15:52:05 +03:00
d3.c iwlwifi: add sta_id to WOWLAN_CONFIG_CMD 2019-09-06 15:52:05 +03:00
debugfs-vif.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-05-02 22:14:21 -04:00
debugfs.c iwlwifi: add a pointer to the trans_cfg directly in trans 2019-09-06 15:52:00 +03:00
debugfs.h iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
ftm-initiator.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
ftm-responder.c iwlwifi: mvm: support FTM responder 2019-02-14 11:29:43 +02:00
fw-api.h iwlwifi: mvm: add location APIs 2019-01-29 16:10:31 +02:00
fw.c iwlwifi: mvm: force single phy init 2019-10-09 13:01:04 +03:00
led.c iwlwifi: always access the trans configuration via trans 2019-09-06 15:52:04 +03:00
mac80211.c iwlwifi: mvm: fix race in sync rx queue notification 2019-10-09 13:01:04 +03:00
mac-ctxt.c iwlwifi: dbg_ini: remove apply point, switch to time point API 2019-09-06 15:52:06 +03:00
Makefile iwlwifi: mvm: support FTM initiator 2019-02-14 11:29:43 +02:00
mvm.h iwlwifi: mvm: handle BAR_FRAME_RELEASE (0xc2) notification 2019-09-06 15:52:05 +03:00
nvm.c iwlwifi: always access the trans configuration via trans 2019-09-06 15:52:04 +03:00
offloading.c iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
ops.c iwlwifi: dbg_ini: remove periodic trigger 2019-09-06 15:52:07 +03:00
phy-ctxt.c iwlwifi: mvm: look for the first supported channel when add/remove phy ctxt 2019-09-06 15:31:22 +03:00
power.c iwlwifi: mvm: remove iwl_mvm_update_d0i3_power_mode 2019-09-06 15:31:14 +03:00
quota.c iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
rs-fw.c iwlwifi: mvm: name magic numbers with enum 2019-09-06 15:31:15 +03:00
rs.c iwlwifi: add a pointer to the trans_cfg directly in trans 2019-09-06 15:52:00 +03:00
rs.h iwlwifi: mvm: replace RS mutex with a spin_lock 2019-07-30 18:34:24 +02:00
rx.c iwlwifi: remove all the d0i3 references 2019-09-06 15:31:13 +03:00
rxmq.c iwlwifi: mvm: don't log un-decrypted frames 2019-09-06 15:52:06 +03:00
scan.c iwlwifi: dbg_ini: remove apply point, switch to time point API 2019-09-06 15:52:06 +03:00
sf.c iwlwifi: mvm: make num_active_macs unsigned 2019-01-25 20:57:21 +02:00
sta.c iwlwifi: always access the trans configuration via trans 2019-09-06 15:52:04 +03:00
sta.h iwlwifi: mvm: replace RS mutex with a spin_lock 2019-07-30 18:34:24 +02:00
tdls.c iwlwifi: remove all the d0i3 references 2019-09-06 15:31:13 +03:00
testmode.h iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
time-event.c iwlwifi: remove all the d0i3 references 2019-09-06 15:31:13 +03:00
time-event.h iwlwifi: remove all occurrences of the FSF address paragraph 2018-08-31 11:38:33 +03:00
tt.c iwlwifi: mvm: fix build w/o CONFIG_THERMAL 2019-09-19 21:58:12 +03:00
tx.c iwlwifi: add a pointer to the trans_cfg directly in trans 2019-09-06 15:52:00 +03:00
utils.c iwlwifi: always access the trans configuration via trans 2019-09-06 15:52:04 +03:00