Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35da3fe6 authored by Sergey Matyukevich's avatar Sergey Matyukevich Committed by Kalle Valo
Browse files

qtnfmac: drop error reports for out-of-bounds key indexes



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: default avatarSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent ab1c64a1
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -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)
	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);
			       vif->mac->macid, vif->vifid,
			       key_index, pairwise);
		}
	}

	return ret;
}