Path: blob/main/sys/contrib/dev/iwlwifi/iwl-devtrace.c
105140 views
/*-1* Copyright (c) 2021 The FreeBSD Foundation2*3* This software was developed by Björn Zeeb under sponsorship from4* the FreeBSD Foundation.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE19* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/2728#include <sys/cdefs.h>29__FBSDID("$FreeBSD$");3031#include "iwl-devtrace.h"3233#include <sys/sdt.h>3435SDT_PROVIDER_DEFINE(iwlwifi);3637SDT_PROBE_DEFINE4(iwlwifi, trace, dev_hcmd, ,38"const struct device *dev",39"struct iwl_host_cmd *", "uint16_t",40"struct iwl_cmd_header_wide *");4142void43trace_iwlwifi_dev_hcmd(const struct device *dev,44struct iwl_host_cmd *cmd, uint16_t cmd_size,45struct iwl_cmd_header_wide *hdr_wide)46{4748SDT_PROBE4(iwlwifi, trace, dev_hcmd, ,49dev, cmd, cmd_size, hdr_wide);50}5152SDT_PROBE_DEFINE4(iwlwifi, trace, dev_rx, ,53"const struct device *dev",54"const struct iwl_trans *",55"struct iwl_rx_packet *", "size_t");5657void58trace_iwlwifi_dev_rx(const struct device *dev,59const struct iwl_trans *trans,60struct iwl_rx_packet *pkt, size_t len)61{6263SDT_PROBE4(iwlwifi, trace, dev_rx, ,64dev, trans, pkt, len);65}6667SDT_PROBE_DEFINE4(iwlwifi, trace, dev_rx_data, ,68"const struct device *dev",69"const struct iwl_trans *",70"struct iwl_rx_packet *", "size_t");7172void73trace_iwlwifi_dev_rx_data(const struct device *dev,74const struct iwl_trans *trans,75struct iwl_rx_packet *pkt, size_t len)76{7778SDT_PROBE4(iwlwifi, trace, dev_rx_data, ,79dev, trans, pkt, len);80}81828384