mac80211: add vif to flush call
[linux-2.6-block.git] / net / mac80211 / driver-ops.h
index ef8b385eff04e4c7a279a92722fedc3f84163f6c..5331582a2c817184db6f72ee9e2aa6f6841a10f0 100644 (file)
@@ -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)
@@ -722,13 +726,19 @@ static inline void drv_rfkill_poll(struct ieee80211_local *local)
 }
 
 static inline void drv_flush(struct ieee80211_local *local,
+                            struct ieee80211_sub_if_data *sdata,
                             u32 queues, bool drop)
 {
+       struct ieee80211_vif *vif = sdata ? &sdata->vif : NULL;
+
        might_sleep();
 
+       if (sdata)
+               check_sdata_in_driver(sdata);
+
        trace_drv_flush(local, queues, drop);
        if (local->ops->flush)
-               local->ops->flush(&local->hw, queues, drop);
+               local->ops->flush(&local->hw, vif, queues, drop);
        trace_drv_return_void(local);
 }