summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000
diff options
context:
space:
mode:
authorAjay Singh2018-09-25 08:23:27 +0200
committerGreg Kroah-Hartman2018-09-25 20:53:56 +0200
commitb7c355dad9017df3184568e7c301aafd129e4df5 (patch)
tree41560cee056f6a66f1a95a17413d4e8c48efcac3 /drivers/staging/wilc1000
parentstaging: wilc1000: refactor wilc_wlan_parse_info_frame() function (diff)
downloadkernel-qcow2-linux-b7c355dad9017df3184568e7c301aafd129e4df5.tar.gz
kernel-qcow2-linux-b7c355dad9017df3184568e7c301aafd129e4df5.tar.xz
kernel-qcow2-linux-b7c355dad9017df3184568e7c301aafd129e4df5.zip
staging: wilc1000: set default value of cfg response type in wilc_wlan_cfg_indicate_rx()
Handle the setting of default value for 'wilc_cfg_rsp' type for all cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this value to know the type of the received message. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r--drivers/staging/wilc1000/wilc_wlan_cfg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index 2b5471bb3cfe..2c463a3bc9a6 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -507,6 +507,7 @@ void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
msg_id = frame[1]; /* seq no */
frame += 4;
size -= 4;
+ rsp->type = 0;
/*
* The valid types of response messages are
@@ -532,7 +533,6 @@ void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
case 'N':
wilc_network_info_received(wilc, frame - 4, size + 4);
- rsp->type = 0;
break;
case 'S':
@@ -540,7 +540,6 @@ void wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
break;
default:
- rsp->type = 0;
rsp->seq_no = msg_id;
break;
}