cfg80211/mac80211: clean up cfg80211 SME APIs

Do some cleanups in the cfg80211 SME APIs, which are
only used by mac80211.

Most of these functions get a frame passed, and there
isn't really any reason to export multiple functions
as cfg80211 can check the frame type instead, do that.

Additionally, the API functions have confusing names
like cfg80211_send_...() which was meant to indicate
that it sends an event to userspace, but gets a bit
confusing when there's both TX and RX and they're not
all clearly labeled.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg
2013-05-16 00:55:00 +02:00
parent 51217cee3a
commit 6ff57cf888
6 changed files with 172 additions and 155 deletions

View File

@@ -1911,24 +1911,46 @@ TRACE_EVENT(cfg80211_send_rx_assoc,
NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
);
DEFINE_EVENT(netdev_evt_only, cfg80211_send_deauth,
TP_PROTO(struct net_device *netdev),
TP_ARGS(netdev)
DECLARE_EVENT_CLASS(netdev_frame_event,
TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
TP_ARGS(netdev, buf, len),
TP_STRUCT__entry(
NETDEV_ENTRY
__dynamic_array(u8, frame, len)
),
TP_fast_assign(
NETDEV_ASSIGN;
memcpy(__get_dynamic_array(frame), buf, len);
),
TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
NETDEV_PR_ARG,
le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
);
DEFINE_EVENT(netdev_evt_only, cfg80211_send_disassoc,
TP_PROTO(struct net_device *netdev),
TP_ARGS(netdev)
DEFINE_EVENT(netdev_frame_event, cfg80211_rx_unprot_mlme_mgmt,
TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
TP_ARGS(netdev, buf, len)
);
DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_deauth,
TP_PROTO(struct net_device *netdev),
TP_ARGS(netdev)
DEFINE_EVENT(netdev_frame_event, cfg80211_rx_mlme_mgmt,
TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
TP_ARGS(netdev, buf, len)
);
DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_disassoc,
TP_PROTO(struct net_device *netdev),
TP_ARGS(netdev)
TRACE_EVENT(cfg80211_tx_mlme_mgmt,
TP_PROTO(struct net_device *netdev, const u8 *buf, int len),
TP_ARGS(netdev, buf, len),
TP_STRUCT__entry(
NETDEV_ENTRY
__dynamic_array(u8, frame, len)
),
TP_fast_assign(
NETDEV_ASSIGN;
memcpy(__get_dynamic_array(frame), buf, len);
),
TP_printk(NETDEV_PR_FMT ", ftype:0x%.2x",
NETDEV_PR_ARG,
le16_to_cpup((__le16 *)__get_dynamic_array(frame)))
);
DECLARE_EVENT_CLASS(netdev_mac_evt,