aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-02-17 04:48:17 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-20 10:09:54 -0500
commit37e3308cb2b6933019d9d9c2045877d6d68d9c5a (patch)
treed9b71804d022a78a65f55d1b6dce4012cd4ee97b /drivers/net/wireless
parentd9b8396a52b4e857263eeb9e1eba474ea11c19bf (diff)
mac80211: allow driver to return error from sched_scan_stop
In order to solve races with sched_scan_stop, it is necessary for the driver to be able to return an error to propagate that to cfg80211 so it doesn't send an event. Reviewed-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c6
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index beaf8140abbf..7492fc0f2766 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -1746,14 +1746,16 @@ out:
1746 return ret; 1746 return ret;
1747} 1747}
1748 1748
1749static void iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw, 1749static int iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw,
1750 struct ieee80211_vif *vif) 1750 struct ieee80211_vif *vif)
1751{ 1751{
1752 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); 1752 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
1753 1753
1754 mutex_lock(&mvm->mutex); 1754 mutex_lock(&mvm->mutex);
1755 iwl_mvm_sched_scan_stop(mvm); 1755 iwl_mvm_sched_scan_stop(mvm);
1756 mutex_unlock(&mvm->mutex); 1756 mutex_unlock(&mvm->mutex);
1757
1758 return 0;
1757} 1759}
1758 1760
1759static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, 1761static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 7aae5b3a0c2c..4175a57ac9f5 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -3668,8 +3668,8 @@ out:
3668 return ret; 3668 return ret;
3669} 3669}
3670 3670
3671static void wl1271_op_sched_scan_stop(struct ieee80211_hw *hw, 3671static int wl1271_op_sched_scan_stop(struct ieee80211_hw *hw,
3672 struct ieee80211_vif *vif) 3672 struct ieee80211_vif *vif)
3673{ 3673{
3674 struct wl1271 *wl = hw->priv; 3674 struct wl1271 *wl = hw->priv;
3675 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); 3675 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
@@ -3691,6 +3691,8 @@ static void wl1271_op_sched_scan_stop(struct ieee80211_hw *hw,
3691 wl1271_ps_elp_sleep(wl); 3691 wl1271_ps_elp_sleep(wl);
3692out: 3692out:
3693 mutex_unlock(&wl->mutex); 3693 mutex_unlock(&wl->mutex);
3694
3695 return 0;
3694} 3696}
3695 3697
3696static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value) 3698static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)