cw1200 publishes the vif and changes its mode before cw1200_setup_mac(), but leaves that state in place if setup fails. mac80211 will not call remove_interface for the failed addition, so subsequent interface requests are rejected as busy. Restore the empty monitor state when MAC setup fails. Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") Signed-off-by: Jiale Yao --- drivers/net/wireless/st/cw1200/sta.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/st/cw1200/sta.c b/drivers/net/wireless/st/cw1200/sta.c index 5d8eaa700779..92a729f1e9ef 100644 --- a/drivers/net/wireless/st/cw1200/sta.c +++ b/drivers/net/wireless/st/cw1200/sta.c @@ -235,6 +235,11 @@ int cw1200_add_interface(struct ieee80211_hw *dev, priv->vif = vif; memcpy(priv->mac_addr, vif->addr, ETH_ALEN); ret = cw1200_setup_mac(priv); + if (ret) { + priv->vif = NULL; + priv->mode = NL80211_IFTYPE_MONITOR; + eth_zero_addr(priv->mac_addr); + } /* Enable auto-calibration */ /* Exception in subsequent channel switch; disabled. * wsm_write_mib(priv, WSM_MIB_ID_SET_AUTO_CALIBRATION_MODE, -- 2.34.1