wifi: iwlwifi: mvm: make some HW flags conditional
authorJohannes Berg <johannes.berg@intel.com>
Wed, 29 Mar 2023 07:05:07 +0000 (10:05 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 30 Mar 2023 10:08:36 +0000 (12:08 +0200)
With newer MLD firmware API we no longer need beacon timing
information from the host, so disable TIMING_BEACON_ONLY.

If MLO is enabled (currently only for testing), then we must
not have DEAUTH_NEED_MGD_TX_PREP because mac80211 doesn't
support it yet, we'll have to fix that later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230329100039.28ec631487bf.I6eb27c3d4c0289a5ec3682f573aae3424f45619f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

index c60aff0df80185fbbe9d49c7fd838203c9d66338..c76c6b1f0218078e1c5c2b9cdc598177ea1c0bd5 100644 (file)
@@ -291,17 +291,28 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
        ieee80211_hw_set(hw, SUPPORTS_PS);
        ieee80211_hw_set(hw, SUPPORTS_DYNAMIC_PS);
        ieee80211_hw_set(hw, AMPDU_AGGREGATION);
-       ieee80211_hw_set(hw, TIMING_BEACON_ONLY);
        ieee80211_hw_set(hw, CONNECTION_MONITOR);
        ieee80211_hw_set(hw, CHANCTX_STA_CSA);
        ieee80211_hw_set(hw, SUPPORT_FAST_XMIT);
        ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS);
        ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU);
        ieee80211_hw_set(hw, NEEDS_UNIQUE_STA_ADDR);
-       ieee80211_hw_set(hw, DEAUTH_NEED_MGD_TX_PREP);
        ieee80211_hw_set(hw, SUPPORTS_VHT_EXT_NSS_BW);
        ieee80211_hw_set(hw, BUFF_MMPDU_TXQ);
        ieee80211_hw_set(hw, STA_MMPDU_TXQ);
+
+       /* With MLD FW API, it tracks timing by itself,
+        * no need for any timing from the host
+        */
+       if (!mvm->mld_api_is_used)
+               ieee80211_hw_set(hw, TIMING_BEACON_ONLY);
+
+       /* We should probably have this, but mac80211
+        * currently doesn't support it for MLO.
+        */
+       if (!(hw->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO))
+               ieee80211_hw_set(hw, DEAUTH_NEED_MGD_TX_PREP);
+
        /*
         * On older devices, enabling TX A-MSDU occasionally leads to
         * something getting messed up, the command read from the FIFO