mac80211: add offload channel switch support

This adds support for offloading the channel switch
operation to devices that support such, typically
by having specific firmware API for it. The reasons
for this could be that the firmware provides better
timing or that regulatory enforcement done by the
device requires special handling of CSAs.

In order to allow drivers to specify the timing to
the device, the new channel_switch callback will
pass through the received frame's mactime, where
available.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Johannes Berg
2010-05-11 16:20:57 +02:00
committed by John W. Linville
parent b29e7eb4b8
commit 5ce6e438d5
5 changed files with 153 additions and 5 deletions

View File

@ -774,6 +774,34 @@ TRACE_EVENT(drv_flush,
)
);
TRACE_EVENT(drv_channel_switch,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_channel_switch *ch_switch),
TP_ARGS(local, ch_switch),
TP_STRUCT__entry(
LOCAL_ENTRY
__field(u64, timestamp)
__field(bool, block_tx)
__field(u16, freq)
__field(u8, count)
),
TP_fast_assign(
LOCAL_ASSIGN;
__entry->timestamp = ch_switch->timestamp;
__entry->block_tx = ch_switch->block_tx;
__entry->freq = ch_switch->channel->center_freq;
__entry->count = ch_switch->count;
),
TP_printk(
LOCAL_PR_FMT " new freq:%u count:%d",
LOCAL_PR_ARG, __entry->freq, __entry->count
)
);
/*
* Tracing for API calls that drivers call.
*/
@ -992,6 +1020,27 @@ TRACE_EVENT(api_sta_block_awake,
)
);
TRACE_EVENT(api_chswitch_done,
TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
TP_ARGS(sdata, success),
TP_STRUCT__entry(
VIF_ENTRY
__field(bool, success)
),
TP_fast_assign(
VIF_ASSIGN;
__entry->success = success;
),
TP_printk(
VIF_PR_FMT " success=%d",
VIF_PR_ARG, __entry->success
)
);
/*
* Tracing for internal functions
* (which may also be called in response to driver calls)