aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index b3bf2cd150b7..7be1e9b83fd0 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1786,6 +1786,7 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
1786 struct cfg80211_connect_params *sme) 1786 struct cfg80211_connect_params *sme)
1787{ 1787{
1788 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); 1788 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
1789 struct mwifiex_adapter *adapter = priv->adapter;
1789 int ret; 1790 int ret;
1790 1791
1791 if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) { 1792 if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) {
@@ -1800,6 +1801,13 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
1800 return -EALREADY; 1801 return -EALREADY;
1801 } 1802 }
1802 1803
1804 if (adapter->surprise_removed || adapter->is_cmd_timedout) {
1805 wiphy_err(wiphy,
1806 "%s: Ignore connection. Card removed or FW in bad state\n",
1807 dev->name);
1808 return -EFAULT;
1809 }
1810
1803 wiphy_dbg(wiphy, "info: Trying to associate to %s and bssid %pM\n", 1811 wiphy_dbg(wiphy, "info: Trying to associate to %s and bssid %pM\n",
1804 (char *) sme->ssid, sme->bssid); 1812 (char *) sme->ssid, sme->bssid);
1805 1813