diff options
author | Eliad Peller <eliad@wizery.com> | 2013-11-07 07:13:30 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-09 15:29:03 -0500 |
commit | 78c9df66c8f1af8577df802f57ce4dbb877fee4b (patch) | |
tree | 713a3bc0fb5ca9bf68d22cb03dc33fbbb7c7959d /drivers/net | |
parent | b87c2179a7d4f0d7d476df289c69cf9ebf8b7163 (diff) |
iwlwifi: mvm: allow keeping connections in d3_test
Keeping connection can be useful also when testing d3
using the debugfs file (d3_test).
Save the vif to keep connection on, and consider it
when iterating over the interfaces.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/d3.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 96b09d9d7068..b9e1f30e33de 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
@@ -1807,6 +1807,10 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test) | |||
1807 | iwl_mvm_read_d3_sram(mvm); | 1807 | iwl_mvm_read_d3_sram(mvm); |
1808 | 1808 | ||
1809 | keep = iwl_mvm_query_wakeup_reasons(mvm, vif); | 1809 | keep = iwl_mvm_query_wakeup_reasons(mvm, vif); |
1810 | #ifdef CONFIG_IWLWIFI_DEBUGFS | ||
1811 | if (keep) | ||
1812 | mvm->keep_vif = vif; | ||
1813 | #endif | ||
1810 | /* has unlocked the mutex, so skip that */ | 1814 | /* has unlocked the mutex, so skip that */ |
1811 | goto out; | 1815 | goto out; |
1812 | 1816 | ||
@@ -1863,6 +1867,7 @@ static int iwl_mvm_d3_test_open(struct inode *inode, struct file *file) | |||
1863 | return err; | 1867 | return err; |
1864 | } | 1868 | } |
1865 | mvm->d3_test_active = true; | 1869 | mvm->d3_test_active = true; |
1870 | mvm->keep_vif = NULL; | ||
1866 | return 0; | 1871 | return 0; |
1867 | } | 1872 | } |
1868 | 1873 | ||
@@ -1891,6 +1896,10 @@ static ssize_t iwl_mvm_d3_test_read(struct file *file, char __user *user_buf, | |||
1891 | static void iwl_mvm_d3_test_disconn_work_iter(void *_data, u8 *mac, | 1896 | static void iwl_mvm_d3_test_disconn_work_iter(void *_data, u8 *mac, |
1892 | struct ieee80211_vif *vif) | 1897 | struct ieee80211_vif *vif) |
1893 | { | 1898 | { |
1899 | /* skip the one we keep connection on */ | ||
1900 | if (_data == vif) | ||
1901 | return; | ||
1902 | |||
1894 | if (vif->type == NL80211_IFTYPE_STATION) | 1903 | if (vif->type == NL80211_IFTYPE_STATION) |
1895 | ieee80211_connection_loss(vif); | 1904 | ieee80211_connection_loss(vif); |
1896 | } | 1905 | } |
@@ -1917,7 +1926,7 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file) | |||
1917 | 1926 | ||
1918 | ieee80211_iterate_active_interfaces_atomic( | 1927 | ieee80211_iterate_active_interfaces_atomic( |
1919 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, | 1928 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, |
1920 | iwl_mvm_d3_test_disconn_work_iter, NULL); | 1929 | iwl_mvm_d3_test_disconn_work_iter, mvm->keep_vif); |
1921 | 1930 | ||
1922 | ieee80211_wake_queues(mvm->hw); | 1931 | ieee80211_wake_queues(mvm->hw); |
1923 | 1932 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 7992baabb882..c002b45e03c9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -531,6 +531,7 @@ struct iwl_mvm { | |||
531 | bool store_d3_resume_sram; | 531 | bool store_d3_resume_sram; |
532 | void *d3_resume_sram; | 532 | void *d3_resume_sram; |
533 | u32 d3_test_pme_ptr; | 533 | u32 d3_test_pme_ptr; |
534 | struct ieee80211_vif *keep_vif; | ||
534 | #endif | 535 | #endif |
535 | #endif | 536 | #endif |
536 | 537 | ||