From 021873f650658fb1d8da5f3ee7d31eba40b21a93 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Tue, 31 May 2016 12:56:14 +0200 Subject: [PATCH] staging: ks7010: remove non-SDIO code and #ifdefs I couldn't find any trace of code or even products using ks7010 with something else than SDIO. So, remove the conditionals. Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ks7010/Makefile | 2 +- drivers/staging/ks7010/ks7010_config.c | 6 --- drivers/staging/ks7010/ks_hostif.c | 70 -------------------------- drivers/staging/ks7010/ks_wlan.h | 10 ---- 4 files changed, 1 insertion(+), 87 deletions(-) diff --git a/drivers/staging/ks7010/Makefile b/drivers/staging/ks7010/Makefile index 68b7ebf57beb..32b0efc7bd00 100644 --- a/drivers/staging/ks7010/Makefile +++ b/drivers/staging/ks7010/Makefile @@ -1,5 +1,5 @@ obj-$(CONFIG_KS7010) += ks7010.o -ccflags-y += -D_SDIO_ -DKS_WLAN_DEBUG=0 +ccflags-y += -DKS_WLAN_DEBUG=0 ks7010-y := michael_mic.o ks_hostif.o ks_wlan_net.o ks_debug.o \ ks7010_sdio.o ks7010_config.o diff --git a/drivers/staging/ks7010/ks7010_config.c b/drivers/staging/ks7010/ks7010_config.c index 4a8098452cdd..e8a42077a4b3 100644 --- a/drivers/staging/ks7010/ks7010_config.c +++ b/drivers/staging/ks7010/ks7010_config.c @@ -268,13 +268,7 @@ int ks_wlan_read_config_file(ks_wlan_private *priv) priv->reg.rate_set.size = 12; #ifndef NO_FIRMWARE_CLASS -#if (defined _PCMCIA_) - dev = &priv->ks_wlan_hw.pcmcia_dev->dev; -#elif (defined _PCI_) - dev = &priv->ks_wlan_hw.pci_dev->dev; -#elif (defined _SDIO_) dev = &priv->ks_wlan_hw.sdio_card->func->dev; -#endif if((retval = request_firmware(&fw_entry, cfg_file, dev)) !=0 ){ DPRINTK(1, "error request_firmware() file=%s ret=%d\n", cfg_file, retval); return 1; diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 402ddba400ff..0295bb4921fa 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -108,51 +108,12 @@ int ks_wlan_do_power_save(ks_wlan_private *priv) DPRINTK(4,"psstatus.status=%d\n",atomic_read(&priv->psstatus.status)); -#ifdef _SDIO_ if((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS){ hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST); } else{ priv->dev_state = DEVICE_STATE_READY; } -#else - if((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS){ - switch(atomic_read(&priv->psstatus.status)){ - case PS_ACTIVE_SET: - case PS_WAKEUP: - case PS_SAVE_SET: - case PS_SNOOZE: - break; - case PS_CONF_WAIT: - atomic_set(&priv->psstatus.confirm_wait,0); - break; - case PS_NONE: - default: - hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST); - break; - } - - } - else{ - switch(atomic_read(&priv->psstatus.status)){ - case PS_ACTIVE_SET: - case PS_WAKEUP: - case PS_SAVE_SET: - break; - case PS_CONF_WAIT: - atomic_set(&priv->psstatus.confirm_wait,0); - atomic_set(&priv->psstatus.status, PS_WAKEUP); - break; - case PS_SNOOZE: - ks_wlan_hw_power_save(priv); - break; - case PS_NONE: - default: - hostif_sme_enqueue(priv, SME_POW_MNGMT_REQUEST); - break; - } - } -#endif return rc; } @@ -750,17 +711,11 @@ void hostif_power_mngmt_confirm(ks_wlan_private *priv) if(priv->reg.powermgt > POWMGT_ACTIVE_MODE && priv->reg.operation_mode == MODE_INFRASTRUCTURE){ -#if !defined(_SDIO_) - atomic_set(&priv->psstatus.status,PS_SAVE_SET); -#endif atomic_set(&priv->psstatus.confirm_wait, 0); priv->dev_state = DEVICE_STATE_SLEEP; ks_wlan_hw_power_save(priv); }else{ priv->dev_state = DEVICE_STATE_READY; -#if !defined(_SDIO_) - atomic_set(&priv->psstatus.status,PS_ACTIVE_SET); -#endif } } @@ -833,9 +788,6 @@ void hostif_connect_indication(ks_wlan_private *priv) /* for power save */ atomic_set(&priv->psstatus.snooze_guard, 0); atomic_set(&priv->psstatus.confirm_wait,0); -#if !defined(_SDIO_) - atomic_set(&priv->psstatus.status, PS_NONE); -#endif } ks_wlan_do_power_save(priv); @@ -894,10 +846,8 @@ void hostif_stop_confirm(ks_wlan_private *priv) union iwreq_data wrqu0; DPRINTK(3,"\n"); -#ifdef _SDIO_ if(priv->dev_state == DEVICE_STATE_SLEEP) priv->dev_state = DEVICE_STATE_READY; -#endif /* disconnect indication */ if( (priv->connect_status & CONNECT_STATUS_MASK)== CONNECT_STATUS){ @@ -1178,9 +1128,6 @@ int hostif_data_request(ks_wlan_private *priv, struct sk_buff *packet) if(atomic_read(&priv->psstatus.status)==PS_SNOOZE){ /* power save wakeup */ if(!netif_queue_stopped(priv->net_dev)) netif_stop_queue(priv->net_dev); -#if !defined(_SDIO_) - schedule_work(&priv->ks_wlan_wakeup_task); -#endif } DPRINTK(4, "skb_buff length=%d\n", packet_len); @@ -1302,14 +1249,10 @@ int hostif_data_request(ks_wlan_private *priv, struct sk_buff *packet) return result; } -#if defined(_SPI_) -#define ps_confirm_wait_inc(priv) -#else #define ps_confirm_wait_inc(priv) do{if(atomic_read(&priv->psstatus.status) > PS_ACTIVE_SET){ \ atomic_inc(&priv->psstatus.confirm_wait); \ /* atomic_set(&priv->psstatus.status, PS_CONF_WAIT);*/ \ } }while(0) -#endif static void hostif_mib_get_request( ks_wlan_private *priv, unsigned long mib_attribute) @@ -2509,9 +2452,6 @@ void hostif_sme_execute(ks_wlan_private *priv, int event) /* for power save */ atomic_set(&priv->psstatus.snooze_guard, 0); atomic_set(&priv->psstatus.confirm_wait,0); -#if !defined(_SDIO_) - atomic_set(&priv->psstatus.status, PS_NONE); -#endif if ( priv->dev_state == DEVICE_STATE_PREINIT ){ priv->dev_state = DEVICE_STATE_INIT; } @@ -2571,16 +2511,6 @@ void hostif_sme_enqueue(ks_wlan_private *priv, unsigned short event) { DPRINTK(3,"\n"); -#if !defined(_SDIO_) - if(atomic_read(&priv->psstatus.status)==PS_SNOOZE && event < SME_START_CONFIRM){ /* power save wakeup*/ - schedule_work(&priv->ks_wlan_wakeup_task); - if(atomic_read(&priv->sme_task.count) <= 0){ - /* schedule_work(&priv->ks_wlan_wakeup_task); */ - DPRINTK(4,"sme task disable.\n"); - tasklet_disable(&priv->sme_task); - } - } -#endif /* enqueue sme event */ diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h index c7cbde1e1d0a..329a062419fe 100644 --- a/drivers/staging/ks7010/ks_wlan.h +++ b/drivers/staging/ks7010/ks_wlan.h @@ -62,17 +62,7 @@ typedef void irqreturn_t; #define pci_name(x) x->slot_name #endif -#if (defined _PCMCIA_) -#include "pcmcia/ks7010_pcmcia.h" -#elif (defined _PCI_) -#include "pci/ks7010_pci.h" -#elif (defined _SDIO_) #include "ks7010_sdio.h" -#elif (defined _SPI_) -#include "spi/ks7010_spi.h" -#else -#error not defined bus type ! -#endif struct ks_wlan_parameter { uint8_t operation_mode; /* Operation Mode */ -- 2.39.5