diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-11-24 02:06:57 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-12-01 05:04:38 -0500 |
commit | c8b06a99403297f01ee9c634d2c73f46d8c6d466 (patch) | |
tree | 7952a3f25ffd1e21cd7249e676c1b542362eea50 /drivers | |
parent | 2d2c0e9c81511a3bc61bbda1e86cce5991f882a2 (diff) |
iwlwifi: mvm: remove IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID
All the supported firmwares have this TLV flag set.
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/d3.c | 56 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/offloading.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 19 |
5 files changed, 34 insertions, 51 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 8970386f6b9f..c7297c581488 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
@@ -786,32 +786,18 @@ static int iwl_mvm_switch_to_d3(struct iwl_mvm *mvm) | |||
786 | } | 786 | } |
787 | 787 | ||
788 | static int | 788 | static int |
789 | iwl_mvm_send_wowlan_config_cmd(struct iwl_mvm *mvm, | ||
790 | const struct iwl_wowlan_config_cmd_v3 *cmd) | ||
791 | { | ||
792 | /* start only with the v2 part of the command */ | ||
793 | u16 cmd_len = sizeof(cmd->common); | ||
794 | |||
795 | if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID) | ||
796 | cmd_len = sizeof(*cmd); | ||
797 | |||
798 | return iwl_mvm_send_cmd_pdu(mvm, WOWLAN_CONFIGURATION, 0, | ||
799 | cmd_len, cmd); | ||
800 | } | ||
801 | |||
802 | static int | ||
803 | iwl_mvm_get_wowlan_config(struct iwl_mvm *mvm, | 789 | iwl_mvm_get_wowlan_config(struct iwl_mvm *mvm, |
804 | struct cfg80211_wowlan *wowlan, | 790 | struct cfg80211_wowlan *wowlan, |
805 | struct iwl_wowlan_config_cmd_v3 *wowlan_config_cmd, | 791 | struct iwl_wowlan_config_cmd *wowlan_config_cmd, |
806 | struct ieee80211_vif *vif, struct iwl_mvm_vif *mvmvif, | 792 | struct ieee80211_vif *vif, struct iwl_mvm_vif *mvmvif, |
807 | struct ieee80211_sta *ap_sta) | 793 | struct ieee80211_sta *ap_sta) |
808 | { | 794 | { |
809 | int ret; | 795 | int ret; |
810 | struct iwl_mvm_sta *mvm_ap_sta = (struct iwl_mvm_sta *)ap_sta->drv_priv; | 796 | struct iwl_mvm_sta *mvm_ap_sta = (struct iwl_mvm_sta *)ap_sta->drv_priv; |
811 | 797 | ||
812 | /* TODO: wowlan_config_cmd->common.wowlan_ba_teardown_tids */ | 798 | /* TODO: wowlan_config_cmd->wowlan_ba_teardown_tids */ |
813 | 799 | ||
814 | wowlan_config_cmd->common.is_11n_connection = | 800 | wowlan_config_cmd->is_11n_connection = |
815 | ap_sta->ht_cap.ht_supported; | 801 | ap_sta->ht_cap.ht_supported; |
816 | 802 | ||
817 | /* Query the last used seqno and set it */ | 803 | /* Query the last used seqno and set it */ |
@@ -819,32 +805,32 @@ iwl_mvm_get_wowlan_config(struct iwl_mvm *mvm, | |||
819 | if (ret < 0) | 805 | if (ret < 0) |
820 | return ret; | 806 | return ret; |
821 | 807 | ||
822 | wowlan_config_cmd->common.non_qos_seq = cpu_to_le16(ret); | 808 | wowlan_config_cmd->non_qos_seq = cpu_to_le16(ret); |
823 | 809 | ||
824 | iwl_mvm_set_wowlan_qos_seq(mvm_ap_sta, &wowlan_config_cmd->common); | 810 | iwl_mvm_set_wowlan_qos_seq(mvm_ap_sta, wowlan_config_cmd); |
825 | 811 | ||
826 | if (wowlan->disconnect) | 812 | if (wowlan->disconnect) |
827 | wowlan_config_cmd->common.wakeup_filter |= | 813 | wowlan_config_cmd->wakeup_filter |= |
828 | cpu_to_le32(IWL_WOWLAN_WAKEUP_BEACON_MISS | | 814 | cpu_to_le32(IWL_WOWLAN_WAKEUP_BEACON_MISS | |
829 | IWL_WOWLAN_WAKEUP_LINK_CHANGE); | 815 | IWL_WOWLAN_WAKEUP_LINK_CHANGE); |
830 | if (wowlan->magic_pkt) | 816 | if (wowlan->magic_pkt) |
831 | wowlan_config_cmd->common.wakeup_filter |= | 817 | wowlan_config_cmd->wakeup_filter |= |
832 | cpu_to_le32(IWL_WOWLAN_WAKEUP_MAGIC_PACKET); | 818 | cpu_to_le32(IWL_WOWLAN_WAKEUP_MAGIC_PACKET); |
833 | if (wowlan->gtk_rekey_failure) | 819 | if (wowlan->gtk_rekey_failure) |
834 | wowlan_config_cmd->common.wakeup_filter |= | 820 | wowlan_config_cmd->wakeup_filter |= |
835 | cpu_to_le32(IWL_WOWLAN_WAKEUP_GTK_REKEY_FAIL); | 821 | cpu_to_le32(IWL_WOWLAN_WAKEUP_GTK_REKEY_FAIL); |
836 | if (wowlan->eap_identity_req) | 822 | if (wowlan->eap_identity_req) |
837 | wowlan_config_cmd->common.wakeup_filter |= | 823 | wowlan_config_cmd->wakeup_filter |= |
838 | cpu_to_le32(IWL_WOWLAN_WAKEUP_EAP_IDENT_REQ); | 824 | cpu_to_le32(IWL_WOWLAN_WAKEUP_EAP_IDENT_REQ); |
839 | if (wowlan->four_way_handshake) | 825 | if (wowlan->four_way_handshake) |
840 | wowlan_config_cmd->common.wakeup_filter |= | 826 | wowlan_config_cmd->wakeup_filter |= |
841 | cpu_to_le32(IWL_WOWLAN_WAKEUP_4WAY_HANDSHAKE); | 827 | cpu_to_le32(IWL_WOWLAN_WAKEUP_4WAY_HANDSHAKE); |
842 | if (wowlan->n_patterns) | 828 | if (wowlan->n_patterns) |
843 | wowlan_config_cmd->common.wakeup_filter |= | 829 | wowlan_config_cmd->wakeup_filter |= |
844 | cpu_to_le32(IWL_WOWLAN_WAKEUP_PATTERN_MATCH); | 830 | cpu_to_le32(IWL_WOWLAN_WAKEUP_PATTERN_MATCH); |
845 | 831 | ||
846 | if (wowlan->rfkill_release) | 832 | if (wowlan->rfkill_release) |
847 | wowlan_config_cmd->common.wakeup_filter |= | 833 | wowlan_config_cmd->wakeup_filter |= |
848 | cpu_to_le32(IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT); | 834 | cpu_to_le32(IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT); |
849 | 835 | ||
850 | if (wowlan->tcp) { | 836 | if (wowlan->tcp) { |
@@ -852,7 +838,7 @@ iwl_mvm_get_wowlan_config(struct iwl_mvm *mvm, | |||
852 | * Set the "link change" (really "link lost") flag as well | 838 | * Set the "link change" (really "link lost") flag as well |
853 | * since that implies losing the TCP connection. | 839 | * since that implies losing the TCP connection. |
854 | */ | 840 | */ |
855 | wowlan_config_cmd->common.wakeup_filter |= | 841 | wowlan_config_cmd->wakeup_filter |= |
856 | cpu_to_le32(IWL_WOWLAN_WAKEUP_REMOTE_LINK_LOSS | | 842 | cpu_to_le32(IWL_WOWLAN_WAKEUP_REMOTE_LINK_LOSS | |
857 | IWL_WOWLAN_WAKEUP_REMOTE_SIGNATURE_TABLE | | 843 | IWL_WOWLAN_WAKEUP_REMOTE_SIGNATURE_TABLE | |
858 | IWL_WOWLAN_WAKEUP_REMOTE_WAKEUP_PACKET | | 844 | IWL_WOWLAN_WAKEUP_REMOTE_WAKEUP_PACKET | |
@@ -865,7 +851,7 @@ iwl_mvm_get_wowlan_config(struct iwl_mvm *mvm, | |||
865 | static int | 851 | static int |
866 | iwl_mvm_wowlan_config(struct iwl_mvm *mvm, | 852 | iwl_mvm_wowlan_config(struct iwl_mvm *mvm, |
867 | struct cfg80211_wowlan *wowlan, | 853 | struct cfg80211_wowlan *wowlan, |
868 | struct iwl_wowlan_config_cmd_v3 *wowlan_config_cmd, | 854 | struct iwl_wowlan_config_cmd *wowlan_config_cmd, |
869 | struct ieee80211_vif *vif, struct iwl_mvm_vif *mvmvif, | 855 | struct ieee80211_vif *vif, struct iwl_mvm_vif *mvmvif, |
870 | struct ieee80211_sta *ap_sta) | 856 | struct ieee80211_sta *ap_sta) |
871 | { | 857 | { |
@@ -947,7 +933,9 @@ iwl_mvm_wowlan_config(struct iwl_mvm *mvm, | |||
947 | } | 933 | } |
948 | } | 934 | } |
949 | 935 | ||
950 | ret = iwl_mvm_send_wowlan_config_cmd(mvm, wowlan_config_cmd); | 936 | ret = iwl_mvm_send_cmd_pdu(mvm, WOWLAN_CONFIGURATION, 0, |
937 | sizeof(*wowlan_config_cmd), | ||
938 | wowlan_config_cmd); | ||
951 | if (ret) | 939 | if (ret) |
952 | goto out; | 940 | goto out; |
953 | 941 | ||
@@ -972,7 +960,7 @@ iwl_mvm_netdetect_config(struct iwl_mvm *mvm, | |||
972 | struct cfg80211_sched_scan_request *nd_config, | 960 | struct cfg80211_sched_scan_request *nd_config, |
973 | struct ieee80211_vif *vif) | 961 | struct ieee80211_vif *vif) |
974 | { | 962 | { |
975 | struct iwl_wowlan_config_cmd_v3 wowlan_config_cmd = {}; | 963 | struct iwl_wowlan_config_cmd wowlan_config_cmd = {}; |
976 | int ret; | 964 | int ret; |
977 | 965 | ||
978 | ret = iwl_mvm_switch_to_d3(mvm); | 966 | ret = iwl_mvm_switch_to_d3(mvm); |
@@ -981,10 +969,12 @@ iwl_mvm_netdetect_config(struct iwl_mvm *mvm, | |||
981 | 969 | ||
982 | /* rfkill release can be either for wowlan or netdetect */ | 970 | /* rfkill release can be either for wowlan or netdetect */ |
983 | if (wowlan->rfkill_release) | 971 | if (wowlan->rfkill_release) |
984 | wowlan_config_cmd.common.wakeup_filter |= | 972 | wowlan_config_cmd.wakeup_filter |= |
985 | cpu_to_le32(IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT); | 973 | cpu_to_le32(IWL_WOWLAN_WAKEUP_RF_KILL_DEASSERT); |
986 | 974 | ||
987 | ret = iwl_mvm_send_wowlan_config_cmd(mvm, &wowlan_config_cmd); | 975 | ret = iwl_mvm_send_cmd_pdu(mvm, WOWLAN_CONFIGURATION, 0, |
976 | sizeof(wowlan_config_cmd), | ||
977 | &wowlan_config_cmd); | ||
988 | if (ret) | 978 | if (ret) |
989 | return ret; | 979 | return ret; |
990 | 980 | ||
@@ -1051,7 +1041,7 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw, | |||
1051 | 1041 | ||
1052 | mvm->net_detect = true; | 1042 | mvm->net_detect = true; |
1053 | } else { | 1043 | } else { |
1054 | struct iwl_wowlan_config_cmd_v3 wowlan_config_cmd = {}; | 1044 | struct iwl_wowlan_config_cmd wowlan_config_cmd = {}; |
1055 | 1045 | ||
1056 | ap_sta = rcu_dereference_protected( | 1046 | ap_sta = rcu_dereference_protected( |
1057 | mvm->fw_id_to_mac_id[mvmvif->ap_sta_id], | 1047 | mvm->fw_id_to_mac_id[mvmvif->ap_sta_id], |
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h index e74cdf2132f8..6d3bea5c59d1 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h | |||
@@ -241,16 +241,12 @@ enum iwl_wowlan_wakeup_filters { | |||
241 | IWL_WOWLAN_WAKEUP_BCN_FILTERING = BIT(16), | 241 | IWL_WOWLAN_WAKEUP_BCN_FILTERING = BIT(16), |
242 | }; /* WOWLAN_WAKEUP_FILTER_API_E_VER_4 */ | 242 | }; /* WOWLAN_WAKEUP_FILTER_API_E_VER_4 */ |
243 | 243 | ||
244 | struct iwl_wowlan_config_cmd_v2 { | 244 | struct iwl_wowlan_config_cmd { |
245 | __le32 wakeup_filter; | 245 | __le32 wakeup_filter; |
246 | __le16 non_qos_seq; | 246 | __le16 non_qos_seq; |
247 | __le16 qos_seq[8]; | 247 | __le16 qos_seq[8]; |
248 | u8 wowlan_ba_teardown_tids; | 248 | u8 wowlan_ba_teardown_tids; |
249 | u8 is_11n_connection; | 249 | u8 is_11n_connection; |
250 | } __packed; /* WOWLAN_CONFIG_API_S_VER_2 */ | ||
251 | |||
252 | struct iwl_wowlan_config_cmd_v3 { | ||
253 | struct iwl_wowlan_config_cmd_v2 common; | ||
254 | u8 offloading_tid; | 250 | u8 offloading_tid; |
255 | u8 reserved[3]; | 251 | u8 reserved[3]; |
256 | } __packed; /* WOWLAN_CONFIG_API_S_VER_3 */ | 252 | } __packed; /* WOWLAN_CONFIG_API_S_VER_3 */ |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 2ab59b850795..09d48333d35a 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -1143,7 +1143,7 @@ iwl_mvm_set_last_nonqos_seq(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
1143 | } | 1143 | } |
1144 | #endif | 1144 | #endif |
1145 | void iwl_mvm_set_wowlan_qos_seq(struct iwl_mvm_sta *mvm_ap_sta, | 1145 | void iwl_mvm_set_wowlan_qos_seq(struct iwl_mvm_sta *mvm_ap_sta, |
1146 | struct iwl_wowlan_config_cmd_v2 *cmd); | 1146 | struct iwl_wowlan_config_cmd *cmd); |
1147 | int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm, | 1147 | int iwl_mvm_send_proto_offload(struct iwl_mvm *mvm, |
1148 | struct ieee80211_vif *vif, | 1148 | struct ieee80211_vif *vif, |
1149 | bool disable_offloading, | 1149 | bool disable_offloading, |
diff --git a/drivers/net/wireless/iwlwifi/mvm/offloading.c b/drivers/net/wireless/iwlwifi/mvm/offloading.c index adcbf4c8edd8..68b0169c8892 100644 --- a/drivers/net/wireless/iwlwifi/mvm/offloading.c +++ b/drivers/net/wireless/iwlwifi/mvm/offloading.c | |||
@@ -67,7 +67,7 @@ | |||
67 | #include "mvm.h" | 67 | #include "mvm.h" |
68 | 68 | ||
69 | void iwl_mvm_set_wowlan_qos_seq(struct iwl_mvm_sta *mvm_ap_sta, | 69 | void iwl_mvm_set_wowlan_qos_seq(struct iwl_mvm_sta *mvm_ap_sta, |
70 | struct iwl_wowlan_config_cmd_v2 *cmd) | 70 | struct iwl_wowlan_config_cmd *cmd) |
71 | { | 71 | { |
72 | int i; | 72 | int i; |
73 | 73 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index b952e7904a07..daad98533269 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c | |||
@@ -1000,7 +1000,7 @@ static void iwl_mvm_enter_d0i3_iterator(void *_data, u8 *mac, | |||
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | static void iwl_mvm_set_wowlan_data(struct iwl_mvm *mvm, | 1002 | static void iwl_mvm_set_wowlan_data(struct iwl_mvm *mvm, |
1003 | struct iwl_wowlan_config_cmd_v3 *cmd, | 1003 | struct iwl_wowlan_config_cmd *cmd, |
1004 | struct iwl_d0i3_iter_data *iter_data) | 1004 | struct iwl_d0i3_iter_data *iter_data) |
1005 | { | 1005 | { |
1006 | struct ieee80211_sta *ap_sta; | 1006 | struct ieee80211_sta *ap_sta; |
@@ -1016,14 +1016,14 @@ static void iwl_mvm_set_wowlan_data(struct iwl_mvm *mvm, | |||
1016 | goto out; | 1016 | goto out; |
1017 | 1017 | ||
1018 | mvm_ap_sta = iwl_mvm_sta_from_mac80211(ap_sta); | 1018 | mvm_ap_sta = iwl_mvm_sta_from_mac80211(ap_sta); |
1019 | cmd->common.is_11n_connection = ap_sta->ht_cap.ht_supported; | 1019 | cmd->is_11n_connection = ap_sta->ht_cap.ht_supported; |
1020 | cmd->offloading_tid = iter_data->offloading_tid; | 1020 | cmd->offloading_tid = iter_data->offloading_tid; |
1021 | 1021 | ||
1022 | /* | 1022 | /* |
1023 | * The d0i3 uCode takes care of the nonqos counters, | 1023 | * The d0i3 uCode takes care of the nonqos counters, |
1024 | * so configure only the qos seq ones. | 1024 | * so configure only the qos seq ones. |
1025 | */ | 1025 | */ |
1026 | iwl_mvm_set_wowlan_qos_seq(mvm_ap_sta, &cmd->common); | 1026 | iwl_mvm_set_wowlan_qos_seq(mvm_ap_sta, cmd); |
1027 | out: | 1027 | out: |
1028 | rcu_read_unlock(); | 1028 | rcu_read_unlock(); |
1029 | } | 1029 | } |
@@ -1035,14 +1035,11 @@ static int iwl_mvm_enter_d0i3(struct iwl_op_mode *op_mode) | |||
1035 | struct iwl_d0i3_iter_data d0i3_iter_data = { | 1035 | struct iwl_d0i3_iter_data d0i3_iter_data = { |
1036 | .mvm = mvm, | 1036 | .mvm = mvm, |
1037 | }; | 1037 | }; |
1038 | struct iwl_wowlan_config_cmd_v3 wowlan_config_cmd = { | 1038 | struct iwl_wowlan_config_cmd wowlan_config_cmd = { |
1039 | .common = { | 1039 | .wakeup_filter = cpu_to_le32(IWL_WOWLAN_WAKEUP_RX_FRAME | |
1040 | .wakeup_filter = | 1040 | IWL_WOWLAN_WAKEUP_BEACON_MISS | |
1041 | cpu_to_le32(IWL_WOWLAN_WAKEUP_RX_FRAME | | 1041 | IWL_WOWLAN_WAKEUP_LINK_CHANGE | |
1042 | IWL_WOWLAN_WAKEUP_BEACON_MISS | | 1042 | IWL_WOWLAN_WAKEUP_BCN_FILTERING), |
1043 | IWL_WOWLAN_WAKEUP_LINK_CHANGE | | ||
1044 | IWL_WOWLAN_WAKEUP_BCN_FILTERING), | ||
1045 | }, | ||
1046 | }; | 1043 | }; |
1047 | struct iwl_d3_manager_config d3_cfg_cmd = { | 1044 | struct iwl_d3_manager_config d3_cfg_cmd = { |
1048 | .min_sleep_time = cpu_to_le32(1000), | 1045 | .min_sleep_time = cpu_to_le32(1000), |