aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-11-04 04:43:54 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-04 07:49:00 -0500
commitcf2c92d840c1424bcb3bb501147c79c9b067ad77 (patch)
tree60629accc499abd5c660e5330ea5880942672e3e /drivers/net
parent13a8098af93e31788684c1f2682739beb93dc680 (diff)
mac80211: replace restart_complete() with reconfig_complete()
Drivers might want to know also when mac80211 has completed reconfiguring after resume (e.g. in order to know when frames can be passed to mac80211). Rename restart_complete() to a more-generic reconfig_complete(), and add a new enum to indicate the reconfiguration type. Update the current users with the new prototype. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath10k/core.h2
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c8
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c20
3 files changed, 24 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index fe531ea6926c..cc8f1fc65044 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -321,7 +321,7 @@ enum ath10k_state {
321 * stopped in ath10k_core_restart() work holding conf_mutex. The state 321 * stopped in ath10k_core_restart() work holding conf_mutex. The state
322 * RESTARTED means that the device is up and mac80211 has started hw 322 * RESTARTED means that the device is up and mac80211 has started hw
323 * reconfiguration. Once mac80211 is done with the reconfiguration we 323 * reconfiguration. Once mac80211 is done with the reconfiguration we
324 * set the state to STATE_ON in restart_complete(). */ 324 * set the state to STATE_ON in reconfig_complete(). */
325 ATH10K_STATE_RESTARTING, 325 ATH10K_STATE_RESTARTING,
326 ATH10K_STATE_RESTARTED, 326 ATH10K_STATE_RESTARTED,
327 327
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 46709301a51e..f57459a2f51a 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3929,10 +3929,14 @@ exit:
3929} 3929}
3930#endif 3930#endif
3931 3931
3932static void ath10k_restart_complete(struct ieee80211_hw *hw) 3932static void ath10k_reconfig_complete(struct ieee80211_hw *hw,
3933 enum ieee80211_reconfig_type reconfig_type)
3933{ 3934{
3934 struct ath10k *ar = hw->priv; 3935 struct ath10k *ar = hw->priv;
3935 3936
3937 if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART)
3938 return;
3939
3936 mutex_lock(&ar->conf_mutex); 3940 mutex_lock(&ar->conf_mutex);
3937 3941
3938 /* If device failed to restart it will be in a different state, e.g. 3942 /* If device failed to restart it will be in a different state, e.g.
@@ -4450,7 +4454,7 @@ static const struct ieee80211_ops ath10k_ops = {
4450 .tx_last_beacon = ath10k_tx_last_beacon, 4454 .tx_last_beacon = ath10k_tx_last_beacon,
4451 .set_antenna = ath10k_set_antenna, 4455 .set_antenna = ath10k_set_antenna,
4452 .get_antenna = ath10k_get_antenna, 4456 .get_antenna = ath10k_get_antenna,
4453 .restart_complete = ath10k_restart_complete, 4457 .reconfig_complete = ath10k_reconfig_complete,
4454 .get_survey = ath10k_get_survey, 4458 .get_survey = ath10k_get_survey,
4455 .set_bitrate_mask = ath10k_set_bitrate_mask, 4459 .set_bitrate_mask = ath10k_set_bitrate_mask,
4456 .sta_rc_update = ath10k_sta_rc_update, 4460 .sta_rc_update = ath10k_sta_rc_update,
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index c7a73c68bdab..e16c29dc9d49 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -857,9 +857,8 @@ static int iwl_mvm_mac_start(struct ieee80211_hw *hw)
857 return ret; 857 return ret;
858} 858}
859 859
860static void iwl_mvm_mac_restart_complete(struct ieee80211_hw *hw) 860static void iwl_mvm_restart_complete(struct iwl_mvm *mvm)
861{ 861{
862 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
863 int ret; 862 int ret;
864 863
865 mutex_lock(&mvm->mutex); 864 mutex_lock(&mvm->mutex);
@@ -877,6 +876,21 @@ static void iwl_mvm_mac_restart_complete(struct ieee80211_hw *hw)
877 mutex_unlock(&mvm->mutex); 876 mutex_unlock(&mvm->mutex);
878} 877}
879 878
879static void
880iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw,
881 enum ieee80211_reconfig_type reconfig_type)
882{
883 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
884
885 switch (reconfig_type) {
886 case IEEE80211_RECONFIG_TYPE_RESTART:
887 iwl_mvm_restart_complete(mvm);
888 break;
889 case IEEE80211_RECONFIG_TYPE_SUSPEND:
890 break;
891 }
892}
893
880void __iwl_mvm_mac_stop(struct iwl_mvm *mvm) 894void __iwl_mvm_mac_stop(struct iwl_mvm *mvm)
881{ 895{
882 lockdep_assert_held(&mvm->mutex); 896 lockdep_assert_held(&mvm->mutex);
@@ -3014,7 +3028,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
3014 .tx = iwl_mvm_mac_tx, 3028 .tx = iwl_mvm_mac_tx,
3015 .ampdu_action = iwl_mvm_mac_ampdu_action, 3029 .ampdu_action = iwl_mvm_mac_ampdu_action,
3016 .start = iwl_mvm_mac_start, 3030 .start = iwl_mvm_mac_start,
3017 .restart_complete = iwl_mvm_mac_restart_complete, 3031 .reconfig_complete = iwl_mvm_mac_reconfig_complete,
3018 .stop = iwl_mvm_mac_stop, 3032 .stop = iwl_mvm_mac_stop,
3019 .add_interface = iwl_mvm_mac_add_interface, 3033 .add_interface = iwl_mvm_mac_add_interface,
3020 .remove_interface = iwl_mvm_mac_remove_interface, 3034 .remove_interface = iwl_mvm_mac_remove_interface,