diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 2d9680044c12f2497195ea5fc420b3de18e59cdd..4ac4f5a0ce61e2123159b314ae7550b6378a6614 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -228,6 +228,10 @@ mwifiex_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *netdev, struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); int ret; + /* Return if WEP key not configured */ + if (priv->sec_info.wep_status == MWIFIEX_802_11_WEP_DISABLED) + return 0; + ret = mwifiex_set_encode(priv, NULL, 0, key_index, 0); wiphy_dbg(wiphy, "info: set default Tx key index\n");