]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
qtnfmac: drop error reports for out-of-bounds key indexes
authorSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Fri, 5 Oct 2018 10:11:40 +0000 (10:11 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 5 Oct 2018 11:01:29 +0000 (14:01 +0300)
On disconnect wireless core attempts to remove all the supported keys.
Following cfg80211_ops conventions, firmware returns -ENOENT code
for the out-of-bound key indexes. This is a normal behavior,
so no need to report errors for this case.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c

index 8ecd37ddc0f96347f48fa8252637b80bdc966605..9845cf287118b76cbbaff2dde693e35ec360696e 100644 (file)
@@ -523,9 +523,16 @@ static int qtnf_del_key(struct wiphy *wiphy, struct net_device *dev,
        int ret;
 
        ret = qtnf_cmd_send_del_key(vif, key_index, pairwise, mac_addr);
-       if (ret)
-               pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n",
-                      vif->mac->macid, vif->vifid, key_index, pairwise);
+       if (ret) {
+               if (ret == -ENOENT) {
+                       pr_debug("VIF%u.%u: key index %d out of bounds\n",
+                                vif->mac->macid, vif->vifid, key_index);
+               } else {
+                       pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n",
+                              vif->mac->macid, vif->vifid,
+                              key_index, pairwise);
+               }
+       }
 
        return ret;
 }