diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2018-12-02 18:03:34 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-05 09:49:45 +0100 |
commit | a343cf5d329e54c6b76a83ec6e98c67ec6eb34bf (patch) | |
tree | ad53657f98a95eb578f50a38a7baddc2784a06f4 /drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |
parent | e559681279828000d7e3eb69ec7f463e54820c30 (diff) | |
download | linux-next-a343cf5d329e54c6b76a83ec6e98c67ec6eb34bf.tar.gz |
staging: wilc1000: avoid extra buffer copy while connect cfg ops
Refactor the code to avoid the use of an extra buffer to store the
connection related parameter. No need to call cfg80211_disconnected in
case of failure to send the wid command to firmware, an error status is
directly returned in cfg80211 connect callback.
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 7cc985e9f706..08d4461d3f01 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -719,6 +719,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, netdev_err(dev, "wilc_set_join_req(): Error\n"); ret = -ENOENT; + if (!wfi_drv->p2p_connect) + wlan_channel = INVALID_CHANNEL; wilc_wlan_set_bssid(dev, null_bssid, WILC_STATION_MODE); goto out_error; } |