return ret;
 }
 
-static void iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw,
-                                       struct ieee80211_vif *vif)
+static int iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw,
+                                      struct ieee80211_vif *vif)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
 
        mutex_lock(&mvm->mutex);
        iwl_mvm_sched_scan_stop(mvm);
        mutex_unlock(&mvm->mutex);
+
+       return 0;
 }
 
 static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
 
        return ret;
 }
 
-static void wl1271_op_sched_scan_stop(struct ieee80211_hw *hw,
-                                     struct ieee80211_vif *vif)
+static int wl1271_op_sched_scan_stop(struct ieee80211_hw *hw,
+                                    struct ieee80211_vif *vif)
 {
        struct wl1271 *wl = hw->priv;
        struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
        wl1271_ps_elp_sleep(wl);
 out:
        mutex_unlock(&wl->mutex);
+
+       return 0;
 }
 
 static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
 
  *     This process will continue until sched_scan_stop is called.
  *
  * @sched_scan_stop: Tell the hardware to stop an ongoing scheduled scan.
+ *     In this case, ieee80211_sched_scan_stopped() must not be called.
  *
  * @sw_scan_start: Notifier function that is called just before a software scan
  *     is started. Can be NULL, if the driver doesn't need this notification.
                                struct ieee80211_vif *vif,
                                struct cfg80211_sched_scan_request *req,
                                struct ieee80211_sched_scan_ies *ies);
-       void (*sched_scan_stop)(struct ieee80211_hw *hw,
+       int (*sched_scan_stop)(struct ieee80211_hw *hw,
                               struct ieee80211_vif *vif);
        void (*sw_scan_start)(struct ieee80211_hw *hw);
        void (*sw_scan_complete)(struct ieee80211_hw *hw);
 
        return ret;
 }
 
-static inline void drv_sched_scan_stop(struct ieee80211_local *local,
-                                      struct ieee80211_sub_if_data *sdata)
+static inline int drv_sched_scan_stop(struct ieee80211_local *local,
+                                     struct ieee80211_sub_if_data *sdata)
 {
+       int ret;
+
        might_sleep();
 
        check_sdata_in_driver(sdata);
 
        trace_drv_sched_scan_stop(local, sdata);
-       local->ops->sched_scan_stop(&local->hw, &sdata->vif);
-       trace_drv_return_void(local);
+       ret = local->ops->sched_scan_stop(&local->hw, &sdata->vif);
+       trace_drv_return_int(local, ret);
+
+       return ret;
 }
 
 static inline void drv_sw_scan_start(struct ieee80211_local *local)
 
        local->sched_scan_req = NULL;
 
        if (rcu_access_pointer(local->sched_scan_sdata))
-               drv_sched_scan_stop(local, sdata);
+               ret = drv_sched_scan_stop(local, sdata);
 
 out:
        mutex_unlock(&local->mtx);