staging: wilc1000: change the type of wilc1000_initialized
This patch changes the type of wilc1000_initialized in the struc wilc from int
to bool and also renames it to the initialized. In addition, unnecessary
wilc1000_initialized codes are removed in this patch.
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index bcbf1bd..e463090 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2418,7 +2418,7 @@
}
/*If mac is closed, then return*/
- if (!g_linux_wlan->wilc1000_initialized) {
+ if (!g_linux_wlan->initialized) {
PRINT_D(GENERIC_DBG, "Return since mac is closed\n");
return;
}
@@ -2571,7 +2571,7 @@
interface_type = nic->iftype;
nic->iftype = STATION_MODE;
- if (g_linux_wlan->wilc1000_initialized) {
+ if (g_linux_wlan->initialized) {
host_int_del_All_Rx_BASession(priv->hWILCWFIDrv, g_linux_wlan->strInterfaceInfo[0].aBSSID, TID);
/* ensure that the message Q is empty */
host_int_wait_msg_queue_idle();
@@ -2627,7 +2627,7 @@
(struct key_params *)(&g_key_gtk_params));
}
- if (g_linux_wlan->wilc1000_initialized) {
+ if (g_linux_wlan->initialized) {
for (i = 0; i < num_reg_frame; i++) {
PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", nic->g_struct_frame_reg[i].frame_type,
nic->g_struct_frame_reg[i].reg);
@@ -2658,7 +2658,7 @@
nic->iftype = CLIENT_MODE;
- if (g_linux_wlan->wilc1000_initialized) {
+ if (g_linux_wlan->initialized) {
/* ensure that the message Q is empty */
host_int_wait_msg_queue_idle();
@@ -2712,7 +2712,7 @@
refresh_scan(priv, 1, true);
Set_machw_change_vir_if(false);
- if (g_linux_wlan->wilc1000_initialized) {
+ if (g_linux_wlan->initialized) {
for (i = 0; i < num_reg_frame; i++) {
PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", nic->g_struct_frame_reg[i].frame_type,
nic->g_struct_frame_reg[i].reg);
@@ -2735,9 +2735,8 @@
PRINT_D(HOSTAPD_DBG, "Downloading AP firmware\n");
linux_wlan_get_firmware(nic);
/*If wilc is running, then close-open to actually get new firmware running (serves P2P)*/
- if (g_linux_wlan->wilc1000_initialized) {
+ if (g_linux_wlan->initialized) {
nic->iftype = AP_MODE;
- g_linux_wlan->wilc1000_initialized = 1;
mac_close(dev);
mac_open(dev);
@@ -2826,7 +2825,7 @@
(struct key_params *)(&g_key_gtk_params));
}
- if (g_linux_wlan->wilc1000_initialized) {
+ if (g_linux_wlan->initialized) {
for (i = 0; i < num_reg_frame; i++) {
PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", nic->g_struct_frame_reg[i].frame_type,
nic->g_struct_frame_reg[i].reg);