linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD
@ 2015-09-11  7:52 Tony Cho
  2015-09-11  7:52 ` [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE Tony Cho
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:52 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

This patch removes one of the platform dependencies, PANDA_BOARD from the
driver codes. The device tree will provide the platform dependencies in
the future commits.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c         | 4 ----
 drivers/staging/wilc1000/linux_wlan_common.h  | 3 ---
 drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 ----
 3 files changed, 11 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 63f44f8..9be0282 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -438,10 +438,6 @@ static int init_irq(linux_wlan_t *p_nic)
  *
  * ex) nic->dev_irq_num = gpio_to_irq(GPIO_NUM);
  */
-#elif defined(PANDA_BOARD)
-		gpio_export(GPIO_NUM, 1);
-		nic->dev_irq_num = OMAP_GPIO_IRQ(GPIO_NUM);
-		irq_set_irq_type(nic->dev_irq_num, IRQ_TYPE_LEVEL_LOW);
 #else
 		nic->dev_irq_num = gpio_to_irq(GPIO_NUM);
 #endif
diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index ea121f9..5d13c15 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -145,9 +145,6 @@ extern atomic_t DEBUG_LEVEL;
 		#define MODALIAS	"wilc_spi3"
 		#define GPIO_NUM	133
 	#endif
-#elif defined(PANDA_BOARD)
-	#define MODALIAS	"WILC_SPI"
-	#define GPIO_NUM	139
 #elif defined(PLAT_WMS8304)             /* rachel */
 	#define MODALIAS	"wilc_spi"
 	#define GPIO_NUM	139
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index e1caea9..f8064f0 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -80,11 +80,7 @@ struct WILC_WFI_stats {
  * LPC3131 which is important to get the MAC start status when you are blocked
  * inside linux_wlan_firmware_download() which blocks mac_open().
  */
-#if defined(PANDA_BOARD)
- #define RX_BH_TYPE  RX_BH_THREADED_IRQ
-#else
  #define RX_BH_TYPE  RX_BH_KTHREAD
-#endif
 
 struct wilc_wfi_key {
 	u8 *key;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE
  2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
@ 2015-09-11  7:52 ` Tony Cho
  2015-09-15  1:17   ` Tony Cho
  2015-09-11  7:52 ` [PATCH 2/7] staging: wilc1000: remove useless define PHY_802_11n Tony Cho
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:52 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

This patch removes the preprocessor definition, RX_BH_TYPE and uses the
request_threaded_irq instead of kernel thread to execute the interrupt
handler.

As a result, linux_wlan_enable_irq() and linux_wlan_disable_irq() are also
removed from the linux_wlan.c file.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c         | 148 +-------------------------
 drivers/staging/wilc1000/linux_wlan_common.h  |   3 -
 drivers/staging/wilc1000/wilc_wfi_netdevice.h |  16 ---
 drivers/staging/wilc1000/wilc_wlan.c          |   3 -
 4 files changed, 2 insertions(+), 168 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 9be0282..7265f93 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -300,89 +300,31 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
 }
 #endif
 
-/*
- *	Interrupt initialization and handling functions
- */
-
-void linux_wlan_enable_irq(void)
-{
-
-#if (RX_BH_TYPE != RX_BH_THREADED_IRQ)
-#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
-	PRINT_D(INT_DBG, "Enabling IRQ ...\n");
-	enable_irq(g_linux_wlan->dev_irq_num);
-#endif
-#endif
-}
-
-void linux_wlan_disable_irq(int wait)
-{
-#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
-	if (wait) {
-		PRINT_D(INT_DBG, "Disabling IRQ ...\n");
-		disable_irq(g_linux_wlan->dev_irq_num);
-	} else {
-		PRINT_D(INT_DBG, "Disabling IRQ ...\n");
-		disable_irq_nosync(g_linux_wlan->dev_irq_num);
-	}
-#endif
-}
-
 #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
 static irqreturn_t isr_uh_routine(int irq, void *user_data)
 {
-#if (RX_BH_TYPE != RX_BH_THREADED_IRQ)
-	linux_wlan_disable_irq(IRQ_NO_WAIT);
-#endif
 	PRINT_D(INT_DBG, "Interrupt received UH\n");
 
 	/*While mac is closing cacncel the handling of any interrupts received*/
 	if (g_linux_wlan->close) {
 		PRINT_ER("Driver is CLOSING: Can't handle UH interrupt\n");
-	#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
 		return IRQ_HANDLED;
-	#else
-		return IRQ_NONE;
-	#endif
-
 	}
-#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
-	schedule_work(&g_linux_wlan->rx_work_queue);
-	return IRQ_HANDLED;
-#elif (RX_BH_TYPE == RX_BH_KTHREAD)
-	up(&g_linux_wlan->rx_sem);
-	return IRQ_HANDLED;
-#elif (RX_BH_TYPE == RX_BH_THREADED_IRQ)
 	return IRQ_WAKE_THREAD;
-#endif
 
 }
 #endif
 
-#if (RX_BH_TYPE == RX_BH_WORK_QUEUE || RX_BH_TYPE == RX_BH_THREADED_IRQ)
-
-#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
 irqreturn_t isr_bh_routine(int irq, void *userdata)
 {
 	linux_wlan_t *nic;
 
 	nic = (linux_wlan_t *)userdata;
-#else
-static void isr_bh_routine(struct work_struct *work)
-{
-	perInterface_wlan_t *nic;
-
-	nic = (perInterface_wlan_t *)container_of(work, linux_wlan_t, rx_work_queue);
-#endif
 
 	/*While mac is closing cacncel the handling of any interrupts received*/
 	if (g_linux_wlan->close) {
 		PRINT_ER("Driver is CLOSING: Can't handle BH interrupt\n");
-	#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
 		return IRQ_HANDLED;
-	#else
-		return;
-	#endif
 	}
 
 	PRINT_D(INT_DBG, "Interrupt received BH\n");
@@ -391,36 +333,8 @@ static void isr_bh_routine(struct work_struct *work)
 	else
 		PRINT_ER("wlan_handle_rx_isr() hasn't been initialized\n");
 
-#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
 	return IRQ_HANDLED;
-#endif
-}
-#elif (RX_BH_TYPE == RX_BH_KTHREAD)
-static int isr_bh_routine(void *vp)
-{
-	linux_wlan_t *nic;
-
-	nic = (linux_wlan_t *)vp;
-
-	while (1) {
-		down(&nic->rx_sem);
-		if (g_linux_wlan->close) {
-
-			while (!kthread_should_stop())
-				schedule();
-
-			break;
-		}
-		PRINT_D(INT_DBG, "Interrupt received BH\n");
-		if (g_linux_wlan->oup.wlan_handle_rx_isr != 0)
-			g_linux_wlan->oup.wlan_handle_rx_isr();
-		else
-			PRINT_ER("wlan_handle_rx_isr() hasn't been initialized\n");
-	}
-
-	return 0;
 }
-#endif
 
 #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
 static int init_irq(linux_wlan_t *p_nic)
@@ -446,17 +360,10 @@ static int init_irq(linux_wlan_t *p_nic)
 		PRINT_ER("could not obtain gpio for WILC_INTR\n");
 	}
 
-#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
 	if ((ret != -1) && (request_threaded_irq(nic->dev_irq_num, isr_uh_routine, isr_bh_routine,
 						  IRQF_TRIGGER_LOW | IRQF_ONESHOT,               /*Without IRQF_ONESHOT the uh will remain kicked in and dont gave a chance to bh*/
 						  "WILC_IRQ", nic)) < 0) {
 
-#else
-	/*Request IRQ*/
-	if ((ret != -1) && (request_irq(nic->dev_irq_num, isr_uh_routine,
-					IRQF_TRIGGER_LOW, "WILC_IRQ", nic) < 0)) {
-
-#endif
 		PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM);
 		ret = -1;
 	} else {
@@ -1105,18 +1012,11 @@ void wilc1000_wlan_deinit(linux_wlan_t *nic)
 #endif
 
 		PRINT_D(INIT_DBG, "Disabling IRQ\n");
-		#if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO)
-		linux_wlan_disable_irq(IRQ_WAIT);
-		#else
-		  #if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31)
-
-		  #else
+	#ifdef WILC_SDIO
 		mutex_lock(&g_linux_wlan->hif_cs);
 		disable_sdio_interrupt();
 		mutex_unlock(&g_linux_wlan->hif_cs);
-		  #endif
-		#endif
-
+	#endif
 		/* not sure if the following unlocks are needed or not*/
 		if (&g_linux_wlan->rxq_event != NULL)
 			up(&g_linux_wlan->rxq_event);
@@ -1124,16 +1024,6 @@ void wilc1000_wlan_deinit(linux_wlan_t *nic)
 		if (&g_linux_wlan->txq_event != NULL)
 			up(&g_linux_wlan->txq_event);
 
-	#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
-		/*Removing the work struct from the linux kernel workqueue*/
-		if (&g_linux_wlan->rx_work_queue != NULL)
-			flush_work(&g_linux_wlan->rx_work_queue);
-
-	#elif (RX_BH_TYPE == RX_BH_KTHREAD)
-		/* if(&nic->rx_sem != NULL) */
-		/* up(&nic->rx_sem); */
-	#endif
-
 		PRINT_D(INIT_DBG, "Deinitializing Threads\n");
 		wlan_deinitialize_threads(nic);
 
@@ -1193,10 +1083,6 @@ int wlan_init_locks(linux_wlan_t *p_nic)
 	sema_init(&g_linux_wlan->rxq_thread_started, 0);
 	sema_init(&g_linux_wlan->txq_thread_started, 0);
 
-	#if (RX_BH_TYPE == RX_BH_KTHREAD)
-	sema_init(&g_linux_wlan->rx_sem, 0);
-	#endif
-
 	return 0;
 }
 
@@ -1274,19 +1160,6 @@ int wlan_initialize_threads(perInterface_wlan_t *nic)
 
 	PRINT_D(INIT_DBG, "Initializing Threads ...\n");
 
-#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
-	/*Initialize rx work queue task*/
-	INIT_WORK(&g_linux_wlan->rx_work_queue, isr_bh_routine);
-#elif (RX_BH_TYPE == RX_BH_KTHREAD)
-	PRINT_D(INIT_DBG, "Creating kthread for Rxq BH\n");
-	g_linux_wlan->rx_bh_thread = kthread_run(isr_bh_routine, (void *)g_linux_wlan, "K_RXQ_BH");
-	if (g_linux_wlan->rx_bh_thread == 0) {
-		PRINT_ER("couldn't create RX BH thread\n");
-		ret = -ENOBUFS;
-		goto _fail_;
-	}
-#endif
-
 #ifndef TCP_ENHANCEMENTS
 	/* create rx task */
 	PRINT_D(INIT_DBG, "Creating kthread for reception\n");
@@ -1333,13 +1206,6 @@ _fail_2:
 #ifndef TCP_ENHANCEMENTS
 _fail_1:
 #endif
-	#if (RX_BH_TYPE == RX_BH_KTHREAD)
-	/*De-Initialize 1st thread*/
-	g_linux_wlan->close = 1;
-	up(&g_linux_wlan->rx_sem);
-	kthread_stop(g_linux_wlan->rx_bh_thread);
-_fail_:
-	#endif
 	g_linux_wlan->close = 0;
 	return ret;
 }
@@ -1364,16 +1230,6 @@ static void wlan_deinitialize_threads(linux_wlan_t *nic)
 		kthread_stop(g_linux_wlan->txq_thread);
 		g_linux_wlan->txq_thread = NULL;
 	}
-
-	#if (RX_BH_TYPE == RX_BH_KTHREAD)
-	if (&g_linux_wlan->rx_sem != NULL)
-		up(&g_linux_wlan->rx_sem);
-
-	if (g_linux_wlan->rx_bh_thread != NULL) {
-		kthread_stop(g_linux_wlan->rx_bh_thread);
-		g_linux_wlan->rx_bh_thread = NULL;
-	}
-	#endif
 }
 
 #ifdef COMPLEMENT_BOOT
diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 5d13c15..28bdc40 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -168,7 +168,4 @@ extern atomic_t DEBUG_LEVEL;
 	#define MODALIAS	"WILC_SPI"
 	#define GPIO_NUM	0x44
 #endif
-
-
-void linux_wlan_enable_irq(void);
 #endif
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index f8064f0..cd80934 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -70,17 +70,7 @@ struct WILC_WFI_stats {
  * This structure is private to each device. It is used to pass
  * packets in and out, so there is place for a packet
  */
-
-#define RX_BH_KTHREAD 0
-#define RX_BH_WORK_QUEUE 1
-#define RX_BH_THREADED_IRQ 2
 #define num_reg_frame 2
-/*
- * If you use RX_BH_WORK_QUEUE on LPC3131: You may lose the first interrupt on
- * LPC3131 which is important to get the MAC start status when you are blocked
- * inside linux_wlan_firmware_download() which blocks mac_open().
- */
- #define RX_BH_TYPE  RX_BH_KTHREAD
 
 struct wilc_wfi_key {
 	u8 *key;
@@ -197,12 +187,6 @@ typedef struct {
 	struct semaphore sync_event;
 	struct semaphore txq_event;
 
-#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
-	struct work_struct rx_work_queue;
-#elif (RX_BH_TYPE == RX_BH_KTHREAD)
-	struct task_struct *rx_bh_thread;
-	struct semaphore rx_sem;
-#endif
 	struct semaphore rxq_thread_started;
 	struct semaphore txq_thread_started;
 
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 39716ba..44100a5 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1448,9 +1448,6 @@ void wilc_handle_isr(void)
 #endif
 		wilc_unknown_isr_ext();
 	}
-#if ((!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO))
-	linux_wlan_enable_irq();
-#endif
 	release_bus(RELEASE_ALLOW_SLEEP);
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/7] staging: wilc1000: remove useless define PHY_802_11n
  2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
  2015-09-11  7:52 ` [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE Tony Cho
@ 2015-09-11  7:52 ` Tony Cho
  2015-09-11  7:52 ` [PATCH 3/7] staging: wilc1000: remove unnecessary define FIVE_GHZ_BAND Tony Cho
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:52 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Glen Lee <glen.lee@atmel.com>

The define PHY_802_11n is useless because wilc1000 support 802.11n as always.
Remove PHY_802_11n and it related code.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index f393424..342df2a 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -18,7 +18,6 @@
 /* Constants                                                                 */
 /*****************************************************************************/
 #define INLINE static __inline
-#define PHY_802_11n
 #define MAX_CFG_PKTLEN     1450
 #define MSG_HEADER_LEN     4
 #define QUERY_MSG_TYPE     'Q'
@@ -552,7 +551,6 @@ u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
 
 u8 get_current_channel(u8 *pu8msa, u16 u16RxLen)
 {
-#ifdef PHY_802_11n
 #ifdef FIVE_GHZ_BAND
 	/* Get the current channel as its not set in */
 	/* 802.11a beacons/probe response            */
@@ -562,9 +560,6 @@ u8 get_current_channel(u8 *pu8msa, u16 u16RxLen)
 	/* the beacon/probe response frame          */
 	return get_current_channel_802_11n(pu8msa, u16RxLen);
 #endif /* FIVE_GHZ_BAND */
-#else
-	return 0;
-#endif /* PHY_802_11n */
 }
 
 /**
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/7] staging: wilc1000: remove unnecessary define FIVE_GHZ_BAND
  2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
  2015-09-11  7:52 ` [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE Tony Cho
  2015-09-11  7:52 ` [PATCH 2/7] staging: wilc1000: remove useless define PHY_802_11n Tony Cho
@ 2015-09-11  7:52 ` Tony Cho
  2015-09-11  7:53 ` [PATCH 4/7] staging: wilc1000: remove unused defines Tony Cho
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:52 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Glen Lee <glen.lee@atmel.com>

wilc1000 driver does not support five Ghz band. Remove FIVE_GHZ_BAND and
it's related code.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 342df2a..4726fac 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -551,15 +551,9 @@ u8 get_current_channel_802_11n(u8 *pu8msa, u16 u16RxLen)
 
 u8 get_current_channel(u8 *pu8msa, u16 u16RxLen)
 {
-#ifdef FIVE_GHZ_BAND
-	/* Get the current channel as its not set in */
-	/* 802.11a beacons/probe response            */
-	return (get_rf_channel() + 1);
-#else /* FIVE_GHZ_BAND */
 	/* Extract current channel information from */
 	/* the beacon/probe response frame          */
 	return get_current_channel_802_11n(pu8msa, u16RxLen);
-#endif /* FIVE_GHZ_BAND */
 }
 
 /**
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/7] staging: wilc1000: remove unused defines
  2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
                   ` (2 preceding siblings ...)
  2015-09-11  7:52 ` [PATCH 3/7] staging: wilc1000: remove unnecessary define FIVE_GHZ_BAND Tony Cho
@ 2015-09-11  7:53 ` Tony Cho
  2015-09-11  7:53 ` [PATCH 5/7] staging: wilc1000: remove unnecessary extern function declaration Tony Cho
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:53 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Glen Lee <glen.lee@atmel.com>

This patch removes follwing unused defines.
MAX_CFG_PKTLEN
MSG_HEADER_LEN
QUERY_MSG_TYPE
WRITE_MSG_TYPE
RESP_MSG_TYPE
WRITE_RESP_SUCCESS
INVALID
MAC_ADDR_LEN

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 4726fac..cada26d 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -18,14 +18,6 @@
 /* Constants                                                                 */
 /*****************************************************************************/
 #define INLINE static __inline
-#define MAX_CFG_PKTLEN     1450
-#define MSG_HEADER_LEN     4
-#define QUERY_MSG_TYPE     'Q'
-#define WRITE_MSG_TYPE     'W'
-#define RESP_MSG_TYPE      'R'
-#define WRITE_RESP_SUCCESS 1
-#define INVALID         255
-#define MAC_ADDR_LEN    6
 #define TAG_PARAM_OFFSET	(MAC_HDR_LEN + TIME_STAMP_LEN + \
 							BEACON_INTERVAL_LEN + CAP_INFO_LEN)
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 5/7] staging: wilc1000: remove unnecessary extern function declaration
  2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
                   ` (3 preceding siblings ...)
  2015-09-11  7:53 ` [PATCH 4/7] staging: wilc1000: remove unused defines Tony Cho
@ 2015-09-11  7:53 ` Tony Cho
  2015-09-11  7:53 ` [PATCH 6/7] staging: wilc1000: delete unused global variables Tony Cho
  2015-09-11  7:53 ` [PATCH 7/7] staging: wilc1000: remove unused variables Tony Cho
  6 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:53 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Glen Lee <glen.lee@atmel.com>

Function NetworkInfoReceived, GnrlAsyncInfoReceived and
host_int_ScanCompleteReceived are declared in the header file already.
Just removes the declaration and comments.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index cada26d..60b8961 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -137,14 +137,6 @@ typedef struct {
 /* Extern Variable Declarations                                              */
 /*****************************************************************************/
 
-
-/*****************************************************************************/
-/* Extern Function Declarations                                              */
-/*****************************************************************************/
-extern s32 SendRawPacket(s8 *ps8Packet, s32 s32PacketLen);
-extern void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length);
-extern void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length);
-extern void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length);
 /*****************************************************************************/
 /* Global Variables                                                          */
 /*****************************************************************************/
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 6/7] staging: wilc1000: delete unused global variables.
  2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
                   ` (4 preceding siblings ...)
  2015-09-11  7:53 ` [PATCH 5/7] staging: wilc1000: remove unnecessary extern function declaration Tony Cho
@ 2015-09-11  7:53 ` Tony Cho
  2015-09-11  7:53 ` [PATCH 7/7] staging: wilc1000: remove unused variables Tony Cho
  6 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:53 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Glen Lee <glen.lee@atmel.com>

gstrConfigPktInfo, SemHandleSendPkt and SemHandlePktResp are never used in
the drivers. So just delete the variables and it's related code.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 60b8961..ac97830 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -140,12 +140,6 @@ typedef struct {
 /*****************************************************************************/
 /* Global Variables                                                          */
 /*****************************************************************************/
-static struct semaphore SemHandleSendPkt;
-static struct semaphore SemHandlePktResp;
-
-
-static tstrConfigPktInfo gstrConfigPktInfo;
-
 /* WID Switches */
 static tstrWID gastrWIDs[] = {
 	{WID_FIRMWARE_VERSION,          WID_STR},
@@ -477,11 +471,6 @@ s32 CoreConfiguratorInit(void)
 
 	PRINT_D(CORECONFIG_DBG, "CoreConfiguratorInit()\n");
 
-	sema_init(&SemHandleSendPkt, 1);
-	sema_init(&SemHandlePktResp, 0);
-
-
-	memset((void *)(&gstrConfigPktInfo), 0, sizeof(tstrConfigPktInfo));
 	return s32Error;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 7/7] staging: wilc1000: remove unused variables
  2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
                   ` (5 preceding siblings ...)
  2015-09-11  7:53 ` [PATCH 6/7] staging: wilc1000: delete unused global variables Tony Cho
@ 2015-09-11  7:53 ` Tony Cho
  6 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-11  7:53 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	tony.cho, glen.lee, leo.kim, austin.shin, adel.noureldin,
	adham.abozaeid, Nicolas.FERRE

From: Glen Lee <glen.lee@atmel.com>

Variable g_num_total_switches is never used so just remove it.
gastrWIDs is also not used because g_num_total_switches is deleted.
Remove gastrWIDs also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 127 ----------------------------
 1 file changed, 127 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index ac97830..e0dd4820 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -140,133 +140,6 @@ typedef struct {
 /*****************************************************************************/
 /* Global Variables                                                          */
 /*****************************************************************************/
-/* WID Switches */
-static tstrWID gastrWIDs[] = {
-	{WID_FIRMWARE_VERSION,          WID_STR},
-	{WID_PHY_VERSION,               WID_STR},
-	{WID_HARDWARE_VERSION,          WID_STR},
-	{WID_BSS_TYPE,                  WID_CHAR},
-	{WID_QOS_ENABLE,                WID_CHAR},
-	{WID_11I_MODE,                  WID_CHAR},
-	{WID_CURRENT_TX_RATE,           WID_CHAR},
-	{WID_LINKSPEED,                 WID_CHAR},
-	{WID_RTS_THRESHOLD,             WID_SHORT},
-	{WID_FRAG_THRESHOLD,            WID_SHORT},
-	{WID_SSID,                      WID_STR},
-	{WID_BSSID,                     WID_ADR},
-	{WID_BEACON_INTERVAL,           WID_SHORT},
-	{WID_POWER_MANAGEMENT,          WID_CHAR},
-	{WID_LISTEN_INTERVAL,           WID_CHAR},
-	{WID_DTIM_PERIOD,               WID_CHAR},
-	{WID_CURRENT_CHANNEL,           WID_CHAR},
-	{WID_TX_POWER_LEVEL_11A,        WID_CHAR},
-	{WID_TX_POWER_LEVEL_11B,        WID_CHAR},
-	{WID_PREAMBLE,                  WID_CHAR},
-	{WID_11G_OPERATING_MODE,        WID_CHAR},
-	{WID_MAC_ADDR,                  WID_ADR},
-	{WID_IP_ADDRESS,                WID_ADR},
-	{WID_ACK_POLICY,                WID_CHAR},
-	{WID_PHY_ACTIVE_REG,            WID_CHAR},
-	{WID_AUTH_TYPE,                 WID_CHAR},
-	{WID_REKEY_POLICY,              WID_CHAR},
-	{WID_REKEY_PERIOD,              WID_INT},
-	{WID_REKEY_PACKET_COUNT,        WID_INT},
-	{WID_11I_PSK,                   WID_STR},
-	{WID_1X_KEY,                    WID_STR},
-	{WID_1X_SERV_ADDR,              WID_IP},
-	{WID_SUPP_USERNAME,             WID_STR},
-	{WID_SUPP_PASSWORD,             WID_STR},
-	{WID_USER_CONTROL_ON_TX_POWER,  WID_CHAR},
-	{WID_MEMORY_ADDRESS,            WID_INT},
-	{WID_MEMORY_ACCESS_32BIT,       WID_INT},
-	{WID_MEMORY_ACCESS_16BIT,       WID_SHORT},
-	{WID_MEMORY_ACCESS_8BIT,        WID_CHAR},
-	{WID_SITE_SURVEY_RESULTS,       WID_STR},
-	{WID_PMKID_INFO,                WID_STR},
-	{WID_ASSOC_RES_INFO,            WID_STR},
-	{WID_MANUFACTURER,              WID_STR}, /* 4 Wids added for the CAPI tool*/
-	{WID_MODEL_NAME,                WID_STR},
-	{WID_MODEL_NUM,                 WID_STR},
-	{WID_DEVICE_NAME,               WID_STR},
-	{WID_SSID_PROBE_REQ,            WID_STR},
-
-#ifdef MAC_802_11N
-	{WID_11N_ENABLE,                WID_CHAR},
-	{WID_11N_CURRENT_TX_MCS,        WID_CHAR},
-	{WID_TX_POWER_LEVEL_11N,        WID_CHAR},
-	{WID_11N_OPERATING_MODE,        WID_CHAR},
-	{WID_11N_SMPS_MODE,             WID_CHAR},
-	{WID_11N_PROT_MECH,             WID_CHAR},
-	{WID_11N_ERP_PROT_TYPE,         WID_CHAR},
-	{WID_11N_HT_PROT_TYPE,          WID_CHAR},
-	{WID_11N_PHY_ACTIVE_REG_VAL,    WID_INT},
-	{WID_11N_PRINT_STATS,           WID_CHAR},
-	{WID_11N_AUTORATE_TABLE,        WID_BIN_DATA},
-	{WID_HOST_CONFIG_IF_TYPE,       WID_CHAR},
-	{WID_HOST_DATA_IF_TYPE,         WID_CHAR},
-	{WID_11N_SIG_QUAL_VAL,          WID_SHORT},
-	{WID_11N_IMMEDIATE_BA_ENABLED,  WID_CHAR},
-	{WID_11N_TXOP_PROT_DISABLE,     WID_CHAR},
-	{WID_11N_SHORT_GI_20MHZ_ENABLE, WID_CHAR},
-	{WID_SHORT_SLOT_ALLOWED,        WID_CHAR},
-	{WID_11W_ENABLE,                WID_CHAR},
-	{WID_11W_MGMT_PROT_REQ,         WID_CHAR},
-	{WID_2040_ENABLE,               WID_CHAR},
-	{WID_2040_COEXISTENCE,          WID_CHAR},
-	{WID_USER_SEC_CHANNEL_OFFSET,   WID_CHAR},
-	{WID_2040_CURR_CHANNEL_OFFSET,  WID_CHAR},
-	{WID_2040_40MHZ_INTOLERANT,     WID_CHAR},
-	{WID_HUT_RESTART,               WID_CHAR},
-	{WID_HUT_NUM_TX_PKTS,           WID_INT},
-	{WID_HUT_FRAME_LEN,             WID_SHORT},
-	{WID_HUT_TX_FORMAT,             WID_CHAR},
-	{WID_HUT_BANDWIDTH,             WID_CHAR},
-	{WID_HUT_OP_BAND,               WID_CHAR},
-	{WID_HUT_STBC,                  WID_CHAR},
-	{WID_HUT_ESS,                   WID_CHAR},
-	{WID_HUT_ANTSET,                WID_CHAR},
-	{WID_HUT_HT_OP_MODE,            WID_CHAR},
-	{WID_HUT_RIFS_MODE,             WID_CHAR},
-	{WID_HUT_SMOOTHING_REC,         WID_CHAR},
-	{WID_HUT_SOUNDING_PKT,          WID_CHAR},
-	{WID_HUT_HT_CODING,             WID_CHAR},
-	{WID_HUT_TEST_DIR,              WID_CHAR},
-	{WID_HUT_TXOP_LIMIT,            WID_SHORT},
-	{WID_HUT_DEST_ADDR,             WID_ADR},
-	{WID_HUT_TX_PATTERN,            WID_BIN_DATA},
-	{WID_HUT_TX_TIME_TAKEN,         WID_INT},
-	{WID_HUT_PHY_TEST_MODE,         WID_CHAR},
-	{WID_HUT_PHY_TEST_RATE_HI,      WID_CHAR},
-	{WID_HUT_PHY_TEST_RATE_LO,      WID_CHAR},
-	{WID_HUT_TX_TEST_TIME,          WID_INT},
-	{WID_HUT_LOG_INTERVAL,          WID_INT},
-	{WID_HUT_DISABLE_RXQ_REPLENISH, WID_CHAR},
-	{WID_HUT_TEST_ID,               WID_STR},
-	{WID_HUT_KEY_ORIGIN,            WID_CHAR},
-	{WID_HUT_BCST_PERCENT,          WID_CHAR},
-	{WID_HUT_GROUP_CIPHER_TYPE,     WID_CHAR},
-	{WID_HUT_STATS,                 WID_BIN_DATA},
-	{WID_HUT_TSF_TEST_MODE,         WID_CHAR},
-	{WID_HUT_SIG_QUAL_AVG,          WID_SHORT},
-	{WID_HUT_SIG_QUAL_AVG_CNT,      WID_SHORT},
-	{WID_HUT_TSSI_VALUE,            WID_CHAR},
-	{WID_HUT_MGMT_PERCENT,          WID_CHAR},
-	{WID_HUT_MGMT_BCST_PERCENT,     WID_CHAR},
-	{WID_HUT_MGMT_ALLOW_HT,         WID_CHAR},
-	{WID_HUT_UC_MGMT_TYPE,          WID_CHAR},
-	{WID_HUT_BC_MGMT_TYPE,          WID_CHAR},
-	{WID_HUT_UC_MGMT_FRAME_LEN,     WID_SHORT},
-	{WID_HUT_BC_MGMT_FRAME_LEN,     WID_SHORT},
-	{WID_HUT_11W_MFP_REQUIRED_TX,   WID_CHAR},
-	{WID_HUT_11W_MFP_PEER_CAPABLE,  WID_CHAR},
-	{WID_HUT_11W_TX_IGTK_ID,        WID_CHAR},
-	{WID_HUT_FC_TXOP_MOD,           WID_CHAR},
-	{WID_HUT_FC_PROT_TYPE,          WID_CHAR},
-	{WID_HUT_SEC_CCA_ASSERT,        WID_CHAR},
-#endif /* MAC_802_11N */
-};
-
-u16 g_num_total_switches = (sizeof(gastrWIDs) / sizeof(tstrWID));
 /*****************************************************************************/
 /* Static Function Declarations                                              */
 /*****************************************************************************/
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE
  2015-09-11  7:52 ` [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE Tony Cho
@ 2015-09-15  1:17   ` Tony Cho
  2015-09-15 13:31     ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Tony Cho @ 2015-09-15  1:17 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	glen.lee, leo.kim, austin.shin, adel.noureldin, adham.abozaeid,
	Nicolas.FERRE

Hi Greg,

I am sorry but please ignore this patch in this time.

It's my mistake to include this patch from my queue into the series of 7 patches.

Thanks,

Tony.


On 2015년 09월 11일 16:52, Tony Cho wrote:
> This patch removes the preprocessor definition, RX_BH_TYPE and uses the
> request_threaded_irq instead of kernel thread to execute the interrupt
> handler.
>
> As a result, linux_wlan_enable_irq() and linux_wlan_disable_irq() are also
> removed from the linux_wlan.c file.
>
> Signed-off-by: Tony Cho <tony.cho@atmel.com>
> ---
>   drivers/staging/wilc1000/linux_wlan.c         | 148 +-------------------------
>   drivers/staging/wilc1000/linux_wlan_common.h  |   3 -
>   drivers/staging/wilc1000/wilc_wfi_netdevice.h |  16 ---
>   drivers/staging/wilc1000/wilc_wlan.c          |   3 -
>   4 files changed, 2 insertions(+), 168 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 9be0282..7265f93 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -300,89 +300,31 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
>   }
>   #endif
>   
> -/*
> - *	Interrupt initialization and handling functions
> - */
> -
> -void linux_wlan_enable_irq(void)
> -{
> -
> -#if (RX_BH_TYPE != RX_BH_THREADED_IRQ)
> -#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
> -	PRINT_D(INT_DBG, "Enabling IRQ ...\n");
> -	enable_irq(g_linux_wlan->dev_irq_num);
> -#endif
> -#endif
> -}
> -
> -void linux_wlan_disable_irq(int wait)
> -{
> -#if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
> -	if (wait) {
> -		PRINT_D(INT_DBG, "Disabling IRQ ...\n");
> -		disable_irq(g_linux_wlan->dev_irq_num);
> -	} else {
> -		PRINT_D(INT_DBG, "Disabling IRQ ...\n");
> -		disable_irq_nosync(g_linux_wlan->dev_irq_num);
> -	}
> -#endif
> -}
> -
>   #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
>   static irqreturn_t isr_uh_routine(int irq, void *user_data)
>   {
> -#if (RX_BH_TYPE != RX_BH_THREADED_IRQ)
> -	linux_wlan_disable_irq(IRQ_NO_WAIT);
> -#endif
>   	PRINT_D(INT_DBG, "Interrupt received UH\n");
>   
>   	/*While mac is closing cacncel the handling of any interrupts received*/
>   	if (g_linux_wlan->close) {
>   		PRINT_ER("Driver is CLOSING: Can't handle UH interrupt\n");
> -	#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
>   		return IRQ_HANDLED;
> -	#else
> -		return IRQ_NONE;
> -	#endif
> -
>   	}
> -#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
> -	schedule_work(&g_linux_wlan->rx_work_queue);
> -	return IRQ_HANDLED;
> -#elif (RX_BH_TYPE == RX_BH_KTHREAD)
> -	up(&g_linux_wlan->rx_sem);
> -	return IRQ_HANDLED;
> -#elif (RX_BH_TYPE == RX_BH_THREADED_IRQ)
>   	return IRQ_WAKE_THREAD;
> -#endif
>   
>   }
>   #endif
>   
> -#if (RX_BH_TYPE == RX_BH_WORK_QUEUE || RX_BH_TYPE == RX_BH_THREADED_IRQ)
> -
> -#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
>   irqreturn_t isr_bh_routine(int irq, void *userdata)
>   {
>   	linux_wlan_t *nic;
>   
>   	nic = (linux_wlan_t *)userdata;
> -#else
> -static void isr_bh_routine(struct work_struct *work)
> -{
> -	perInterface_wlan_t *nic;
> -
> -	nic = (perInterface_wlan_t *)container_of(work, linux_wlan_t, rx_work_queue);
> -#endif
>   
>   	/*While mac is closing cacncel the handling of any interrupts received*/
>   	if (g_linux_wlan->close) {
>   		PRINT_ER("Driver is CLOSING: Can't handle BH interrupt\n");
> -	#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
>   		return IRQ_HANDLED;
> -	#else
> -		return;
> -	#endif
>   	}
>   
>   	PRINT_D(INT_DBG, "Interrupt received BH\n");
> @@ -391,36 +333,8 @@ static void isr_bh_routine(struct work_struct *work)
>   	else
>   		PRINT_ER("wlan_handle_rx_isr() hasn't been initialized\n");
>   
> -#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
>   	return IRQ_HANDLED;
> -#endif
> -}
> -#elif (RX_BH_TYPE == RX_BH_KTHREAD)
> -static int isr_bh_routine(void *vp)
> -{
> -	linux_wlan_t *nic;
> -
> -	nic = (linux_wlan_t *)vp;
> -
> -	while (1) {
> -		down(&nic->rx_sem);
> -		if (g_linux_wlan->close) {
> -
> -			while (!kthread_should_stop())
> -				schedule();
> -
> -			break;
> -		}
> -		PRINT_D(INT_DBG, "Interrupt received BH\n");
> -		if (g_linux_wlan->oup.wlan_handle_rx_isr != 0)
> -			g_linux_wlan->oup.wlan_handle_rx_isr();
> -		else
> -			PRINT_ER("wlan_handle_rx_isr() hasn't been initialized\n");
> -	}
> -
> -	return 0;
>   }
> -#endif
>   
>   #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO)
>   static int init_irq(linux_wlan_t *p_nic)
> @@ -446,17 +360,10 @@ static int init_irq(linux_wlan_t *p_nic)
>   		PRINT_ER("could not obtain gpio for WILC_INTR\n");
>   	}
>   
> -#if (RX_BH_TYPE == RX_BH_THREADED_IRQ)
>   	if ((ret != -1) && (request_threaded_irq(nic->dev_irq_num, isr_uh_routine, isr_bh_routine,
>   						  IRQF_TRIGGER_LOW | IRQF_ONESHOT,               /*Without IRQF_ONESHOT the uh will remain kicked in and dont gave a chance to bh*/
>   						  "WILC_IRQ", nic)) < 0) {
>   
> -#else
> -	/*Request IRQ*/
> -	if ((ret != -1) && (request_irq(nic->dev_irq_num, isr_uh_routine,
> -					IRQF_TRIGGER_LOW, "WILC_IRQ", nic) < 0)) {
> -
> -#endif
>   		PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM);
>   		ret = -1;
>   	} else {
> @@ -1105,18 +1012,11 @@ void wilc1000_wlan_deinit(linux_wlan_t *nic)
>   #endif
>   
>   		PRINT_D(INIT_DBG, "Disabling IRQ\n");
> -		#if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO)
> -		linux_wlan_disable_irq(IRQ_WAIT);
> -		#else
> -		  #if defined(PLAT_ALLWINNER_A20) || defined(PLAT_ALLWINNER_A23) || defined(PLAT_ALLWINNER_A31)
> -
> -		  #else
> +	#ifdef WILC_SDIO
>   		mutex_lock(&g_linux_wlan->hif_cs);
>   		disable_sdio_interrupt();
>   		mutex_unlock(&g_linux_wlan->hif_cs);
> -		  #endif
> -		#endif
> -
> +	#endif
>   		/* not sure if the following unlocks are needed or not*/
>   		if (&g_linux_wlan->rxq_event != NULL)
>   			up(&g_linux_wlan->rxq_event);
> @@ -1124,16 +1024,6 @@ void wilc1000_wlan_deinit(linux_wlan_t *nic)
>   		if (&g_linux_wlan->txq_event != NULL)
>   			up(&g_linux_wlan->txq_event);
>   
> -	#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
> -		/*Removing the work struct from the linux kernel workqueue*/
> -		if (&g_linux_wlan->rx_work_queue != NULL)
> -			flush_work(&g_linux_wlan->rx_work_queue);
> -
> -	#elif (RX_BH_TYPE == RX_BH_KTHREAD)
> -		/* if(&nic->rx_sem != NULL) */
> -		/* up(&nic->rx_sem); */
> -	#endif
> -
>   		PRINT_D(INIT_DBG, "Deinitializing Threads\n");
>   		wlan_deinitialize_threads(nic);
>   
> @@ -1193,10 +1083,6 @@ int wlan_init_locks(linux_wlan_t *p_nic)
>   	sema_init(&g_linux_wlan->rxq_thread_started, 0);
>   	sema_init(&g_linux_wlan->txq_thread_started, 0);
>   
> -	#if (RX_BH_TYPE == RX_BH_KTHREAD)
> -	sema_init(&g_linux_wlan->rx_sem, 0);
> -	#endif
> -
>   	return 0;
>   }
>   
> @@ -1274,19 +1160,6 @@ int wlan_initialize_threads(perInterface_wlan_t *nic)
>   
>   	PRINT_D(INIT_DBG, "Initializing Threads ...\n");
>   
> -#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
> -	/*Initialize rx work queue task*/
> -	INIT_WORK(&g_linux_wlan->rx_work_queue, isr_bh_routine);
> -#elif (RX_BH_TYPE == RX_BH_KTHREAD)
> -	PRINT_D(INIT_DBG, "Creating kthread for Rxq BH\n");
> -	g_linux_wlan->rx_bh_thread = kthread_run(isr_bh_routine, (void *)g_linux_wlan, "K_RXQ_BH");
> -	if (g_linux_wlan->rx_bh_thread == 0) {
> -		PRINT_ER("couldn't create RX BH thread\n");
> -		ret = -ENOBUFS;
> -		goto _fail_;
> -	}
> -#endif
> -
>   #ifndef TCP_ENHANCEMENTS
>   	/* create rx task */
>   	PRINT_D(INIT_DBG, "Creating kthread for reception\n");
> @@ -1333,13 +1206,6 @@ _fail_2:
>   #ifndef TCP_ENHANCEMENTS
>   _fail_1:
>   #endif
> -	#if (RX_BH_TYPE == RX_BH_KTHREAD)
> -	/*De-Initialize 1st thread*/
> -	g_linux_wlan->close = 1;
> -	up(&g_linux_wlan->rx_sem);
> -	kthread_stop(g_linux_wlan->rx_bh_thread);
> -_fail_:
> -	#endif
>   	g_linux_wlan->close = 0;
>   	return ret;
>   }
> @@ -1364,16 +1230,6 @@ static void wlan_deinitialize_threads(linux_wlan_t *nic)
>   		kthread_stop(g_linux_wlan->txq_thread);
>   		g_linux_wlan->txq_thread = NULL;
>   	}
> -
> -	#if (RX_BH_TYPE == RX_BH_KTHREAD)
> -	if (&g_linux_wlan->rx_sem != NULL)
> -		up(&g_linux_wlan->rx_sem);
> -
> -	if (g_linux_wlan->rx_bh_thread != NULL) {
> -		kthread_stop(g_linux_wlan->rx_bh_thread);
> -		g_linux_wlan->rx_bh_thread = NULL;
> -	}
> -	#endif
>   }
>   
>   #ifdef COMPLEMENT_BOOT
> diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
> index 5d13c15..28bdc40 100644
> --- a/drivers/staging/wilc1000/linux_wlan_common.h
> +++ b/drivers/staging/wilc1000/linux_wlan_common.h
> @@ -168,7 +168,4 @@ extern atomic_t DEBUG_LEVEL;
>   	#define MODALIAS	"WILC_SPI"
>   	#define GPIO_NUM	0x44
>   #endif
> -
> -
> -void linux_wlan_enable_irq(void);
>   #endif
> diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
> index f8064f0..cd80934 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
> +++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
> @@ -70,17 +70,7 @@ struct WILC_WFI_stats {
>    * This structure is private to each device. It is used to pass
>    * packets in and out, so there is place for a packet
>    */
> -
> -#define RX_BH_KTHREAD 0
> -#define RX_BH_WORK_QUEUE 1
> -#define RX_BH_THREADED_IRQ 2
>   #define num_reg_frame 2
> -/*
> - * If you use RX_BH_WORK_QUEUE on LPC3131: You may lose the first interrupt on
> - * LPC3131 which is important to get the MAC start status when you are blocked
> - * inside linux_wlan_firmware_download() which blocks mac_open().
> - */
> - #define RX_BH_TYPE  RX_BH_KTHREAD
>   
>   struct wilc_wfi_key {
>   	u8 *key;
> @@ -197,12 +187,6 @@ typedef struct {
>   	struct semaphore sync_event;
>   	struct semaphore txq_event;
>   
> -#if (RX_BH_TYPE == RX_BH_WORK_QUEUE)
> -	struct work_struct rx_work_queue;
> -#elif (RX_BH_TYPE == RX_BH_KTHREAD)
> -	struct task_struct *rx_bh_thread;
> -	struct semaphore rx_sem;
> -#endif
>   	struct semaphore rxq_thread_started;
>   	struct semaphore txq_thread_started;
>   
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
> index 39716ba..44100a5 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -1448,9 +1448,6 @@ void wilc_handle_isr(void)
>   #endif
>   		wilc_unknown_isr_ext();
>   	}
> -#if ((!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO))
> -	linux_wlan_enable_irq();
> -#endif
>   	release_bus(RELEASE_ALLOW_SLEEP);
>   }
>   


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE
  2015-09-15  1:17   ` Tony Cho
@ 2015-09-15 13:31     ` Greg KH
  2015-09-16  1:19       ` Tony Cho
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2015-09-15 13:31 UTC (permalink / raw)
  To: Tony Cho
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	glen.lee, leo.kim, austin.shin, adel.noureldin, adham.abozaeid,
	Nicolas.FERRE

On Tue, Sep 15, 2015 at 10:17:41AM +0900, Tony Cho wrote:
> Hi Greg,
> 
> I am sorry but please ignore this patch in this time.

It's already in my tree, right?  I can revert it if you want me to, but
I can't ignore it anymore, sorry.

greg k-h

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE
  2015-09-15 13:31     ` Greg KH
@ 2015-09-16  1:19       ` Tony Cho
  0 siblings, 0 replies; 11+ messages in thread
From: Tony Cho @ 2015-09-16  1:19 UTC (permalink / raw)
  To: Greg KH
  Cc: devel, linux-wireless, johnny.kim, chris.park, rachel.kim,
	glen.lee, leo.kim, austin.shin, adel.noureldin, adham.abozaeid,
	Nicolas.FERRE

Hi Greg,

If it's already in your tree and can be applied alone, no problem to me. I will later send remaining series of it.

Thanks,

Tony.


On 2015년 09월 15일 22:31, Greg KH wrote:
> On Tue, Sep 15, 2015 at 10:17:41AM +0900, Tony Cho wrote:
>> Hi Greg,
>>
>> I am sorry but please ignore this patch in this time.
> It's already in my tree, right?  I can revert it if you want me to, but
> I can't ignore it anymore, sorry.
>
> greg k-h


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-09-16  1:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11  7:52 [PATCH 1/7] staging: wilc1000: remove PANDA_BOARD Tony Cho
2015-09-11  7:52 ` [PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE Tony Cho
2015-09-15  1:17   ` Tony Cho
2015-09-15 13:31     ` Greg KH
2015-09-16  1:19       ` Tony Cho
2015-09-11  7:52 ` [PATCH 2/7] staging: wilc1000: remove useless define PHY_802_11n Tony Cho
2015-09-11  7:52 ` [PATCH 3/7] staging: wilc1000: remove unnecessary define FIVE_GHZ_BAND Tony Cho
2015-09-11  7:53 ` [PATCH 4/7] staging: wilc1000: remove unused defines Tony Cho
2015-09-11  7:53 ` [PATCH 5/7] staging: wilc1000: remove unnecessary extern function declaration Tony Cho
2015-09-11  7:53 ` [PATCH 6/7] staging: wilc1000: delete unused global variables Tony Cho
2015-09-11  7:53 ` [PATCH 7/7] staging: wilc1000: remove unused variables Tony Cho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).