diff mbox series

[01/12] iwlwifi: mvm: enable TX on new CSA channel before disconnecting

Message ID iwlwifi.20210330162204.eb4f2ff1b863.Ib16238106b33d58b2b7688dc6297018b915ecef4@changeid
State Accepted
Commit e50a3224d5b99ae00342125456c95903e1aa2485
Delegated to: Luca Coelho
Headers show
Series iwlwifi: updates intended for v5.13 2021-03-30 | expand

Commit Message

Luca Coelho March 30, 2021, 1:24 p.m. UTC
From: Sara Sharon <sara.sharon@intel.com>

When moving to the new channel, we block TX until we hear the
first beacon. if it is not heard, we proceed to disconnect.
Since TX is blocked (without mac80211 being aware of it) the frame
is stuck, resulting with queue hang.

Instead, reenable TX before reporting on the connection loss.
As we are on the new channel, there is no problem with that,
even if the original CSA had quiet mode.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Luca Coelho April 12, 2021, 10:09 a.m. UTC | #1
Luca Coelho <luca@coelho.fi> wrote:

> From: Sara Sharon <sara.sharon@intel.com>
> 
> When moving to the new channel, we block TX until we hear the
> first beacon. if it is not heard, we proceed to disconnect.
> Since TX is blocked (without mac80211 being aware of it) the frame
> is stuck, resulting with queue hang.
> 
> Instead, reenable TX before reporting on the connection loss.
> As we are on the new channel, there is no problem with that,
> even if the original CSA had quiet mode.
> 
> Signed-off-by: Sara Sharon <sara.sharon@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

12 patches applied to iwlwifi-next.git, thanks.

89155fd1be13 iwlwifi: mvm: enable TX on new CSA channel before disconnecting
9c1d5a542af4 iwlwifi: pcie: avoid unnecessarily taking spinlock
15067411ad2f iwlwifi: pcie: normally grab NIC access for inflight-hcmd
b060bcc81557 iwlwifi: mvm: don't allow CSA if we haven't been fully associated
0c845f9c9584 iwlwifi: pcie: Add support for Bz Family
2d23d815f958 iwlwifi: change step in so-gf struct
cb10926a0a13 iwlwifi: change name to AX 211 and 411 family
b1d5eb429c8d iwlwifi: add 160Mhz to killer 1550 name
8b06b7eda055 iwlwifi: pcie: clear only FH bits handle in the interrupt
77c07024bd4c iwlwifi: pcie: make cfg vs. trans_cfg more robust
0c5de88265be iwlwifi: mvm: support range request command version 12
1d558311f67a iwlwifi: mvm: responder: support responder config command version 8
Luca Coelho April 13, 2021, 5:56 a.m. UTC | #2
Luca Coelho <luca@coelho.fi> wrote:

> From: Sara Sharon <sara.sharon@intel.com>
> 
> When moving to the new channel, we block TX until we hear the
> first beacon. if it is not heard, we proceed to disconnect.
> Since TX is blocked (without mac80211 being aware of it) the frame
> is stuck, resulting with queue hang.
> 
> Instead, reenable TX before reporting on the connection loss.
> As we are on the new channel, there is no problem with that,
> even if the original CSA had quiet mode.
> 
> Signed-off-by: Sara Sharon <sara.sharon@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

23 patches applied to iwlwifi-next.git, thanks.

e50a3224d5b9 iwlwifi: mvm: enable TX on new CSA channel before disconnecting
d583a96c20de iwlwifi: pcie: avoid unnecessarily taking spinlock
adedb902b4c3 iwlwifi: pcie: normally grab NIC access for inflight-hcmd
c0bb606bd2c6 iwlwifi: mvm: don't allow CSA if we haven't been fully associated
f8f6cb35b440 iwlwifi: pcie: Add support for Bz Family
abab8a17a411 iwlwifi: change step in so-gf struct
a7c74adb6933 iwlwifi: change name to AX 211 and 411 family
727e0c990a82 iwlwifi: add 160Mhz to killer 1550 name
25122919dbbb iwlwifi: pcie: clear only FH bits handle in the interrupt
8866c3ee14d6 iwlwifi: pcie: make cfg vs. trans_cfg more robust
d30732924dee iwlwifi: mvm: support range request command version 12
d7c97205df0c iwlwifi: mvm: responder: support responder config command version 8
5422db22b508 iwlwifi: mvm: write queue_sync_state only for sync
bdbb8ce0fc69 iwlwifi: mvm: clean up queue sync implementation
87e03392c341 iwlwifi: mvm: when associated with PMF, use protected NDP ranging negotiation
c45f3b5f2f5a iwlwifi: add ax201 killer device
59bb220d560c iwlwifi: mvm: Add support for 6GHz passive scan
4070cea0ff1e iwlwifi: mvm: enable PPAG in China
f4ee09ce14dc iwlwifi: add new so-gf device
0fab0784ed2e iwlwifi: move iwl_configure_rxq to be used by other op_modes
8e8f466f6ed2 iwlwifi: mvm: support BIOS enable/disable for 11ax in Ukraine
115ed30b64fa iwlwifi: mvm: refactor ACPI DSM evaluation function
a5e43bf62387 iwlwifi: mvm: Use IWL_INFO in fw_reset_handshake()
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index 0b012f8c9eb2..1418a6438635 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -151,6 +151,16 @@  static bool iwl_mvm_te_check_disconnect(struct iwl_mvm *mvm,
 	if (errmsg)
 		IWL_ERR(mvm, "%s\n", errmsg);
 
+	if (mvmvif->csa_bcn_pending) {
+		struct iwl_mvm_sta *mvmsta;
+
+		rcu_read_lock();
+		mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->ap_sta_id);
+		if (!WARN_ON(!mvmsta))
+			iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false);
+		rcu_read_unlock();
+	}
+
 	iwl_mvm_connection_loss(mvm, vif, errmsg);
 	return true;
 }