FreeBSD kernel iwm device code
if_iwm_config.h
Go to the documentation of this file.
1/*-
2 * Based on BSD-licensed source modules in the Linux iwlwifi driver,
3 * which were used as the reference documentation for this implementation.
4 *
5 ******************************************************************************
6 *
7 * This file is provided under a dual BSD/GPLv2 license. When using or
8 * redistributing this file, you may do so under either license.
9 *
10 * GPL LICENSE SUMMARY
11 *
12 * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
13 * Copyright (C) 2016 Intel Deutschland GmbH
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of version 2 of the GNU General Public License as
17 * published by the Free Software Foundation.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
27 * USA
28 *
29 * The full GNU General Public License is included in this distribution
30 * in the file called COPYING.
31 *
32 * Contact Information:
33 * Intel Linux Wireless <linuxwifi@intel.com>
34 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
35 *
36 * BSD LICENSE
37 *
38 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
39 * Copyright (C) 2016 Intel Deutschland GmbH
40 * All rights reserved.
41 *
42 * Redistribution and use in source and binary forms, with or without
43 * modification, are permitted provided that the following conditions
44 * are met:
45 *
46 * * Redistributions of source code must retain the above copyright
47 * notice, this list of conditions and the following disclaimer.
48 * * Redistributions in binary form must reproduce the above copyright
49 * notice, this list of conditions and the following disclaimer in
50 * the documentation and/or other materials provided with the
51 * distribution.
52 * * Neither the name Intel Corporation nor the names of its
53 * contributors may be used to endorse or promote products derived
54 * from this software without specific prior written permission.
55 *
56 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
57 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
58 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
59 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
60 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
61 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
62 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
63 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
64 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
65 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
66 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67 *
68 *****************************************************************************/
69
70/*
71 * $FreeBSD$
72 */
73
74#ifndef __IWM_CONFIG_H__
75#define __IWM_CONFIG_H__
76
82};
83
84#define IWM_DEFAULT_MAX_TX_POWER 22
85
86/* Antenna presence definitions */
87#define IWM_ANT_NONE 0x0
88#define IWM_ANT_A (1 << 0)
89#define IWM_ANT_B (1 << 1)
90#define IWM_ANT_C (1 << 2)
91#define IWM_ANT_AB (IWM_ANT_A | IWM_ANT_B)
92#define IWM_ANT_AC (IWM_ANT_A | IWM_ANT_C)
93#define IWM_ANT_BC (IWM_ANT_B | IWM_ANT_C)
94#define IWM_ANT_ABC (IWM_ANT_A | IWM_ANT_B | IWM_ANT_C)
95
96static inline uint8_t num_of_ant(uint8_t mask)
97{
98 return !!((mask) & IWM_ANT_A) +
99 !!((mask) & IWM_ANT_B) +
100 !!((mask) & IWM_ANT_C);
101}
102
103/* lower blocks contain EEPROM image and calibration data */
104#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_7000 (16 * 512 * sizeof(uint16_t)) /* 16 KB */
105#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000 (32 * 512 * sizeof(uint16_t)) /* 32 KB */
106#define IWM_OTP_LOW_IMAGE_SIZE_FAMILY_9000 IWM_OTP_LOW_IMAGE_SIZE_FAMILY_8000
107
108
119};
120
132struct iwm_cfg {
133 const char *name;
134 const char *fw_name;
135 uint16_t eeprom_size;
143};
144
145/*
146 * This list declares the config structures for all devices.
147 */
148extern const struct iwm_cfg iwm7260_cfg;
149extern const struct iwm_cfg iwm3160_cfg;
150extern const struct iwm_cfg iwm3165_cfg;
151extern const struct iwm_cfg iwm3168_cfg;
152extern const struct iwm_cfg iwm7265_cfg;
153extern const struct iwm_cfg iwm7265d_cfg;
154extern const struct iwm_cfg iwm8260_cfg;
155extern const struct iwm_cfg iwm8265_cfg;
156extern const struct iwm_cfg iwm9560_cfg;
157extern const struct iwm_cfg iwm9260_cfg;
158
159#endif /* __IWM_CONFIG_H__ */
#define IWM_ANT_B
Definition: if_iwm_config.h:89
const struct iwm_cfg iwm3160_cfg
Definition: if_iwm_7000.c:103
iwm_device_family
Definition: if_iwm_config.h:77
@ IWM_DEVICE_FAMILY_UNDEFINED
Definition: if_iwm_config.h:78
@ IWM_DEVICE_FAMILY_9000
Definition: if_iwm_config.h:81
@ IWM_DEVICE_FAMILY_7000
Definition: if_iwm_config.h:79
@ IWM_DEVICE_FAMILY_8000
Definition: if_iwm_config.h:80
const struct iwm_cfg iwm9260_cfg
Definition: if_iwm_9260.c:90
const struct iwm_cfg iwm3168_cfg
Definition: if_iwm_7000.c:117
const struct iwm_cfg iwm7265_cfg
Definition: if_iwm_7000.c:125
const struct iwm_cfg iwm8260_cfg
Definition: if_iwm_8000.c:91
#define IWM_ANT_A
Definition: if_iwm_config.h:88
const struct iwm_cfg iwm7265d_cfg
Definition: if_iwm_7000.c:132
const struct iwm_cfg iwm9560_cfg
Definition: if_iwm_9000.c:90
static uint8_t num_of_ant(uint8_t mask)
Definition: if_iwm_config.h:96
const struct iwm_cfg iwm8265_cfg
Definition: if_iwm_8000.c:98
iwm_nvm_type
@ IWM_NVM_SDP
@ IWM_NVM_EXT
@ IWM_NVM
const struct iwm_cfg iwm3165_cfg
Definition: if_iwm_7000.c:110
#define IWM_ANT_C
Definition: if_iwm_config.h:90
const struct iwm_cfg iwm7260_cfg
Definition: if_iwm_7000.c:96
const char * name
uint16_t eeprom_size
int mqrx_supported
enum iwm_nvm_type nvm_type
int apmg_wake_up_wa
enum iwm_device_family device_family
int host_interrupt_operation_mode
uint8_t nvm_hw_section_num
int integrated
const char * fw_name