blob: 95ac86b94a7c8b53b19bd9ab4c349e45a6b9d4b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*
* Driver for KeyStream, KS7010 based SDIO cards.
*
* Copyright (C) 2006-2008 KeyStream Corp.
* Copyright (C) 2009 Renesas Technology Corp.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _KS7010_SDIO_H
#define _KS7010_SDIO_H
/**
* struct ks_sdio_card - SDIO device data.
*
* Structure is used as the &struct sdio_func private data.
*
* @func: Pointer to the SDIO function device.
* @priv: Pointer to the &struct net_device private data.
*/
struct ks_sdio_card {
struct sdio_func *func;
struct ks_wlan_private *priv;
};
/* Tx Device struct */
#define TX_DEVICE_BUFF_SIZE 1024
/**
* struct tx_device_buffer - Queue item for the tx queue.
* @sendp: Pointer to the send request data.
* @size: Size of @sendp data.
* @complete_handler: Function called once data write to device is complete.
* @arg1: First argument to @complete_handler.
* @arg2: Second argument to @complete_handler.
*/
struct tx_device_buffer {
unsigned char *sendp;
unsigned int size;
void (*complete_handler)(struct ks_wlan_private *priv,
struct sk_buff *skb);
struct sk_buff *skb;
};
/**
* struct tx_device - Tx buffer queue.
* @tx_device_buffer: Queue buffer.
* @qhead: Head of tx queue.
* @qtail: Tail of tx queue.
* @tx_dev_lock: Queue lock.
*/
struct tx_device {
struct tx_device_buffer tx_dev_buff[TX_DEVICE_BUFF_SIZE];
unsigned int qhead;
unsigned int qtail;
spinlock_t tx_dev_lock; /* protect access to the queue */
};
/* Rx Device struct */
#define RX_DATA_SIZE (2 + 2 + 2347 + 1)
#define RX_DEVICE_BUFF_SIZE 32
/**
* struct rx_device_buffer - Queue item for the rx queue.
* @data: rx data.
* @size: Size of @data.
*/
struct rx_device_buffer {
unsigned char data[RX_DATA_SIZE];
unsigned int size;
};
/**
* struct rx_device - Rx buffer queue.
* @rx_device_buffer: Queue buffer.
* @qhead: Head of rx queue.
* @qtail: Tail of rx queue.
* @rx_dev_lock: Queue lock.
*/
struct rx_device {
struct rx_device_buffer rx_dev_buff[RX_DEVICE_BUFF_SIZE];
unsigned int qhead;
unsigned int qtail;
spinlock_t rx_dev_lock; /* protect access to the queue */
};
#endif /* _KS7010_SDIO_H */
|