]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/net/wireless/ti/wl18xx/acx.h
544db6ef384127655db581eafb48ed24b9d10c93
[karo-tx-linux.git] / drivers / net / wireless / ti / wl18xx / acx.h
1 /*
2  * This file is part of wl18xx
3  *
4  * Copyright (C) 2011 Texas Instruments. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * version 2 as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18  * 02110-1301 USA
19  *
20  */
21
22 #ifndef __WL18XX_ACX_H__
23 #define __WL18XX_ACX_H__
24
25 #include "../wlcore/wlcore.h"
26
27 /* numbers of bits the length field takes (add 1 for the actual number) */
28 #define WL18XX_HOST_IF_LEN_SIZE_FIELD 15
29
30 struct wl18xx_acx_host_config_bitmap {
31         struct acx_header header;
32
33         __le32 host_cfg_bitmap;
34
35         __le32 host_sdio_block_size;
36
37         /* extra mem blocks per frame in TX. */
38         __le32 extra_mem_blocks;
39
40         /*
41          * number of bits of the length field in the first TX word
42          * (up to 15 - for using the entire 16 bits).
43          */
44         __le32 length_field_size;
45
46 } __packed;
47
48 enum {
49         CHECKSUM_OFFLOAD_DISABLED = 0,
50         CHECKSUM_OFFLOAD_ENABLED  = 1,
51         CHECKSUM_OFFLOAD_FAKE_RX  = 2,
52         CHECKSUM_OFFLOAD_INVALID  = 0xFF
53 };
54
55 struct wl18xx_acx_checksum_state {
56         struct acx_header header;
57
58          /* enum acx_checksum_state */
59         u8 checksum_state;
60         u8 pad[3];
61 } __packed;
62
63 int wl18xx_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap,
64                                   u32 sdio_blk_size, u32 extra_mem_blks,
65                                   u32 len_field_size);
66 int wl18xx_acx_set_checksum_state(struct wl1271 *wl);
67
68 #endif /* __WL12XX_ACX_H__ */