提交 b767ecda 编写于 作者: J Johannes Berg

cfg80211: reg: improve bad regulatory warning

There's a WARN_ON here but it says nothing, and the later
dump of the regdomain aren't usually printed. As a first
step, include the regdomain code in the WARN_ON message,
just like in other similar instances.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210618133832.853ffdd6c62b.I63e37b2ab184ee3653686e4df4dd23eb303687d2@changeidSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 aeddc05f
...@@ -3975,7 +3975,9 @@ static int __regulatory_set_wiphy_regd(struct wiphy *wiphy, ...@@ -3975,7 +3975,9 @@ static int __regulatory_set_wiphy_regd(struct wiphy *wiphy,
"wiphy should have REGULATORY_WIPHY_SELF_MANAGED\n")) "wiphy should have REGULATORY_WIPHY_SELF_MANAGED\n"))
return -EPERM; return -EPERM;
if (WARN(!is_valid_rd(rd), "Invalid regulatory domain detected\n")) { if (WARN(!is_valid_rd(rd),
"Invalid regulatory domain detected: %c%c\n",
rd->alpha2[0], rd->alpha2[1])) {
print_regdomain_info(rd); print_regdomain_info(rd);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册