summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_msgqueue.h
diff options
context:
space:
mode:
authorJohnny Kim2015-05-11 07:30:56 +0200
committerGreg Kroah-Hartman2015-05-24 22:36:53 +0200
commitc5c77ba18ea66aa05441c71e38473efb787705a4 (patch)
tree346d9f9d956b97650977db976e45f01d31223154 /drivers/staging/wilc1000/wilc_msgqueue.h
parentstaging: panel: fix stackdump (diff)
downloadkernel-qcow2-linux-c5c77ba18ea66aa05441c71e38473efb787705a4.tar.gz
kernel-qcow2-linux-c5c77ba18ea66aa05441c71e38473efb787705a4.tar.xz
kernel-qcow2-linux-c5c77ba18ea66aa05441c71e38473efb787705a4.zip
staging: wilc1000: Add SDIO/SPI 802.11 driver
This driver is for the wilc1000 which is a single chip IEEE 802.11 b/g/n device. The driver works together with cfg80211, which is the kernel side of configuration management for wireless devices because the wilc1000 chipset is fullmac where the MLME is managed in hardware. The driver worked from kernel version 2.6.38 and being now ported to several others since then. A TODO file is included as well in this commit. Signed-off-by: Johnny Kim <johnny.kim@atmel.com> Signed-off-by: Rachel Kim <rachel.kim@atmel.com> Signed-off-by: Dean Lee <dean.lee@atmel.com> Signed-off-by: Chris Park <chris.park@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_msgqueue.h')
-rw-r--r--drivers/staging/wilc1000/wilc_msgqueue.h133
1 files changed, 133 insertions, 0 deletions
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.h b/drivers/staging/wilc1000/wilc_msgqueue.h
new file mode 100644
index 000000000000..a48be533aad9
--- /dev/null
+++ b/drivers/staging/wilc1000/wilc_msgqueue.h
@@ -0,0 +1,133 @@
+#ifndef __WILC_MSG_QUEUE_H__
+#define __WILC_MSG_QUEUE_H__
+
+/*!
+ * @file wilc_msgqueue.h
+ * @brief Message Queue OS wrapper functionality
+ * @author syounan
+ * @sa wilc_oswrapper.h top level OS wrapper file
+ * @date 30 Aug 2010
+ * @version 1.0
+ */
+
+#ifndef CONFIG_WILC_MSG_QUEUE_FEATURE
+#error the feature CONFIG_WILC_MSG_QUEUE_FEATURE must be supported to include this file
+#endif
+
+/*!
+ * @struct tstrWILC_MsgQueueAttrs
+ * @brief Message Queue API options
+ * @author syounan
+ * @date 30 Aug 2010
+ * @version 1.0
+ */
+typedef struct {
+ #ifdef CONFIG_WILC_MSG_QUEUE_IPC_NAME
+ WILC_Char *pcName;
+ #endif
+
+ #ifdef CONFIG_WILC_MSG_QUEUE_TIMEOUT
+ WILC_Uint32 u32Timeout;
+ #endif
+
+ /* a dummy member to avoid compiler errors*/
+ WILC_Uint8 dummy;
+
+} tstrWILC_MsgQueueAttrs;
+
+/*!
+ * @brief Fills the MsgQueueAttrs with default parameters
+ * @param[out] pstrAttrs structure to be filled
+ * @sa WILC_TimerAttrs
+ * @author syounan
+ * @date 30 Aug 2010
+ * @version 1.0
+ */
+static void WILC_MsgQueueFillDefault(tstrWILC_MsgQueueAttrs *pstrAttrs)
+{
+ #ifdef CONFIG_WILC_MSG_QUEUE_IPC_NAME
+ pstrAttrs->pcName = WILC_NULL;
+ #endif
+
+ #ifdef CONFIG_WILC_MSG_QUEUE_TIMEOUT
+ pstrAttrs->u32Timeout = WILC_OS_INFINITY;
+ #endif
+}
+/*!
+ * @brief Creates a new Message queue
+ * @details Creates a new Message queue, if the feature
+ * CONFIG_WILC_MSG_QUEUE_IPC_NAME is enabled and pstrAttrs->pcName
+ * is not Null, then this message queue can be used for IPC with
+ * any other message queue having the same name in the system
+ * @param[in,out] pHandle handle to the message queue object
+ * @param[in] pstrAttrs Optional attributes, NULL for default
+ * @return Error code indicating sucess/failure
+ * @sa tstrWILC_MsgQueueAttrs
+ * @author syounan
+ * @date 30 Aug 2010
+ * @version 1.0
+ */
+WILC_ErrNo WILC_MsgQueueCreate(WILC_MsgQueueHandle *pHandle,
+ tstrWILC_MsgQueueAttrs *pstrAttrs);
+
+
+/*!
+ * @brief Sends a message
+ * @details Sends a message, this API will block unil the message is
+ * actually sent or until it is timedout (as long as the feature
+ * CONFIG_WILC_MSG_QUEUE_TIMEOUT is enabled and pstrAttrs->u32Timeout
+ * is not set to WILC_OS_INFINITY), zero timeout is a valid value
+ * @param[in] pHandle handle to the message queue object
+ * @param[in] pvSendBuffer pointer to the data to send
+ * @param[in] u32SendBufferSize the size of the data to send
+ * @param[in] pstrAttrs Optional attributes, NULL for default
+ * @return Error code indicating sucess/failure
+ * @sa tstrWILC_MsgQueueAttrs
+ * @author syounan
+ * @date 30 Aug 2010
+ * @version 1.0
+ */
+WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle,
+ const void *pvSendBuffer, WILC_Uint32 u32SendBufferSize,
+ tstrWILC_MsgQueueAttrs *pstrAttrs);
+
+
+/*!
+ * @brief Receives a message
+ * @details Receives a message, this API will block unil a message is
+ * received or until it is timedout (as long as the feature
+ * CONFIG_WILC_MSG_QUEUE_TIMEOUT is enabled and pstrAttrs->u32Timeout
+ * is not set to WILC_OS_INFINITY), zero timeout is a valid value
+ * @param[in] pHandle handle to the message queue object
+ * @param[out] pvRecvBuffer pointer to a buffer to fill with the received message
+ * @param[in] u32RecvBufferSize the size of the receive buffer
+ * @param[out] pu32ReceivedLength the length of received data
+ * @param[in] pstrAttrs Optional attributes, NULL for default
+ * @return Error code indicating sucess/failure
+ * @sa tstrWILC_MsgQueueAttrs
+ * @author syounan
+ * @date 30 Aug 2010
+ * @version 1.0
+ */
+WILC_ErrNo WILC_MsgQueueRecv(WILC_MsgQueueHandle *pHandle,
+ void *pvRecvBuffer, WILC_Uint32 u32RecvBufferSize,
+ WILC_Uint32 *pu32ReceivedLength,
+ tstrWILC_MsgQueueAttrs *pstrAttrs);
+
+
+/*!
+ * @brief Destroys an existing Message queue
+ * @param[in] pHandle handle to the message queue object
+ * @param[in] pstrAttrs Optional attributes, NULL for default
+ * @return Error code indicating sucess/failure
+ * @sa tstrWILC_MsgQueueAttrs
+ * @author syounan
+ * @date 30 Aug 2010
+ * @version 1.0
+ */
+WILC_ErrNo WILC_MsgQueueDestroy(WILC_MsgQueueHandle *pHandle,
+ tstrWILC_MsgQueueAttrs *pstrAttrs);
+
+
+
+#endif