summaryrefslogtreecommitdiff
path: root/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2018-12-02 21:03:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 11:49:45 +0300
commit8f1a0ac1eba70b811dfcf9034f6d9c977e21cb83 (patch)
tree09d2e7a40996e0c82796079b16cc2ee795968b20 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
parenta343cf5d329e54c6b76a83ec6e98c67ec6eb34bf (diff)
downloadlinux-8f1a0ac1eba70b811dfcf9034f6d9c977e21cb83.tar.xz
staging: wilc1000: handle scan operation callback from cfg80211 context
Refactor code to handle scan operation callback from cfg80211 context. No need to maintain 'scan_attr' struct as the wid command is directly sent to firmware from cfg80211 context. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wfi_cfgoperations.c')
-rw-r--r--drivers/staging/wilc1000/wilc_wfi_cfgoperations.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 08d4461d3f01..ac47dda510e0 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -547,8 +547,10 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
if (request->n_ssids >= 1) {
if (wilc_wfi_cfg_alloc_fill_ssid(request,
- &hidden_ntwk))
- return -ENOMEM;
+ &hidden_ntwk)) {
+ ret = -ENOMEM;
+ goto out;
+ }
ret = wilc_scan(vif, WILC_FW_USER_SCAN,
WILC_FW_ACTIVE_SCAN, scan_ch_list,
@@ -568,8 +570,11 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
netdev_err(priv->dev, "Requested scanned channels over\n");
}
- if (ret != 0)
- ret = -EBUSY;
+out:
+ if (ret) {
+ priv->scan_req = NULL;
+ priv->cfg_scanning = false;
+ }
return ret;
}