mwifiex: return -EBUSY if scan request cannot be honored
[deliverable/linux.git] / drivers / net / wireless / mwifiex / cfg80211.c
index 2691620393eae14f771f89641124ce9ff5b354c4..675247b303d72bfb0d3224841547383216e6455a 100644 (file)
@@ -1802,7 +1802,7 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
 {
        struct net_device *dev = request->wdev->netdev;
        struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
-       int i, offset;
+       int i, offset, ret;
        struct ieee80211_channel *chan;
        struct ieee_types_header *ie;
 
@@ -1855,8 +1855,12 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
 
                priv->user_scan_cfg->chan_list[i].scan_time = 0;
        }
-       if (mwifiex_scan_networks(priv, priv->user_scan_cfg))
-               return -EFAULT;
+
+       ret = mwifiex_scan_networks(priv, priv->user_scan_cfg);
+       if (ret) {
+               dev_err(priv->adapter->dev, "scan failed: %d\n", ret);
+               return ret;
+       }
 
        if (request->ie && request->ie_len) {
                for (i = 0; i < MWIFIEX_MAX_VSIE_NUM; i++) {
This page took 0.024696 seconds and 5 git commands to generate.