aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-trace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2010-02-03 07:59:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-08 16:50:53 -0500
commit34e895075e21be3e21e71d6317440d1ee7969ad0 (patch)
tree217fe70e32e54ef0134f477510472f3992655d79 /net/mac80211/driver-trace.h
parent070bb5477fb4029131aad4941d7aaf0093db0c38 (diff)
mac80211: allow station add/remove to sleep
Many drivers would like to sleep during station addition and removal, and currently have a high complexity there from not being able to. This introduces two new callbacks sta_add() and sta_remove() that drivers can implement instead of using sta_notify() and that can sleep, and the new sta_add() callback is also allowed to fail. The reason we didn't do this previously is that the IBSS code wants to insert stations from the RX path, which is a tasklet, so cannot sleep. This patch will keep the station allocation in that path, but moves adding the station to the driver out of line. Since the addition can now fail, we can have IBSS peer structs the driver rejected -- in that case we still talk to the station but never tell the driver about it in the control.sta pointer. If there will ever be a driver that has a low limit on the number of stations and that cannot talk to any stations that are not known to it, we need to do come up with a new strategy of handling larger IBSSs, maybe quicker expiry or rejecting peers. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/driver-trace.h')
-rw-r--r--net/mac80211/driver-trace.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index 502424b2538a..c984910bf275 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -545,6 +545,58 @@ TRACE_EVENT(drv_sta_notify,
545 ) 545 )
546); 546);
547 547
548TRACE_EVENT(drv_sta_add,
549 TP_PROTO(struct ieee80211_local *local,
550 struct ieee80211_sub_if_data *sdata,
551 struct ieee80211_sta *sta, int ret),
552
553 TP_ARGS(local, sdata, sta, ret),
554
555 TP_STRUCT__entry(
556 LOCAL_ENTRY
557 VIF_ENTRY
558 STA_ENTRY
559 __field(int, ret)
560 ),
561
562 TP_fast_assign(
563 LOCAL_ASSIGN;
564 VIF_ASSIGN;
565 STA_ASSIGN;
566 __entry->ret = ret;
567 ),
568
569 TP_printk(
570 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " ret:%d",
571 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->ret
572 )
573);
574
575TRACE_EVENT(drv_sta_remove,
576 TP_PROTO(struct ieee80211_local *local,
577 struct ieee80211_sub_if_data *sdata,
578 struct ieee80211_sta *sta),
579
580 TP_ARGS(local, sdata, sta),
581
582 TP_STRUCT__entry(
583 LOCAL_ENTRY
584 VIF_ENTRY
585 STA_ENTRY
586 ),
587
588 TP_fast_assign(
589 LOCAL_ASSIGN;
590 VIF_ASSIGN;
591 STA_ASSIGN;
592 ),
593
594 TP_printk(
595 LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
596 LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
597 )
598);
599
548TRACE_EVENT(drv_conf_tx, 600TRACE_EVENT(drv_conf_tx,
549 TP_PROTO(struct ieee80211_local *local, u16 queue, 601 TP_PROTO(struct ieee80211_local *local, u16 queue,
550 const struct ieee80211_tx_queue_params *params, 602 const struct ieee80211_tx_queue_params *params,