Skip to contentSkip to conversation

staging: wilc1000: move struct Message and WILC_MsgQueueHandle

PATCH In review Chaehyun Lim 2 participants 7 messages Sep 23, 2015 – Sep 29, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 staging: wilc1000: move struct Message and WILC_MsgQueueHandle

This patch moves struct Message and WILC_MsgQueueHandle from wilc_platform.h to wilc_msgqueue.h because those two structures are used only at wilc_msgqueue.c so that it is good to be defined at wilc_msgqueue.h

---
 drivers/staging/wilc1000/wilc_msgqueue.h | 15 +++++++++++++++
 drivers/staging/wilc1000/wilc_platform.h | 14 --------------
 2 files changed, 15 insertions(+), 14 deletions(-)
drivers/staging/wilc1000/wilc_msgqueue.h +15 -0
index a3c0bba..982628e 100644
@@ -12,6 +12,21 @@
 
 #include "wilc_platform.h"
 
+/* Message Queue type is a structure */
+typedef struct __Message_struct {
+	void *pvBuffer;
+	u32 u32Length;
+	struct __Message_struct *pstrNext;
+} Message;
+
+typedef struct __MessageQueue_struct {
+	struct semaphore hSem;
+	spinlock_t strCriticalSection;
+	bool bExiting;
+	u32 u32ReceiversCount;
+	Message *pstrMessageList;
+} WILC_MsgQueueHandle;
+
 /*!
  *  @brief		Creates a new Message queue
  *  @details		Creates a new Message queue, if the feature
drivers/staging/wilc1000/wilc_platform.h +0 -14
index b763616..6ec1aa3 100644
@@ -16,20 +16,6 @@
  *      OS specific types
  *******************************************************************/
 
-/* Message Queue type is a structure */
-typedef struct __Message_struct {
-	void *pvBuffer;
-	u32 u32Length;
-	struct __Message_struct *pstrNext;
-} Message;
-
-typedef struct __MessageQueue_struct {
-	struct semaphore hSem;
-	spinlock_t strCriticalSection;
-	bool bExiting;
-	u32 u32ReceiversCount;
-	Message *pstrMessageList;
-} WILC_MsgQueueHandle;
 
 
 
Signature · 1 line
2.5.1
#1 lore raw

PATCH 2/6 staging: wilc1000: remove wilc_platform.h include file

This patch removes wilc_platform.h include file that is defined in wilc_msgqueue.h file. After removing it, compilation error occurs so that it is included two header files as <linux/semaphore.h> and <linux/slab.h> at wilc_msgqueue.h and wilc_msgqueue.c

---
 drivers/staging/wilc1000/wilc_msgqueue.c | 1 +
 drivers/staging/wilc1000/wilc_msgqueue.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/staging/wilc1000/wilc_msgqueue.c +1 -0
index 869736a..d5ebd6d 100644
@@ -3,6 +3,7 @@
 #include <linux/spinlock.h>
 #include "linux_wlan_common.h"
 #include <linux/errno.h>
+#include <linux/slab.h>
 
 /*!
  *  @author		syounan
drivers/staging/wilc1000/wilc_msgqueue.h +1 -1
index 982628e..d231c33 100644
@@ -10,7 +10,7 @@
  *  @version	1.0
  */
 
-#include "wilc_platform.h"
+#include <linux/semaphore.h>
 
 /* Message Queue type is a structure */
 typedef struct __Message_struct {
Signature · 1 line
2.5.1
#2 lore raw

PATCH 3/6 staging: wilc1000: move wilc_msgqueue.h include file

In reply to Chaehyun Lim

This patch moves wilc_msgqueue.h include file from wilc_oswrapper.h to host_interface.c because message queue function as wilc_mq_create, wilc_mq_send, wilc_mq_recv and wilc_mq_destroy are used only at host_interface.c file.

---
 drivers/staging/wilc1000/host_interface.c | 1 +
 drivers/staging/wilc1000/wilc_oswrapper.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -0
index e7fc648..49f3de9 100644
@@ -1,6 +1,7 @@
 #include "host_interface.h"
 #include "coreconfigurator.h"
 #include "wilc_wlan_if.h"
+#include "wilc_msgqueue.h"
 
 extern u8 connecting;
 
drivers/staging/wilc1000/wilc_oswrapper.h +0 -2
index 9b5c23a..4f7bd89 100644
@@ -16,7 +16,5 @@
 /* Os Configuration File */
 #include "wilc_platform.h"
 
-/* Message Queue */
-#include "wilc_msgqueue.h"
 
 #endif
Signature · 1 line
2.5.1
#3 lore raw

PATCH 4/6 staging: wilc1000: remove WILC_OSW_INTERFACE_VER define

In reply to Chaehyun Lim

This patch removes WILC_OSW_INTERFACE_VER define that is not used anywhere.

---
 drivers/staging/wilc1000/wilc_oswrapper.h | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/wilc_oswrapper.h +0 -2
index 4f7bd89..5456c96 100644
@@ -10,8 +10,6 @@
  *  @version	1.0
  */
 
-/* OS Wrapper interface version */
-#define WILC_OSW_INTERFACE_VER 2
 
 /* Os Configuration File */
 #include "wilc_platform.h"
Signature · 1 line
2.5.1
#4 lore raw

PATCH 5/6 staging: wilc1000: remove wilc_platform include file

In reply to Chaehyun Lim

This patch removes wilc_platform.h include file in wilc_oswrapper.h Because wilc_platform.h have several standard header files so that some header file should be included .c file to avoid compilation errors.

---
 drivers/staging/wilc1000/coreconfigurator.c | 1 +
 drivers/staging/wilc1000/host_interface.c   | 4 ++++
 drivers/staging/wilc1000/wilc_oswrapper.h   | 2 --
 drivers/staging/wilc1000/wilc_wlan_if.h     | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/coreconfigurator.c +1 -0
index 68e3c7f..34a6c10 100644
@@ -12,6 +12,7 @@
 #include "coreconfigurator.h"
 #include "wilc_wlan_if.h"
 #include <linux/errno.h>
+#include <linux/slab.h>
 #define TAG_PARAM_OFFSET	(MAC_HDR_LEN + TIME_STAMP_LEN + \
 							BEACON_INTERVAL_LEN + CAP_INFO_LEN)
 
drivers/staging/wilc1000/host_interface.c +4 -0
index 49f3de9..0dd7639 100644
@@ -1,3 +1,7 @@
+#include <linux/slab.h>
+#include <linux/time.h>
+#include <linux/kthread.h>
+#include <linux/delay.h>
 #include "host_interface.h"
 #include "coreconfigurator.h"
 #include "wilc_wlan_if.h"
drivers/staging/wilc1000/wilc_oswrapper.h +0 -2
index 5456c96..10d16e9 100644
@@ -11,8 +11,6 @@
  */
 
 
-/* Os Configuration File */
-#include "wilc_platform.h"
 
 
 #endif
drivers/staging/wilc1000/wilc_wlan_if.h +1 -1
index 668f1b8..fd37997 100644
@@ -14,7 +14,7 @@
 /* #define MEMORY_STATIC */
 /* #define USE_OLD_SPI_SW */
 
-
+#include <linux/semaphore.h>
 #include "wilc_oswrapper.h"
 #include "linux_wlan_common.h"
 
Signature · 1 line
2.5.1
maintainer
#5 lore raw

Re: [PATCH 5/6] staging: wilc1000: remove wilc_platform include file

Quoted 11 lines · Chaehyun Lim

This patch removes wilc_platform.h include file in wilc_oswrapper.h Because wilc_platform.h have several standard header files so that some header file should be included .c file to avoid compilation errors.

---
 drivers/staging/wilc1000/coreconfigurator.c | 1 +
 drivers/staging/wilc1000/host_interface.c   | 4 ++++
 drivers/staging/wilc1000/wilc_oswrapper.h   | 2 --
 drivers/staging/wilc1000/wilc_wlan_if.h     | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

This patch, and 6/6 doesn't apply to the tree anymore, can you rebase and resend them?

thanks,

greg k-h

#6 lore raw

PATCH 6/6 staging: wilc1000: delete wilc_oswrapper.h

In reply to Chaehyun Lim

This patch delete wilc_oswrapper.h that has nothing inside.

---
 drivers/staging/wilc1000/wilc_oswrapper.h | 16 ----------------
 drivers/staging/wilc1000/wilc_wlan.h      |  1 -
 drivers/staging/wilc1000/wilc_wlan_if.h   |  1 -
 3 files changed, 18 deletions(-)
 delete mode 100644 drivers/staging/wilc1000/wilc_oswrapper.h
drivers/staging/wilc1000/wilc_oswrapper.h deleted +0 -16
deleted file mode 100644
index 10d16e9..0000000
@@ -1,16 +0,0 @@
-#ifndef __WILC_OSWRAPPER_H__
-#define __WILC_OSWRAPPER_H__
-
-/*!
- *  @file	wilc_oswrapper.h
- *  @brief	Top level OS Wrapper, include this file and it will include all
- *              other files as necessary
- *  @author	syounan
- *  @date	10 Aug 2010
- *  @version	1.0
- */
-
-
-
-
-#endif
drivers/staging/wilc1000/wilc_wlan.h +0 -1
index 60da18c..ad8de29 100644
@@ -1,7 +1,6 @@
 #ifndef WILC_WLAN_H
 #define WILC_WLAN_H
 
-#include "wilc_oswrapper.h"
 
 
 #define ISWILC1000(id)   (((id & 0xfffff000) == 0x100000) ? 1 : 0)
drivers/staging/wilc1000/wilc_wlan_if.h +0 -1
index fd37997..f561eac 100644
@@ -15,7 +15,6 @@
 /* #define USE_OLD_SPI_SW */
 
 #include <linux/semaphore.h>
-#include "wilc_oswrapper.h"
 #include "linux_wlan_common.h"
 
 
Signature · 1 line
2.5.1