Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of wl1271 |
| 3 | * |
| 4 | * Copyright (C) 2009 Nokia Corporation |
| 5 | * |
| 6 | * Contact: Luciano Coelho <luciano.coelho@nokia.com> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License |
| 10 | * version 2 as published by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
| 20 | * 02110-1301 USA |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef __WL1271_CONF_H__ |
| 25 | #define __WL1271_CONF_H__ |
| 26 | |
| 27 | enum { |
| 28 | CONF_HW_BIT_RATE_1MBPS = BIT(0), |
| 29 | CONF_HW_BIT_RATE_2MBPS = BIT(1), |
| 30 | CONF_HW_BIT_RATE_5_5MBPS = BIT(2), |
| 31 | CONF_HW_BIT_RATE_6MBPS = BIT(3), |
| 32 | CONF_HW_BIT_RATE_9MBPS = BIT(4), |
| 33 | CONF_HW_BIT_RATE_11MBPS = BIT(5), |
| 34 | CONF_HW_BIT_RATE_12MBPS = BIT(6), |
| 35 | CONF_HW_BIT_RATE_18MBPS = BIT(7), |
| 36 | CONF_HW_BIT_RATE_22MBPS = BIT(8), |
| 37 | CONF_HW_BIT_RATE_24MBPS = BIT(9), |
| 38 | CONF_HW_BIT_RATE_36MBPS = BIT(10), |
| 39 | CONF_HW_BIT_RATE_48MBPS = BIT(11), |
| 40 | CONF_HW_BIT_RATE_54MBPS = BIT(12), |
| 41 | CONF_HW_BIT_RATE_MCS_0 = BIT(13), |
| 42 | CONF_HW_BIT_RATE_MCS_1 = BIT(14), |
| 43 | CONF_HW_BIT_RATE_MCS_2 = BIT(15), |
| 44 | CONF_HW_BIT_RATE_MCS_3 = BIT(16), |
| 45 | CONF_HW_BIT_RATE_MCS_4 = BIT(17), |
| 46 | CONF_HW_BIT_RATE_MCS_5 = BIT(18), |
| 47 | CONF_HW_BIT_RATE_MCS_6 = BIT(19), |
| 48 | CONF_HW_BIT_RATE_MCS_7 = BIT(20) |
| 49 | }; |
| 50 | |
| 51 | enum { |
| 52 | CONF_HW_RATE_INDEX_1MBPS = 0, |
| 53 | CONF_HW_RATE_INDEX_2MBPS = 1, |
| 54 | CONF_HW_RATE_INDEX_5_5MBPS = 2, |
| 55 | CONF_HW_RATE_INDEX_6MBPS = 3, |
| 56 | CONF_HW_RATE_INDEX_9MBPS = 4, |
| 57 | CONF_HW_RATE_INDEX_11MBPS = 5, |
| 58 | CONF_HW_RATE_INDEX_12MBPS = 6, |
| 59 | CONF_HW_RATE_INDEX_18MBPS = 7, |
| 60 | CONF_HW_RATE_INDEX_22MBPS = 8, |
| 61 | CONF_HW_RATE_INDEX_24MBPS = 9, |
| 62 | CONF_HW_RATE_INDEX_36MBPS = 10, |
| 63 | CONF_HW_RATE_INDEX_48MBPS = 11, |
| 64 | CONF_HW_RATE_INDEX_54MBPS = 12, |
| 65 | CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_54MBPS, |
| 66 | }; |
| 67 | |
| 68 | struct conf_sg_settings { |
| 69 | /* |
| 70 | * Defines the PER threshold in PPM of the BT voice of which reaching |
| 71 | * this value will trigger raising the priority of the BT voice by |
| 72 | * the BT IP until next NFS sample interval time as defined in |
| 73 | * nfs_sample_interval. |
| 74 | * |
| 75 | * Unit: PER value in PPM (parts per million) |
| 76 | * #Error_packets / #Total_packets |
| 77 | |
| 78 | * Range: u32 |
| 79 | */ |
| 80 | u32 per_threshold; |
| 81 | |
| 82 | /* |
| 83 | * This value is an absolute time in micro-seconds to limit the |
| 84 | * maximum scan duration compensation while in SG |
| 85 | */ |
| 86 | u32 max_scan_compensation_time; |
| 87 | |
| 88 | /* Defines the PER threshold of the BT voice of which reaching this |
| 89 | * value will trigger raising the priority of the BT voice until next |
| 90 | * NFS sample interval time as defined in sample_interval. |
| 91 | * |
| 92 | * Unit: msec |
| 93 | * Range: 1-65000 |
| 94 | */ |
| 95 | u16 nfs_sample_interval; |
| 96 | |
| 97 | /* |
| 98 | * Defines the load ratio for the BT. |
| 99 | * The WLAN ratio is: 100 - load_ratio |
| 100 | * |
| 101 | * Unit: Percent |
| 102 | * Range: 0-100 |
| 103 | */ |
| 104 | u8 load_ratio; |
| 105 | |
| 106 | /* |
| 107 | * true - Co-ex is allowed to enter/exit P.S automatically and |
| 108 | * transparently to the host |
| 109 | * |
| 110 | * false - Co-ex is disallowed to enter/exit P.S and will trigger an |
| 111 | * event to the host to notify for the need to enter/exit P.S |
| 112 | * due to BT change state |
| 113 | * |
| 114 | */ |
| 115 | u8 auto_ps_mode; |
| 116 | |
| 117 | /* |
| 118 | * This parameter defines the compensation percentage of num of probe |
| 119 | * requests in case scan is initiated during BT voice/BT ACL |
| 120 | * guaranteed link. |
| 121 | * |
| 122 | * Unit: Percent |
| 123 | * Range: 0-255 (0 - No compensation) |
| 124 | */ |
| 125 | u8 probe_req_compensation; |
| 126 | |
| 127 | /* |
| 128 | * This parameter defines the compensation percentage of scan window |
| 129 | * size in case scan is initiated during BT voice/BT ACL Guaranteed |
| 130 | * link. |
| 131 | * |
| 132 | * Unit: Percent |
| 133 | * Range: 0-255 (0 - No compensation) |
| 134 | */ |
| 135 | u8 scan_window_compensation; |
| 136 | |
| 137 | /* |
| 138 | * Defines the antenna configuration. |
| 139 | * |
| 140 | * Range: 0 - Single Antenna; 1 - Dual Antenna |
| 141 | */ |
| 142 | u8 antenna_config; |
| 143 | |
| 144 | /* |
| 145 | * The percent out of the Max consecutive beacon miss roaming trigger |
| 146 | * which is the threshold for raising the priority of beacon |
| 147 | * reception. |
| 148 | * |
| 149 | * Range: 1-100 |
| 150 | * N = MaxConsecutiveBeaconMiss |
| 151 | * P = coexMaxConsecutiveBeaconMissPrecent |
| 152 | * Threshold = MIN( N-1, round(N * P / 100)) |
| 153 | */ |
| 154 | u8 beacon_miss_threshold; |
| 155 | |
| 156 | /* |
| 157 | * The RX rate threshold below which rate adaptation is assumed to be |
| 158 | * occurring at the AP which will raise priority for ACTIVE_RX and RX |
| 159 | * SP. |
| 160 | * |
| 161 | * Range: HW_BIT_RATE_* |
| 162 | */ |
| 163 | u32 rate_adaptation_threshold; |
| 164 | |
| 165 | /* |
| 166 | * The SNR above which the RX rate threshold indicating AP rate |
| 167 | * adaptation is valid |
| 168 | * |
| 169 | * Range: -128 - 127 |
| 170 | */ |
| 171 | s8 rate_adaptation_snr; |
| 172 | }; |
| 173 | |
Juuso Oikarinen | 8793f9b | 2009-10-13 12:47:40 +0300 | [diff] [blame^] | 174 | enum conf_rx_queue_type { |
| 175 | CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */ |
| 176 | CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */ |
| 177 | }; |
| 178 | |
| 179 | struct conf_rx_settings { |
| 180 | /* |
| 181 | * The maximum amount of time, in TU, before the |
| 182 | * firmware discards the MSDU. |
| 183 | * |
| 184 | * Range: 0 - 0xFFFFFFFF |
| 185 | */ |
| 186 | u32 rx_msdu_life_time; |
| 187 | |
| 188 | /* |
| 189 | * Packet detection threshold in the PHY. |
| 190 | * |
| 191 | * FIXME: details unknown. |
| 192 | */ |
| 193 | u32 packet_detection_threshold; |
| 194 | |
| 195 | /* |
| 196 | * The longest time the STA will wait to receive traffic from the AP |
| 197 | * after a PS-poll has been transmitted. |
| 198 | * |
| 199 | * Range: 0 - 200000 |
| 200 | */ |
| 201 | u16 ps_poll_timeout; |
| 202 | /* |
| 203 | * The longest time the STA will wait to receive traffic from the AP |
| 204 | * after a frame has been sent from an UPSD enabled queue. |
| 205 | * |
| 206 | * Range: 0 - 200000 |
| 207 | */ |
| 208 | u16 upsd_timeout; |
| 209 | |
| 210 | /* |
| 211 | * The number of octets in an MPDU, below which an RTS/CTS |
| 212 | * handshake is not performed. |
| 213 | * |
| 214 | * Range: 0 - 4096 |
| 215 | */ |
| 216 | u16 rts_threshold; |
| 217 | |
| 218 | /* |
| 219 | * The RX Clear Channel Assessment threshold in the PHY |
| 220 | * (the energy threshold). |
| 221 | * |
| 222 | * Range: ENABLE_ENERGY_D == 0x140A |
| 223 | * DISABLE_ENERGY_D == 0xFFEF |
| 224 | */ |
| 225 | u16 rx_cca_threshold; |
| 226 | |
| 227 | /* |
| 228 | * Occupied Rx mem-blocks number which requires interrupting the host |
| 229 | * (0 = no buffering, 0xffff = disabled). |
| 230 | * |
| 231 | * Range: u16 |
| 232 | */ |
| 233 | u16 irq_blk_threshold; |
| 234 | |
| 235 | /* |
| 236 | * Rx packets number which requires interrupting the host |
| 237 | * (0 = no buffering). |
| 238 | * |
| 239 | * Range: u16 |
| 240 | */ |
| 241 | u16 irq_pkt_threshold; |
| 242 | |
| 243 | /* |
| 244 | * Max time in msec the FW may delay RX-Complete interrupt. |
| 245 | * |
| 246 | * Range: 1 - 100 |
| 247 | */ |
| 248 | u16 irq_timeout; |
| 249 | |
| 250 | /* |
| 251 | * The RX queue type. |
| 252 | * |
| 253 | * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY, |
| 254 | */ |
| 255 | u8 queue_type; |
| 256 | }; |
| 257 | |
Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 258 | struct conf_drv_settings { |
| 259 | struct conf_sg_settings sg; |
Juuso Oikarinen | 8793f9b | 2009-10-13 12:47:40 +0300 | [diff] [blame^] | 260 | struct conf_rx_settings rx; |
Juuso Oikarinen | 2b60100b | 2009-10-13 12:47:39 +0300 | [diff] [blame] | 261 | }; |
| 262 | |
| 263 | #endif |