Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12375ef9 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: trace interface name



It's not all that useful to have the vif/sdata pointer,
we'd rather refer to the interfaces by their name.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 47846c9b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -41,8 +41,7 @@ void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
	       sta->sta.addr, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */

	if (drv_ampdu_action(local, &sta->sdata->vif,
			     IEEE80211_AMPDU_RX_STOP,
	if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP,
			     &sta->sta, tid, NULL))
		printk(KERN_DEBUG "HW problem - can not stop rx "
				"aggregation for tid %d\n", tid);
@@ -280,8 +279,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
		goto end;
	}

	ret = drv_ampdu_action(local, &sta->sdata->vif,
			       IEEE80211_AMPDU_RX_START,
	ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START,
			       &sta->sta, tid, &start_seq_num);
#ifdef CONFIG_MAC80211_HT_DEBUG
	printk(KERN_DEBUG "Rx A-MPDU request on tid %d result %d\n", tid, ret);
+3 −4
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
	*state = HT_AGG_STATE_REQ_STOP_BA_MSK |
		(initiator << HT_AGG_STATE_INITIATOR_SHIFT);

	ret = drv_ampdu_action(local, &sta->sdata->vif,
	ret = drv_ampdu_action(local, sta->sdata,
			       IEEE80211_AMPDU_TX_STOP,
			       &sta->sta, tid, NULL);

@@ -303,8 +303,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)

	start_seq_num = sta->tid_seq[tid];

	ret = drv_ampdu_action(local, &sdata->vif,
			       IEEE80211_AMPDU_TX_START,
	ret = drv_ampdu_action(local, sdata, IEEE80211_AMPDU_TX_START,
			       pubsta, tid, &start_seq_num);

	if (ret) {
@@ -420,7 +419,7 @@ static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
	ieee80211_agg_splice_finish(local, sta, tid);
	spin_unlock(&local->ampdu_lock);

	drv_ampdu_action(local, &sta->sdata->vif,
	drv_ampdu_action(local, sta->sdata,
			 IEEE80211_AMPDU_TX_OPERATIONAL,
			 &sta->sta, tid, NULL);
}
+15 −14
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ static inline int drv_add_interface(struct ieee80211_local *local,
				    struct ieee80211_if_init_conf *conf)
{
	int ret = local->ops->add_interface(&local->hw, conf);
	trace_drv_add_interface(local, conf->vif, ret);
	trace_drv_add_interface(local, vif_to_sdata(conf->vif), ret);
	return ret;
}

@@ -47,7 +47,7 @@ static inline void drv_remove_interface(struct ieee80211_local *local,
					struct ieee80211_if_init_conf *conf)
{
	local->ops->remove_interface(&local->hw, conf);
	trace_drv_remove_interface(local, conf->vif);
	trace_drv_remove_interface(local, vif_to_sdata(conf->vif));
}

static inline int drv_config(struct ieee80211_local *local, u32 changed)
@@ -58,13 +58,13 @@ static inline int drv_config(struct ieee80211_local *local, u32 changed)
}

static inline void drv_bss_info_changed(struct ieee80211_local *local,
					struct ieee80211_vif *vif,
					struct ieee80211_sub_if_data *sdata,
					struct ieee80211_bss_conf *info,
					u32 changed)
{
	if (local->ops->bss_info_changed)
		local->ops->bss_info_changed(&local->hw, vif, info, changed);
	trace_drv_bss_info_changed(local, vif, info, changed);
		local->ops->bss_info_changed(&local->hw, &sdata->vif, info, changed);
	trace_drv_bss_info_changed(local, sdata, info, changed);
}

static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
@@ -106,12 +106,13 @@ static inline int drv_set_tim(struct ieee80211_local *local,
}

static inline int drv_set_key(struct ieee80211_local *local,
			      enum set_key_cmd cmd, struct ieee80211_vif *vif,
			      enum set_key_cmd cmd,
			      struct ieee80211_sub_if_data *sdata,
			      struct ieee80211_sta *sta,
			      struct ieee80211_key_conf *key)
{
	int ret = local->ops->set_key(&local->hw, cmd, vif, sta, key);
	trace_drv_set_key(local, cmd, vif, sta, key, ret);
	int ret = local->ops->set_key(&local->hw, cmd, &sdata->vif, sta, key);
	trace_drv_set_key(local, cmd, sdata, sta, key, ret);
	return ret;
}

@@ -179,13 +180,13 @@ static inline int drv_set_rts_threshold(struct ieee80211_local *local,
}

static inline void drv_sta_notify(struct ieee80211_local *local,
				  struct ieee80211_vif *vif,
				  struct ieee80211_sub_if_data *sdata,
				  enum sta_notify_cmd cmd,
				  struct ieee80211_sta *sta)
{
	if (local->ops->sta_notify)
		local->ops->sta_notify(&local->hw, vif, cmd, sta);
	trace_drv_sta_notify(local, vif, cmd, sta);
		local->ops->sta_notify(&local->hw, &sdata->vif, cmd, sta);
	trace_drv_sta_notify(local, sdata, cmd, sta);
}

static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
@@ -239,16 +240,16 @@ static inline int drv_tx_last_beacon(struct ieee80211_local *local)
}

static inline int drv_ampdu_action(struct ieee80211_local *local,
				   struct ieee80211_vif *vif,
				   struct ieee80211_sub_if_data *sdata,
				   enum ieee80211_ampdu_mlme_action action,
				   struct ieee80211_sta *sta, u16 tid,
				   u16 *ssn)
{
	int ret = -EOPNOTSUPP;
	if (local->ops->ampdu_action)
		ret = local->ops->ampdu_action(&local->hw, vif, action,
		ret = local->ops->ampdu_action(&local->hw, &sdata->vif, action,
					       sta, tid, ssn);
	trace_drv_ampdu_action(local, vif, action, sta, tid, ssn, ret);
	trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, ret);
	return ret;
}

+20 −18
Original line number Diff line number Diff line
@@ -25,10 +25,12 @@ static inline void trace_ ## name(proto) {}
#define STA_PR_FMT	" sta:%pM"
#define STA_PR_ARG	__entry->sta_addr

#define VIF_ENTRY	__field(enum nl80211_iftype, vif_type) __field(void *, vif)
#define VIF_ASSIGN	__entry->vif_type = vif ? vif->type : 0; __entry->vif = vif
#define VIF_PR_FMT	" vif:%p(%d)"
#define VIF_PR_ARG	__entry->vif, __entry->vif_type
#define VIF_ENTRY	__field(enum nl80211_iftype, vif_type) __field(void *, sdata) \
			__string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
#define VIF_ASSIGN	__entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \
			__assign_str(vif_name, sdata->dev ? sdata->dev->name : "<nodev>")
#define VIF_PR_FMT	" vif:%s(%d)"
#define VIF_PR_ARG	__get_str(vif_name), __entry->vif_type

TRACE_EVENT(drv_start,
	TP_PROTO(struct ieee80211_local *local, int ret),
@@ -70,10 +72,10 @@ TRACE_EVENT(drv_stop,

TRACE_EVENT(drv_add_interface,
	TP_PROTO(struct ieee80211_local *local,
		 struct ieee80211_vif *vif,
		 struct ieee80211_sub_if_data *sdata,
		 int ret),

	TP_ARGS(local, vif, ret),
	TP_ARGS(local, sdata, ret),

	TP_STRUCT__entry(
		LOCAL_ENTRY
@@ -85,7 +87,7 @@ TRACE_EVENT(drv_add_interface,
	TP_fast_assign(
		LOCAL_ASSIGN;
		VIF_ASSIGN;
		memcpy(__entry->addr, vif->addr, 6);
		memcpy(__entry->addr, sdata->vif.addr, 6);
		__entry->ret = ret;
	),

@@ -96,9 +98,9 @@ TRACE_EVENT(drv_add_interface,
);

TRACE_EVENT(drv_remove_interface,
	TP_PROTO(struct ieee80211_local *local, struct ieee80211_vif *vif),
	TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata),

	TP_ARGS(local, vif),
	TP_ARGS(local, sdata),

	TP_STRUCT__entry(
		LOCAL_ENTRY
@@ -109,7 +111,7 @@ TRACE_EVENT(drv_remove_interface,
	TP_fast_assign(
		LOCAL_ASSIGN;
		VIF_ASSIGN;
		memcpy(__entry->addr, vif->addr, 6);
		memcpy(__entry->addr, sdata->vif.addr, 6);
	),

	TP_printk(
@@ -163,11 +165,11 @@ TRACE_EVENT(drv_config,

TRACE_EVENT(drv_bss_info_changed,
	TP_PROTO(struct ieee80211_local *local,
		 struct ieee80211_vif *vif,
		 struct ieee80211_sub_if_data *sdata,
		 struct ieee80211_bss_conf *info,
		 u32 changed),

	TP_ARGS(local, vif, info, changed),
	TP_ARGS(local, sdata, info, changed),

	TP_STRUCT__entry(
		LOCAL_ENTRY
@@ -291,11 +293,11 @@ TRACE_EVENT(drv_set_tim,

TRACE_EVENT(drv_set_key,
	TP_PROTO(struct ieee80211_local *local,
		 enum set_key_cmd cmd, struct ieee80211_vif *vif,
		 enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
		 struct ieee80211_sta *sta,
		 struct ieee80211_key_conf *key, int ret),

	TP_ARGS(local, cmd, vif, sta, key, ret),
	TP_ARGS(local, cmd, sdata, sta, key, ret),

	TP_STRUCT__entry(
		LOCAL_ENTRY
@@ -489,11 +491,11 @@ TRACE_EVENT(drv_set_rts_threshold,

TRACE_EVENT(drv_sta_notify,
	TP_PROTO(struct ieee80211_local *local,
		 struct ieee80211_vif *vif,
		 struct ieee80211_sub_if_data *sdata,
		 enum sta_notify_cmd cmd,
		 struct ieee80211_sta *sta),

	TP_ARGS(local, vif, cmd, sta),
	TP_ARGS(local, sdata, cmd, sta),

	TP_STRUCT__entry(
		LOCAL_ENTRY
@@ -654,12 +656,12 @@ TRACE_EVENT(drv_tx_last_beacon,

TRACE_EVENT(drv_ampdu_action,
	TP_PROTO(struct ieee80211_local *local,
		 struct ieee80211_vif *vif,
		 struct ieee80211_sub_if_data *sdata,
		 enum ieee80211_ampdu_mlme_action action,
		 struct ieee80211_sta *sta, u16 tid,
		 u16 *ssn, int ret),

	TP_ARGS(local, vif, action, sta, tid, ssn, ret),
	TP_ARGS(local, sdata, action, sta, tid, ssn, ret),

	TP_STRUCT__entry(
		LOCAL_ENTRY
+2 −2
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
				     struct ieee80211_sub_if_data,
				     u.ap);

	ret = drv_set_key(key->local, SET_KEY, &sdata->vif, sta, &key->conf);
	ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);

	if (!ret) {
		spin_lock_bh(&todo_lock);
@@ -181,7 +181,7 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
				     struct ieee80211_sub_if_data,
				     u.ap);

	ret = drv_set_key(key->local, DISABLE_KEY, &sdata->vif,
	ret = drv_set_key(key->local, DISABLE_KEY, sdata,
			  sta, &key->conf);

	if (ret)
Loading