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.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 2691620393ea..0679458a1bac 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1596,8 +1596,9 @@ done:
1596 } 1596 }
1597 } 1597 }
1598 1598
1599 if (mwifiex_bss_start(priv, bss, &req_ssid)) 1599 ret = mwifiex_bss_start(priv, bss, &req_ssid);
1600 return -EFAULT; 1600 if (ret)
1601 return ret;
1601 1602
1602 if (mode == NL80211_IFTYPE_ADHOC) { 1603 if (mode == NL80211_IFTYPE_ADHOC) {
1603 /* Inform the BSS information to kernel, otherwise 1604 /* Inform the BSS information to kernel, otherwise
@@ -1652,9 +1653,19 @@ done:
1652 "info: association to bssid %pM failed\n", 1653 "info: association to bssid %pM failed\n",
1653 priv->cfg_bssid); 1654 priv->cfg_bssid);
1654 memset(priv->cfg_bssid, 0, ETH_ALEN); 1655 memset(priv->cfg_bssid, 0, ETH_ALEN);
1656
1657 if (ret > 0)
1658 cfg80211_connect_result(priv->netdev, priv->cfg_bssid,
1659 NULL, 0, NULL, 0, ret,
1660 GFP_KERNEL);
1661 else
1662 cfg80211_connect_result(priv->netdev, priv->cfg_bssid,
1663 NULL, 0, NULL, 0,
1664 WLAN_STATUS_UNSPECIFIED_FAILURE,
1665 GFP_KERNEL);
1655 } 1666 }
1656 1667
1657 return ret; 1668 return 0;
1658} 1669}
1659 1670
1660/* 1671/*
@@ -1802,7 +1813,7 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
1802{ 1813{
1803 struct net_device *dev = request->wdev->netdev; 1814 struct net_device *dev = request->wdev->netdev;
1804 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); 1815 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
1805 int i, offset; 1816 int i, offset, ret;
1806 struct ieee80211_channel *chan; 1817 struct ieee80211_channel *chan;
1807 struct ieee_types_header *ie; 1818 struct ieee_types_header *ie;
1808 1819
@@ -1855,8 +1866,12 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
1855 1866
1856 priv->user_scan_cfg->chan_list[i].scan_time = 0; 1867 priv->user_scan_cfg->chan_list[i].scan_time = 0;
1857 } 1868 }
1858 if (mwifiex_scan_networks(priv, priv->user_scan_cfg)) 1869
1859 return -EFAULT; 1870 ret = mwifiex_scan_networks(priv, priv->user_scan_cfg);
1871 if (ret) {
1872 dev_err(priv->adapter->dev, "scan failed: %d\n", ret);
1873 return ret;
1874 }
1860 1875
1861 if (request->ie && request->ie_len) { 1876 if (request->ie && request->ie_len) {
1862 for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) { 1877 for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) {