summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/offloading.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2013-11-03 21:48:50 +0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-03-16 15:45:33 +0400
commit8bd22e7bb0b02c24b3c9997670bbb65e0e0a7371 (patch)
tree544de91af2df26fe21d43a019c5537b619eaf13c /drivers/net/wireless/iwlwifi/mvm/offloading.c
parentb2492501d234ef7a99613576550126b88b377070 (diff)
downloadlinux-8bd22e7bb0b02c24b3c9997670bbb65e0e0a7371.tar.xz
iwlwifi: mvm: configure protocol offloading on D0i3
Enable protocol offloading (arp and NS) on D0i3. The offloading allows the fw answer NS and arp requests without waking up the host. Since protocol offloading is saved between D0i3 entries, we have to explicitly disable it in case we don't want it. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/offloading.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/offloading.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/offloading.c b/drivers/net/wireless/iwlwifi/mvm/offloading.c
index 9ec5a5991e3a..9bfb95e89cfb 100644
--- a/drivers/net/wireless/iwlwifi/mvm/offloading.c
+++ b/drivers/net/wireless/iwlwifi/mvm/offloading.c
@@ -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);