]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/net/wireless/iwlwifi/mvm/offloading.c
iwlwifi: mvm: configure protocol offloading on D0i3
[mirror_ubuntu-jammy-kernel.git] / drivers / net / wireless / iwlwifi / mvm / offloading.c
index 9ec5a5991e3a65ae3e118a0a1416f6f046713b1e..9bfb95e89cfbbdab1b446c55d5423a795eb87e03 100644 (file)
@@ -81,7 +81,10 @@ void iwl_mvm_set_wowlan_qos_seq(struct iwl_mvm_sta *mvm_ap_sta,
        }
 }
 
-int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
+int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm,
+                              struct ieee80211_vif *vif,
+                              bool disable_offloading,
+                              u32 cmd_flags)
 {
        union {
                struct iwl_proto_offload_cmd_v1 v1;
@@ -91,7 +94,7 @@ int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
        } cmd = {};
        struct iwl_host_cmd hcmd = {
                .id = PROT_OFFLOAD_CONFIG_CMD,
-               .flags = CMD_SYNC,
+               .flags = cmd_flags,
                .data[0] = &cmd,
                .dataflags[0] = IWL_HCMD_DFL_DUP,
        };
@@ -204,10 +207,8 @@ int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
                memcpy(common->arp_mac_addr, vif->addr, ETH_ALEN);
        }
 
-       if (!enabled)
-               return 0;
-
-       common->enabled = cpu_to_le32(enabled);
+       if (!disable_offloading)
+               common->enabled = cpu_to_le32(enabled);
 
        hcmd.len[0] = size;
        return iwl_mvm_send_cmd(mvm, &hcmd);