* there is an indication that a non-BSS interface is to be added.
* @IWL_MLD_EMLSR_BLOCKED_TPT: throughput is too low to make EMLSR worthwhile
* @IWL_MLD_EMLSR_BLOCKED_NAN: NAN is preventing EMLSR.
+ * @IWL_MLD_EMLSR_BLOCKED_TDLS: TDLS connection is preventing EMLSR.
*/
enum iwl_mld_emlsr_blocked {
IWL_MLD_EMLSR_BLOCKED_PREVENTION = 0x1,
IWL_MLD_EMLSR_BLOCKED_TMP_NON_BSS = 0x10,
IWL_MLD_EMLSR_BLOCKED_TPT = 0x20,
IWL_MLD_EMLSR_BLOCKED_NAN = 0x40,
+ IWL_MLD_EMLSR_BLOCKED_TDLS = 0x80,
};
/**
if (ret)
return ret;
- /* just added first TDLS STA, so disable PM */
- if (sta->tdls && tdls_count == 0)
+ /* just added first TDLS STA, so disable PM and block EMLSR */
+ if (sta->tdls && tdls_count == 0) {
iwl_mld_update_mac_power(mld, vif, false);
+ /* TDLS requires single-link operation with
+ * direct peer communication.
+ * Block and exit EMLSR when TDLS is established.
+ */
+ iwl_mld_block_emlsr(mld, vif,
+ IWL_MLD_EMLSR_BLOCKED_TDLS,
+ iwl_mld_get_primary_link(vif));
+ }
+
if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls)
mld_vif->ap_sta = sta;
iwl_mld_remove_sta(mld, sta);
if (sta->tdls && iwl_mld_tdls_sta_count(mld) == 0) {
- /* just removed last TDLS STA, so enable PM */
+ /* just removed last TDLS STA, so enable PM
+ * and unblock EMLSR
+ */
iwl_mld_update_mac_power(mld, vif, false);
+
+ /* Unblock EMLSR when TDLS connection is torn down */
+ iwl_mld_unblock_emlsr(mld, vif,
+ IWL_MLD_EMLSR_BLOCKED_TDLS);
}
} else {
return -EINVAL;