diff options
author | Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> | 2019-11-18 11:23:04 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-11-20 10:42:55 +0300 |
commit | 45028223425dc37d3452da7e9bd01f7789024ee7 (patch) | |
tree | 081b31cef4d057a5256c46f7f1550ed680422013 /drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | |
parent | 4c8c0d8f709d16f418a5d1962b4eda86ff570151 (diff) | |
download | linux-45028223425dc37d3452da7e9bd01f7789024ee7.tar.xz |
qtnfmac: remove VIF in firmware in case of error
Currently in case of error when registering network device with the
kernel, we won't properly cleanup VIF state in firmware due to DEL_VIF
command will not be send to wifi card. Make sure it does.
Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index aa0ed0f2b973..4f02159a69db 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c @@ -238,22 +238,20 @@ static struct wireless_dev *qtnf_add_virtual_intf(struct wiphy *wiphy, pr_err("VIF%u.%u: FW reported bad MAC: %pM\n", mac->macid, vif->vifid, vif->mac_addr); ret = -EINVAL; - goto err_mac; + goto error_del_vif; } ret = qtnf_core_net_attach(mac, vif, name, name_assign_t); if (ret) { pr_err("VIF%u.%u: failed to attach netdev\n", mac->macid, vif->vifid); - goto err_net; + goto error_del_vif; } vif->wdev.netdev = vif->netdev; return &vif->wdev; -err_net: - vif->netdev = NULL; -err_mac: +error_del_vif: qtnf_cmd_send_del_intf(vif); err_cmd: vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; |