blob: b9de36a8ac485d1ce24fc1f4c554b3642e3ac8ee (
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
|
/*
* Copyright (C) 2011 Samsung Electronics.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _WIMAX_SDIO_H
#define _WIMAX_SDIO_H
#include "hw_types.h"
#include "ctl_types.h"
/* WiMAX Constants */
#define WIMAX_MTU_SIZE 1400
#define WIMAX_MAX_FRAMESIZE 1500
#define WIMAX_HEADER_SIZE 14
#define WIMAX_MAX_TOTAL_SIZE (WIMAX_MAX_FRAMESIZE + WIMAX_HEADER_SIZE)
/* maximum allocated data size, mtu 1400 so 3 blocks max 1536 */
#define BUFFER_DATA_SIZE 1600
#define ADAPTER_TIMEOUT (HZ * 10)
#define MEDIA_DISCONNECTED 0
#define MEDIA_CONNECTED 1
/* network adapter structure */
struct net_adapter {
struct sdio_func *func;
struct net_device *net;
struct net_device_stats netstats;
struct miscdevice uwibro_dev;
struct task_struct *tx_task;
struct task_struct *rx_task;
struct task_struct *mac_task;
s32 wake_irq;
u32 msg_enable;
u32 XmitErr; /* packet send fails */
struct hardware_info hw;
struct ctl_info ctl;
struct image_data wimax_image;
struct completion wakeup_event;
struct wimax732_platform_data *pdata;
wait_queue_head_t download_event;
wait_queue_head_t modem_resp_event;
wait_queue_head_t receive_event;
wait_queue_head_t send_event;
u8 downloading; /* firmware downloading */
u8 download_complete;
u8 modem_resp;
u8 mac_ready;
u8 media_state;/* mac completion */
u8 prev_wimax_status;
u8 rx_data_available;
u8 halted; /* device halt pending flag */
u8 removed;
};
#endif /* _WIMAX_SDIO_H */
|