]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: mvm: add support for net detect
authorLuciano Coelho <luciano.coelho@intel.com>
Fri, 24 Oct 2014 07:39:51 +0000 (10:39 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 24 Nov 2014 06:30:36 +0000 (08:30 +0200)
Add the net detect WoWLAN flag to indicate support and use the
nd_config from the WoWLAN configuration to start net detect, if it is
set.  The WoWLAN configuration takes precedence over the debugfs
configuration.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/d3.c
drivers/net/wireless/iwlwifi/mvm/mac80211.c

index 0fc72fc6ce2f37b526f698181fb7681787779792..3c6602870a61d52e79d42ec26aaa5ee84251f356 100644 (file)
@@ -1030,13 +1030,15 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
                                            vif, mvmvif, ap_sta);
                if (ret)
                        goto out;
-       } else if (mvm->nd_config) {
+       } else if (wowlan->nd_config || mvm->nd_config) {
                ret = iwl_mvm_switch_to_d3(mvm);
                if (ret)
                        goto out;
 
-               ret = iwl_mvm_scan_offload_start(mvm, vif, mvm->nd_config,
-                                                &mvm->nd_ies);
+               ret = iwl_mvm_scan_offload_start(
+                       mvm, vif,
+                       wowlan->nd_config ?: mvm->nd_config,
+                       &mvm->nd_ies);
                if (ret)
                        goto out;
        } else {
index 6214133e08a6ec212c5650db10745a0fcf39e411..d9d8d30e605e50365eb72480a526da6e27d24fc8 100644 (file)
@@ -467,7 +467,8 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
                mvm->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT |
                                    WIPHY_WOWLAN_DISCONNECT |
                                    WIPHY_WOWLAN_EAP_IDENTITY_REQ |
-                                   WIPHY_WOWLAN_RFKILL_RELEASE;
+                                   WIPHY_WOWLAN_RFKILL_RELEASE |
+                                   WIPHY_WOWLAN_NET_DETECT;
                if (!iwlwifi_mod_params.sw_crypto)
                        mvm->wowlan.flags |= WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
                                             WIPHY_WOWLAN_GTK_REKEY_FAILURE |
@@ -476,6 +477,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
                mvm->wowlan.n_patterns = IWL_WOWLAN_MAX_PATTERNS;
                mvm->wowlan.pattern_min_len = IWL_WOWLAN_MIN_PATTERN_LEN;
                mvm->wowlan.pattern_max_len = IWL_WOWLAN_MAX_PATTERN_LEN;
+               mvm->wowlan.max_nd_match_sets = IWL_SCAN_MAX_PROFILES;
                mvm->wowlan.tcp = &iwl_mvm_wowlan_tcp_support;
                hw->wiphy->wowlan = &mvm->wowlan;
        }