diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-07-05 14:39:21 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-07-08 19:28:47 +0300 |
commit | b3603133d3b727b0b07a7094ab74cf27c8aee3bd (patch) | |
tree | cdf4f533b4369ab2c269950ba638df769d64ebb0 | |
parent | 4044b23781104801f70c4a4ec3ca090730a161c5 (diff) | |
download | linux-b3603133d3b727b0b07a7094ab74cf27c8aee3bd.tar.xz |
wifi: mac80211_hwsim: fix warning
WARN_ON("string") will unconditionally trigger a warning, but
not really do what it may look like. Use WARN(1, ...) instead
and add the mode number as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20240705133921.a50aa5b15ece.I9a25b7448b0498c0c2e503986978dae165c8bdf8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/virtual/mac80211_hwsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c index 8491eb32f760..d60c780d4e8a 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c @@ -3261,7 +3261,7 @@ static int mac80211_hwsim_switch_vif_chanctx(struct ieee80211_hw *hw, hwsim_clear_chanctx_magic(vifs[i].old_ctx); break; default: - WARN_ON("Invalid mode"); + WARN(1, "Invalid mode %d\n", mode); } } return 0; |