wifi: iwlwifi: mvm: properly implement HE AP support
authorJohannes Berg <johannes.berg@intel.com>
Sun, 16 Apr 2023 12:47:29 +0000 (15:47 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 17 Apr 2023 07:53:24 +0000 (09:53 +0200)
The firmware split the HE support field into HE and "pseudo HE",
the latter is really for AP and doesn't implement trigger frame
handling for example.

Use the new field for AP mode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230416154301.34dbfefe2a49.I0e39cd35dbe03ff9209b26733746479eae1c8966@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c

index e236d1b0aae263f6fb073ad2f8b189bfb1da670d..0bafa3e21cb508c0c3a005cc7dcdff1a222b0709 100644 (file)
@@ -278,6 +278,7 @@ enum iwl_mac_config_filter_flags {
  * @reserved_for_local_mld_addr: reserved
  * @filter_flags: combination of &enum iwl_mac_config_filter_flags
  * @he_support: does this MAC support HE
+ * @he_ap_support: HE AP enabled, "pseudo HE", no trigger frame handling
  * @eht_support: does this MAC support EHT. Requires he_support
  * @nic_not_ack_enabled: mark that the NIC doesn't support receiving
  *     ACK-enabled AGG, (i.e. both BACK and non-BACK frames in single AGG).
@@ -296,7 +297,8 @@ struct iwl_mac_config_cmd {
        u8 local_mld_addr[6];
        __le16 reserved_for_local_mld_addr;
        __le32 filter_flags;
-       __le32 he_support;
+       __le16 he_support;
+       __le16 he_ap_support;
        __le32 eht_support;
        __le32 nic_not_ack_enabled;
        /* MAC_CONTEXT_CONFIG_SPECIFIC_DATA_API_U_VER_1 */
index ab0ba85936b49e15fb45e69557850b6a12d65c37..d73ab1712e0e4692f20038e45e36483b228f6506 100644 (file)
@@ -4,6 +4,16 @@
  */
 #include "mvm.h"
 
+static void iwl_mvm_mld_set_he_support(struct iwl_mvm *mvm,
+                                      struct ieee80211_vif *vif,
+                                      struct iwl_mac_config_cmd *cmd)
+{
+       if (vif->type == NL80211_IFTYPE_AP)
+               cmd->he_ap_support = cpu_to_le16(1);
+       else
+               cmd->he_support = cpu_to_le16(1);
+}
+
 static void iwl_mvm_mld_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
                                            struct ieee80211_vif *vif,
                                            struct iwl_mac_config_cmd *cmd,
@@ -41,7 +51,7 @@ static void iwl_mvm_mld_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
         * and enable both when we have MLO.
         */
        if (vif->valid_links) {
-               cmd->he_support = cpu_to_le32(1);
+               iwl_mvm_mld_set_he_support(mvm, vif, cmd);
                cmd->eht_support = cpu_to_le32(1);
                return;
        }
@@ -53,7 +63,7 @@ static void iwl_mvm_mld_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
                        continue;
 
                if (link_conf->he_support)
-                       cmd->he_support = cpu_to_le32(1);
+                       iwl_mvm_mld_set_he_support(mvm, vif, cmd);
 
                /* it's not reasonable to have EHT without HE and FW API doesn't
                 * support it. Ignore EHT in this case.