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>
This commit is contained in:
@@ -354,16 +354,20 @@ drv_sched_scan_start(struct ieee80211_local *local,
|
||||
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)
|
||||
|
Reference in New Issue
Block a user