mac80211: Add iface name when calling WARN-ON
PATCH v2 1/1 mac80211: Add iface name when calling WARN-ON
From: Ben Greear <[email protected]>
This lets the user know which interface has failed the check_sdata_in_driver check.
Signed-off-by Ben Greear <[email protected]>
---
:100644 100644 af4691f... 43e95f0... M net/mac80211/driver-ops.h
net/mac80211/driver-ops.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
net/mac80211/driver-ops.h +5 -1
@@ -7,7 +7,11 @@static inline void check_sdata_in_driver (struct ieee80211_sub_if_data *sdata) { -WARN_ON (!(sdata->flags &IEEE80211_SDATA_IN_DRIVER )); +if (unlikely (!(sdata->flags &IEEE80211_SDATA_IN_DRIVER ))) { +printk (KERN_ERR "%s: Failed check-sdata-in-driver check, flags: 0x%x\n" , + sdata->dev->name, sdata->flags); +WARN_ON (!(sdata->flags &IEEE80211_SDATA_IN_DRIVER )); + } } static inline struct ieee80211_sub_if_data *
Signature · 1 line
1.7.3.4
Johannes Berg
maintainerQuoted 16 lines · On Thu, 2012-03-15 at 11:40 -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
This lets the user know which interface has failed the
check_sdata_in_drivercheck.Signed-off-by Ben Greear <[email protected]>---
:100644 100644 af4691f... 43e95f0... Mnet/mac80211/driver-ops.hnet/mac80211/driver-ops.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)net/mac80211/driver-ops.h +0
-0
net/mac80211/driver-ops.h line 14
Quoted 9 lines
net/mac80211/driver-ops.h +5
-1@@ -7,7 +7,11 @@static inline void check_sdata_in_driver (struct ieee80211_sub_if_data *sdata) { -WARN_ON (!(sdata->flags &IEEE80211_SDATA_IN_DRIVER )); +if (unlikely (!(sdata->flags &IEEE80211_SDATA_IN_DRIVER ))) { +printk (KERN_ERR "%s: Failed check-sdata-in-driver check, flags: 0x%x\n" , + sdata->dev->name, sdata->flags); +WARN_ON (!(sdata->flags &IEEE80211_SDATA_IN_DRIVER )); + }
Please use WARN() instead of WARN_ON() to make the message part of the warning.
johannes