aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/trace.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2014-01-29 11:53:43 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-04 15:58:16 -0500
commitfe94f3a4ffaa20c7470038c69ffc8e545ef5f90a (patch)
treea8056f9f9e74e30679bb4fc852dfe19bd680f51e /net/wireless/trace.h
parent67235cbca44f082e9c4c2ed370f9afe5fc478d49 (diff)
cfg80211: fix channel configuration in IBSS join
When receiving an IBSS_JOINED event select the BSS object based on the {bssid, channel} couple rather than the bssid only. With the current approach if another cell having the same BSSID (but using a different channel) exists then cfg80211 picks up the wrong BSS object. The result is a mismatching channel configuration between cfg80211 and the driver, that can lead to any sort of problem. The issue can be triggered by having an IBSS sitting on given channel and then asking the driver to create a new cell using the same BSSID but with a different frequency. By passing the channel to cfg80211_get_bss() we can solve this ambiguity and retrieve/create the correct BSS object. All the users of cfg80211_ibss_joined() have been changed accordingly. Moreover WARN when cfg80211_ibss_joined() gets a NULL channel as argument and remove a bogus call of the same function in ath6kl (it does not make sense to call cfg80211_ibss_joined() with a zero BSSID on ibss-leave). Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: Arend van Spriel <arend@broadcom.com> Cc: Bing Zhao <bzhao@marvell.com> Cc: Jussi Kivilinna <jussi.kivilinna@iki.fi> Cc: libertas-dev@lists.infradead.org Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> [minor code cleanup in ath6kl] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/trace.h')
-rw-r--r--net/wireless/trace.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index fbcc23edee54..5eaeed59db07 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2278,11 +2278,6 @@ DECLARE_EVENT_CLASS(cfg80211_rx_evt,
2278 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr)) 2278 TP_printk(NETDEV_PR_FMT ", " MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr))
2279); 2279);
2280 2280
2281DEFINE_EVENT(cfg80211_rx_evt, cfg80211_ibss_joined,
2282 TP_PROTO(struct net_device *netdev, const u8 *addr),
2283 TP_ARGS(netdev, addr)
2284);
2285
2286DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame, 2281DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame,
2287 TP_PROTO(struct net_device *netdev, const u8 *addr), 2282 TP_PROTO(struct net_device *netdev, const u8 *addr),
2288 TP_ARGS(netdev, addr) 2283 TP_ARGS(netdev, addr)
@@ -2293,6 +2288,24 @@ DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame,
2293 TP_ARGS(netdev, addr) 2288 TP_ARGS(netdev, addr)
2294); 2289);
2295 2290
2291TRACE_EVENT(cfg80211_ibss_joined,
2292 TP_PROTO(struct net_device *netdev, const u8 *bssid,
2293 struct ieee80211_channel *channel),
2294 TP_ARGS(netdev, bssid, channel),
2295 TP_STRUCT__entry(
2296 NETDEV_ENTRY
2297 MAC_ENTRY(bssid)
2298 CHAN_ENTRY
2299 ),
2300 TP_fast_assign(
2301 NETDEV_ASSIGN;
2302 MAC_ASSIGN(bssid, bssid);
2303 CHAN_ASSIGN(channel);
2304 ),
2305 TP_printk(NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", " CHAN_PR_FMT,
2306 NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG)
2307);
2308
2296TRACE_EVENT(cfg80211_probe_status, 2309TRACE_EVENT(cfg80211_probe_status,
2297 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie, 2310 TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie,
2298 bool acked), 2311 bool acked),