qtnfmac: simplify error reporting in regulatory notifier
authorIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Wed, 20 Mar 2019 10:03:49 +0000 (10:03 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 4 Apr 2019 09:57:25 +0000 (12:57 +0300)
Error reporting in qtnf_cfg80211_reg_notifier only requires to print
one type of message and an error code. Firmware will report success
for an attempt to set regulatory region to the same value,
so no special handling is required for this case.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c

index 295890b2673ca16ea3845f2746d6092b06c8de50..ae08b37d81d2ab523129a4044a33f05362180554 100644 (file)
@@ -1005,16 +1005,8 @@ static void qtnf_cfg80211_reg_notifier(struct wiphy *wiphy,
 
        ret = qtnf_cmd_reg_notify(mac, req);
        if (ret) {
-               if (ret == -EOPNOTSUPP) {
-                       pr_warn("reg update not supported\n");
-               } else if (ret == -EALREADY) {
-                       pr_info("regulatory domain is already set to %c%c",
-                               req->alpha2[0], req->alpha2[1]);
-               } else {
-                       pr_err("failed to update reg domain to %c%c\n",
-                              req->alpha2[0], req->alpha2[1]);
-               }
-
+               pr_err("MAC%u: failed to update region to %c%c: %d\n",
+                      mac->macid, req->alpha2[0], req->alpha2[1], ret);
                return;
        }