xref: /openbmc/linux/drivers/net/wireless/ti/wl1251/init.h (revision d47a97bd)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * This file is part of wl1251
4  *
5  * Copyright (C) 2009 Nokia Corporation
6  */
7 
8 #ifndef __WL1251_INIT_H__
9 #define __WL1251_INIT_H__
10 
11 #include "wl1251.h"
12 
13 enum {
14 	/* best effort/legacy */
15 	AC_BE = 0,
16 
17 	/* background */
18 	AC_BK = 1,
19 
20 	/* video */
21 	AC_VI = 2,
22 
23 	/* voice */
24 	AC_VO = 3,
25 
26 	/* broadcast dummy access category */
27 	AC_BCAST = 4,
28 
29 	NUM_ACCESS_CATEGORIES = 4
30 };
31 
32 /* following are defult values for the IE fields*/
33 #define CWMIN_BK  15
34 #define CWMIN_BE  15
35 #define CWMIN_VI  7
36 #define CWMIN_VO  3
37 #define CWMAX_BK  1023
38 #define CWMAX_BE  63
39 #define CWMAX_VI  15
40 #define CWMAX_VO  7
41 
42 /* slot number setting to start transmission at PIFS interval */
43 #define AIFS_PIFS 1
44 
45 /*
46  * slot number setting to start transmission at DIFS interval - normal DCF
47  * access
48  */
49 #define AIFS_DIFS 2
50 
51 #define AIFSN_BK  7
52 #define AIFSN_BE  3
53 #define AIFSN_VI  AIFS_PIFS
54 #define AIFSN_VO  AIFS_PIFS
55 #define TXOP_BK   0
56 #define TXOP_BE   0
57 #define TXOP_VI   3008
58 #define TXOP_VO   1504
59 
60 int wl1251_hw_init_hwenc_config(struct wl1251 *wl);
61 int wl1251_hw_init_templates_config(struct wl1251 *wl);
62 int wl1251_hw_init_rx_config(struct wl1251 *wl, u32 config, u32 filter);
63 int wl1251_hw_init_phy_config(struct wl1251 *wl);
64 int wl1251_hw_init_beacon_filter(struct wl1251 *wl);
65 int wl1251_hw_init_pta(struct wl1251 *wl);
66 int wl1251_hw_init_energy_detection(struct wl1251 *wl);
67 int wl1251_hw_init_beacon_broadcast(struct wl1251 *wl);
68 int wl1251_hw_init_power_auth(struct wl1251 *wl);
69 int wl1251_hw_init_mem_config(struct wl1251 *wl);
70 int wl1251_hw_init(struct wl1251 *wl);
71 
72 #endif
73