iwlwifi: mvm: support broadcast TWT alone
authorShaul Triebitz <shaul.triebitz@intel.com>
Thu, 26 Aug 2021 19:47:41 +0000 (22:47 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 26 Aug 2021 20:38:17 +0000 (23:38 +0300)
Tell the firmware about broadcast TWT support
even if individual TWT is not supported.
In that case the firmware will negotiate only
a broadcast TWT session.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.556934ed023a.I843677252be64f4732e434ab9ef72f487625e49e@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c

index 1ebd465..fd352b2 100644 (file)
@@ -647,15 +647,14 @@ static int iwl_mvm_mac_ctxt_cmd_sta(struct iwl_mvm *mvm,
 
        if (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax) {
                cmd.filter_flags |= cpu_to_le32(MAC_FILTER_IN_11AX);
-               if (vif->bss_conf.twt_requester && IWL_MVM_USE_TWT) {
+               if (vif->bss_conf.twt_requester && IWL_MVM_USE_TWT)
                        ctxt_sta->data_policy |= cpu_to_le32(TWT_SUPPORTED);
-                       if (vif->bss_conf.twt_protected)
-                               ctxt_sta->data_policy |=
-                                       cpu_to_le32(PROTECTED_TWT_SUPPORTED);
-                       if (vif->bss_conf.twt_broadcast)
-                               ctxt_sta->data_policy |=
-                                       cpu_to_le32(BROADCAST_TWT_SUPPORTED);
-               }
+               if (vif->bss_conf.twt_protected)
+                       ctxt_sta->data_policy |=
+                               cpu_to_le32(PROTECTED_TWT_SUPPORTED);
+               if (vif->bss_conf.twt_broadcast)
+                       ctxt_sta->data_policy |=
+                               cpu_to_le32(BROADCAST_TWT_SUPPORTED);
        }