diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/driver-ops.h | 7 | ||||
-rw-r--r-- | net/mac80211/driver-trace.h | 21 | ||||
-rw-r--r-- | net/mac80211/iface.c | 2 | ||||
-rw-r--r-- | net/mac80211/scan.c | 13 |
4 files changed, 41 insertions, 2 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 727e4cf7b8a6..cbe133bcdf34 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
@@ -259,4 +259,11 @@ static inline void drv_rfkill_poll(struct ieee80211_local *local) | |||
259 | if (local->ops->rfkill_poll) | 259 | if (local->ops->rfkill_poll) |
260 | local->ops->rfkill_poll(&local->hw); | 260 | local->ops->rfkill_poll(&local->hw); |
261 | } | 261 | } |
262 | |||
263 | static inline void drv_flush(struct ieee80211_local *local, bool drop) | ||
264 | { | ||
265 | trace_drv_flush(local, drop); | ||
266 | if (local->ops->flush) | ||
267 | local->ops->flush(&local->hw, drop); | ||
268 | } | ||
262 | #endif /* __MAC80211_DRIVER_OPS */ | 269 | #endif /* __MAC80211_DRIVER_OPS */ |
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index 7a849b920165..977cc7528bc6 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
@@ -690,6 +690,27 @@ TRACE_EVENT(drv_ampdu_action, | |||
690 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret | 690 | LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret |
691 | ) | 691 | ) |
692 | ); | 692 | ); |
693 | |||
694 | TRACE_EVENT(drv_flush, | ||
695 | TP_PROTO(struct ieee80211_local *local, bool drop), | ||
696 | |||
697 | TP_ARGS(local, drop), | ||
698 | |||
699 | TP_STRUCT__entry( | ||
700 | LOCAL_ENTRY | ||
701 | __field(bool, drop) | ||
702 | ), | ||
703 | |||
704 | TP_fast_assign( | ||
705 | LOCAL_ASSIGN; | ||
706 | __entry->drop = drop; | ||
707 | ), | ||
708 | |||
709 | TP_printk( | ||
710 | LOCAL_PR_FMT " drop:%d", | ||
711 | LOCAL_PR_ARG, __entry->drop | ||
712 | ) | ||
713 | ); | ||
693 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ | 714 | #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ |
694 | 715 | ||
695 | #undef TRACE_INCLUDE_PATH | 716 | #undef TRACE_INCLUDE_PATH |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 1ceca14331d4..389dc8d880f3 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -917,6 +917,8 @@ static u32 ieee80211_idle_on(struct ieee80211_local *local) | |||
917 | wiphy_name(local->hw.wiphy)); | 917 | wiphy_name(local->hw.wiphy)); |
918 | #endif | 918 | #endif |
919 | 919 | ||
920 | drv_flush(local, false); | ||
921 | |||
920 | local->hw.conf.flags |= IEEE80211_CONF_IDLE; | 922 | local->hw.conf.flags |= IEEE80211_CONF_IDLE; |
921 | return IEEE80211_CONF_CHANGE_IDLE; | 923 | return IEEE80211_CONF_CHANGE_IDLE; |
922 | } | 924 | } |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index ae1830056521..d98c45e5528b 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -418,9 +418,10 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | |||
418 | local->next_scan_state = SCAN_DECISION; | 418 | local->next_scan_state = SCAN_DECISION; |
419 | local->scan_channel_idx = 0; | 419 | local->scan_channel_idx = 0; |
420 | 420 | ||
421 | drv_flush(local, false); | ||
422 | |||
421 | ieee80211_configure_filter(local); | 423 | ieee80211_configure_filter(local); |
422 | 424 | ||
423 | /* TODO: start scan as soon as all nullfunc frames are ACKed */ | ||
424 | ieee80211_queue_delayed_work(&local->hw, | 425 | ieee80211_queue_delayed_work(&local->hw, |
425 | &local->scan_work, | 426 | &local->scan_work, |
426 | IEEE80211_CHANNEL_TIME); | 427 | IEEE80211_CHANNEL_TIME); |
@@ -584,8 +585,16 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca | |||
584 | 585 | ||
585 | __set_bit(SCAN_OFF_CHANNEL, &local->scanning); | 586 | __set_bit(SCAN_OFF_CHANNEL, &local->scanning); |
586 | 587 | ||
588 | /* | ||
589 | * What if the nullfunc frames didn't arrive? | ||
590 | */ | ||
591 | drv_flush(local, false); | ||
592 | if (local->ops->flush) | ||
593 | *next_delay = 0; | ||
594 | else | ||
595 | *next_delay = HZ / 10; | ||
596 | |||
587 | /* advance to the next channel to be scanned */ | 597 | /* advance to the next channel to be scanned */ |
588 | *next_delay = HZ / 10; | ||
589 | local->next_scan_state = SCAN_SET_CHANNEL; | 598 | local->next_scan_state = SCAN_SET_CHANNEL; |
590 | } | 599 | } |
591 | 600 | ||