summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/microchip/wilc1000/hif.c
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2022-07-20 19:03:05 +0300
committerKalle Valo <kvalo@kernel.org>2022-07-27 15:58:10 +0300
commitad3e683ae4dc311baea7a8724315b6d8d9a7aaa9 (patch)
treeb27d0dc54de86983d44c6b757496daf88eb0ade7 /drivers/net/wireless/microchip/wilc1000/hif.c
parent12fb1ae537a416b77ac9cbaefa6dd9dacaa27ed0 (diff)
downloadlinux-ad3e683ae4dc311baea7a8724315b6d8d9a7aaa9.tar.xz
wifi: wilc1000: cancel the connect operation during interface down
Cancel the ongoing connection request to avoid any issue if the interface is set down before the connection request is completed. host_int_handle_disconnect was already available, so renamed it and used the same API for 'ndio_close' cb. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220720160302.231516-6-ajay.kathat@microchip.com
Diffstat (limited to 'drivers/net/wireless/microchip/wilc1000/hif.c')
-rw-r--r--drivers/net/wireless/microchip/wilc1000/hif.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/hif.c b/drivers/net/wireless/microchip/wilc1000/hif.c
index 021e0db80bd2..b89519ab9205 100644
--- a/drivers/net/wireless/microchip/wilc1000/hif.c
+++ b/drivers/net/wireless/microchip/wilc1000/hif.c
@@ -635,7 +635,7 @@ static inline void host_int_parse_assoc_resp_info(struct wilc_vif *vif,
conn_info->req_ies_len = 0;
}
-static inline void host_int_handle_disconnect(struct wilc_vif *vif)
+inline void wilc_handle_disconnect(struct wilc_vif *vif)
{
struct host_if_drv *hif_drv = vif->hif_drv;
@@ -647,8 +647,6 @@ static inline void host_int_handle_disconnect(struct wilc_vif *vif)
if (hif_drv->conn_info.conn_result)
hif_drv->conn_info.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF,
0, hif_drv->conn_info.arg);
- else
- netdev_err(vif->ndev, "%s: conn_result is NULL\n", __func__);
eth_zero_addr(hif_drv->assoc_bssid);
@@ -684,7 +682,7 @@ static void handle_rcvd_gnrl_async_info(struct work_struct *work)
host_int_parse_assoc_resp_info(vif, mac_info->status);
} else if (mac_info->status == WILC_MAC_STATUS_DISCONNECTED) {
if (hif_drv->hif_state == HOST_IF_CONNECTED) {
- host_int_handle_disconnect(vif);
+ wilc_handle_disconnect(vif);
} else if (hif_drv->usr_scan_req.scan_result) {
del_timer(&hif_drv->scan_timer);
handle_scan_done(vif, SCAN_EVENT_ABORTED);