diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2012-11-21 05:38:13 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-11-21 05:38:13 -0500 |
commit | 851462444d421c223965b12b836bef63da61b57f (patch) | |
tree | 495baa14e638817941496c36e1443aed7dae0ea0 /drivers/net/wireless/mwifiex/cfg80211.c | |
parent | 5a6ea4af0907f995dc06df21a9c9ef764c7cd3bc (diff) | |
parent | 6924d99fcdf1a688538a3cdebd1f135c22eec191 (diff) |
Merge branch 'for-3.7' of git://git.infradead.org/users/dedekind/l2-mtd
Conflicts:
drivers/mtd/nand/nand_base.c
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 2691620393ea..780d3e168297 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 | ||
@@ -1814,8 +1825,6 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, | |||
1814 | return -EBUSY; | 1825 | return -EBUSY; |
1815 | } | 1826 | } |
1816 | 1827 | ||
1817 | priv->scan_request = request; | ||
1818 | |||
1819 | priv->user_scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), | 1828 | priv->user_scan_cfg = kzalloc(sizeof(struct mwifiex_user_scan_cfg), |
1820 | GFP_KERNEL); | 1829 | GFP_KERNEL); |
1821 | if (!priv->user_scan_cfg) { | 1830 | if (!priv->user_scan_cfg) { |
@@ -1823,6 +1832,8 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, | |||
1823 | return -ENOMEM; | 1832 | return -ENOMEM; |
1824 | } | 1833 | } |
1825 | 1834 | ||
1835 | priv->scan_request = request; | ||
1836 | |||
1826 | priv->user_scan_cfg->num_ssids = request->n_ssids; | 1837 | priv->user_scan_cfg->num_ssids = request->n_ssids; |
1827 | priv->user_scan_cfg->ssid_list = request->ssids; | 1838 | priv->user_scan_cfg->ssid_list = request->ssids; |
1828 | 1839 | ||
@@ -1855,8 +1866,15 @@ 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 | priv->scan_request = NULL; | ||
1874 | kfree(priv->user_scan_cfg); | ||
1875 | priv->user_scan_cfg = NULL; | ||
1876 | return ret; | ||
1877 | } | ||
1860 | 1878 | ||
1861 | if (request->ie && request->ie_len) { | 1879 | if (request->ie && request->ie_len) { |
1862 | for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) { | 1880 | for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) { |