wl1271_conf.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919
  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. #ifndef __WL1271_CONF_H__
  24. #define __WL1271_CONF_H__
  25. enum {
  26. CONF_HW_BIT_RATE_1MBPS = BIT(0),
  27. CONF_HW_BIT_RATE_2MBPS = BIT(1),
  28. CONF_HW_BIT_RATE_5_5MBPS = BIT(2),
  29. CONF_HW_BIT_RATE_6MBPS = BIT(3),
  30. CONF_HW_BIT_RATE_9MBPS = BIT(4),
  31. CONF_HW_BIT_RATE_11MBPS = BIT(5),
  32. CONF_HW_BIT_RATE_12MBPS = BIT(6),
  33. CONF_HW_BIT_RATE_18MBPS = BIT(7),
  34. CONF_HW_BIT_RATE_22MBPS = BIT(8),
  35. CONF_HW_BIT_RATE_24MBPS = BIT(9),
  36. CONF_HW_BIT_RATE_36MBPS = BIT(10),
  37. CONF_HW_BIT_RATE_48MBPS = BIT(11),
  38. CONF_HW_BIT_RATE_54MBPS = BIT(12),
  39. CONF_HW_BIT_RATE_MCS_0 = BIT(13),
  40. CONF_HW_BIT_RATE_MCS_1 = BIT(14),
  41. CONF_HW_BIT_RATE_MCS_2 = BIT(15),
  42. CONF_HW_BIT_RATE_MCS_3 = BIT(16),
  43. CONF_HW_BIT_RATE_MCS_4 = BIT(17),
  44. CONF_HW_BIT_RATE_MCS_5 = BIT(18),
  45. CONF_HW_BIT_RATE_MCS_6 = BIT(19),
  46. CONF_HW_BIT_RATE_MCS_7 = BIT(20)
  47. };
  48. enum {
  49. CONF_HW_RATE_INDEX_1MBPS = 0,
  50. CONF_HW_RATE_INDEX_2MBPS = 1,
  51. CONF_HW_RATE_INDEX_5_5MBPS = 2,
  52. CONF_HW_RATE_INDEX_6MBPS = 3,
  53. CONF_HW_RATE_INDEX_9MBPS = 4,
  54. CONF_HW_RATE_INDEX_11MBPS = 5,
  55. CONF_HW_RATE_INDEX_12MBPS = 6,
  56. CONF_HW_RATE_INDEX_18MBPS = 7,
  57. CONF_HW_RATE_INDEX_22MBPS = 8,
  58. CONF_HW_RATE_INDEX_24MBPS = 9,
  59. CONF_HW_RATE_INDEX_36MBPS = 10,
  60. CONF_HW_RATE_INDEX_48MBPS = 11,
  61. CONF_HW_RATE_INDEX_54MBPS = 12,
  62. CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_54MBPS,
  63. };
  64. struct conf_sg_settings {
  65. /*
  66. * Defines the PER threshold in PPM of the BT voice of which reaching
  67. * this value will trigger raising the priority of the BT voice by
  68. * the BT IP until next NFS sample interval time as defined in
  69. * nfs_sample_interval.
  70. *
  71. * Unit: PER value in PPM (parts per million)
  72. * #Error_packets / #Total_packets
  73. * Range: u32
  74. */
  75. u32 per_threshold;
  76. /*
  77. * This value is an absolute time in micro-seconds to limit the
  78. * maximum scan duration compensation while in SG
  79. */
  80. u32 max_scan_compensation_time;
  81. /* Defines the PER threshold of the BT voice of which reaching this
  82. * value will trigger raising the priority of the BT voice until next
  83. * NFS sample interval time as defined in sample_interval.
  84. *
  85. * Unit: msec
  86. * Range: 1-65000
  87. */
  88. u16 nfs_sample_interval;
  89. /*
  90. * Defines the load ratio for the BT.
  91. * The WLAN ratio is: 100 - load_ratio
  92. *
  93. * Unit: Percent
  94. * Range: 0-100
  95. */
  96. u8 load_ratio;
  97. /*
  98. * true - Co-ex is allowed to enter/exit P.S automatically and
  99. * transparently to the host
  100. *
  101. * false - Co-ex is disallowed to enter/exit P.S and will trigger an
  102. * event to the host to notify for the need to enter/exit P.S
  103. * due to BT change state
  104. *
  105. */
  106. u8 auto_ps_mode;
  107. /*
  108. * This parameter defines the compensation percentage of num of probe
  109. * requests in case scan is initiated during BT voice/BT ACL
  110. * guaranteed link.
  111. *
  112. * Unit: Percent
  113. * Range: 0-255 (0 - No compensation)
  114. */
  115. u8 probe_req_compensation;
  116. /*
  117. * This parameter defines the compensation percentage of scan window
  118. * size in case scan is initiated during BT voice/BT ACL Guaranteed
  119. * link.
  120. *
  121. * Unit: Percent
  122. * Range: 0-255 (0 - No compensation)
  123. */
  124. u8 scan_window_compensation;
  125. /*
  126. * Defines the antenna configuration.
  127. *
  128. * Range: 0 - Single Antenna; 1 - Dual Antenna
  129. */
  130. u8 antenna_config;
  131. /*
  132. * The percent out of the Max consecutive beacon miss roaming trigger
  133. * which is the threshold for raising the priority of beacon
  134. * reception.
  135. *
  136. * Range: 1-100
  137. * N = MaxConsecutiveBeaconMiss
  138. * P = coexMaxConsecutiveBeaconMissPrecent
  139. * Threshold = MIN( N-1, round(N * P / 100))
  140. */
  141. u8 beacon_miss_threshold;
  142. /*
  143. * The RX rate threshold below which rate adaptation is assumed to be
  144. * occurring at the AP which will raise priority for ACTIVE_RX and RX
  145. * SP.
  146. *
  147. * Range: HW_BIT_RATE_*
  148. */
  149. u32 rate_adaptation_threshold;
  150. /*
  151. * The SNR above which the RX rate threshold indicating AP rate
  152. * adaptation is valid
  153. *
  154. * Range: -128 - 127
  155. */
  156. s8 rate_adaptation_snr;
  157. };
  158. enum conf_rx_queue_type {
  159. CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
  160. CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
  161. };
  162. struct conf_rx_settings {
  163. /*
  164. * The maximum amount of time, in TU, before the
  165. * firmware discards the MSDU.
  166. *
  167. * Range: 0 - 0xFFFFFFFF
  168. */
  169. u32 rx_msdu_life_time;
  170. /*
  171. * Packet detection threshold in the PHY.
  172. *
  173. * FIXME: details unknown.
  174. */
  175. u32 packet_detection_threshold;
  176. /*
  177. * The longest time the STA will wait to receive traffic from the AP
  178. * after a PS-poll has been transmitted.
  179. *
  180. * Range: 0 - 200000
  181. */
  182. u16 ps_poll_timeout;
  183. /*
  184. * The longest time the STA will wait to receive traffic from the AP
  185. * after a frame has been sent from an UPSD enabled queue.
  186. *
  187. * Range: 0 - 200000
  188. */
  189. u16 upsd_timeout;
  190. /*
  191. * The number of octets in an MPDU, below which an RTS/CTS
  192. * handshake is not performed.
  193. *
  194. * Range: 0 - 4096
  195. */
  196. u16 rts_threshold;
  197. /*
  198. * The RX Clear Channel Assessment threshold in the PHY
  199. * (the energy threshold).
  200. *
  201. * Range: ENABLE_ENERGY_D == 0x140A
  202. * DISABLE_ENERGY_D == 0xFFEF
  203. */
  204. u16 rx_cca_threshold;
  205. /*
  206. * Occupied Rx mem-blocks number which requires interrupting the host
  207. * (0 = no buffering, 0xffff = disabled).
  208. *
  209. * Range: u16
  210. */
  211. u16 irq_blk_threshold;
  212. /*
  213. * Rx packets number which requires interrupting the host
  214. * (0 = no buffering).
  215. *
  216. * Range: u16
  217. */
  218. u16 irq_pkt_threshold;
  219. /*
  220. * Max time in msec the FW may delay RX-Complete interrupt.
  221. *
  222. * Range: 1 - 100
  223. */
  224. u16 irq_timeout;
  225. /*
  226. * The RX queue type.
  227. *
  228. * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
  229. */
  230. u8 queue_type;
  231. };
  232. #define CONF_TX_MAX_RATE_CLASSES 8
  233. #define CONF_TX_RATE_MASK_UNSPECIFIED 0
  234. #define CONF_TX_RATE_MASK_ALL 0x1eff
  235. #define CONF_TX_RATE_RETRY_LIMIT 10
  236. struct conf_tx_rate_class {
  237. /*
  238. * The rates enabled for this rate class.
  239. *
  240. * Range: CONF_HW_BIT_RATE_* bit mask
  241. */
  242. u32 enabled_rates;
  243. /*
  244. * The dot11 short retry limit used for TX retries.
  245. *
  246. * Range: u8
  247. */
  248. u8 short_retry_limit;
  249. /*
  250. * The dot11 long retry limit used for TX retries.
  251. *
  252. * Range: u8
  253. */
  254. u8 long_retry_limit;
  255. /*
  256. * Flags controlling the attributes of TX transmission.
  257. *
  258. * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
  259. * when the total valid per-rate attempts have
  260. * been exhausted; otherwise transmissions
  261. * will continue at the lowest available rate
  262. * until the appropriate one of the
  263. * short_retry_limit, long_retry_limit,
  264. * dot11_max_transmit_msdu_life_time, or
  265. * max_tx_life_time, is exhausted.
  266. * 1: Preamble Override - indicates if the preamble type
  267. * should be used in TX.
  268. * 2: Preamble Type - the type of the preamble to be used by
  269. * the policy (0 - long preamble, 1 - short preamble.
  270. */
  271. u8 aflags;
  272. };
  273. #define CONF_TX_MAX_AC_COUNT 4
  274. /* Slot number setting to start transmission at PIFS interval */
  275. #define CONF_TX_AIFS_PIFS 1
  276. /* Slot number setting to start transmission at DIFS interval normal
  277. * DCF access */
  278. #define CONF_TX_AIFS_DIFS 2
  279. enum conf_tx_ac {
  280. CONF_TX_AC_BE = 0, /* best effort / legacy */
  281. CONF_TX_AC_BK = 1, /* background */
  282. CONF_TX_AC_VI = 2, /* video */
  283. CONF_TX_AC_VO = 3, /* voice */
  284. CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */
  285. CONF_TX_AC_ANY_TID = 0x1f
  286. };
  287. struct conf_tx_ac_category {
  288. /*
  289. * The AC class identifier.
  290. *
  291. * Range: enum conf_tx_ac
  292. */
  293. u8 ac;
  294. /*
  295. * The contention window minimum size (in slots) for the access
  296. * class.
  297. *
  298. * Range: u8
  299. */
  300. u8 cw_min;
  301. /*
  302. * The contention window maximum size (in slots) for the access
  303. * class.
  304. *
  305. * Range: u8
  306. */
  307. u16 cw_max;
  308. /*
  309. * The AIF value (in slots) for the access class.
  310. *
  311. * Range: u8
  312. */
  313. u8 aifsn;
  314. /*
  315. * The TX Op Limit (in microseconds) for the access class.
  316. *
  317. * Range: u16
  318. */
  319. u16 tx_op_limit;
  320. };
  321. #define CONF_TX_MAX_TID_COUNT 7
  322. enum {
  323. CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
  324. CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
  325. CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
  326. };
  327. enum {
  328. CONF_PS_SCHEME_LEGACY = 0,
  329. CONF_PS_SCHEME_UPSD_TRIGGER = 1,
  330. CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
  331. CONF_PS_SCHEME_SAPSD = 3,
  332. };
  333. enum {
  334. CONF_ACK_POLICY_LEGACY = 0,
  335. CONF_ACK_POLICY_NO_ACK = 1,
  336. CONF_ACK_POLICY_BLOCK = 2,
  337. };
  338. struct conf_tx_tid {
  339. u8 queue_id;
  340. u8 channel_type;
  341. u8 tsid;
  342. u8 ps_scheme;
  343. u8 ack_policy;
  344. u32 apsd_conf[2];
  345. };
  346. struct conf_tx_settings {
  347. /*
  348. * The TX ED value for TELEC Enable/Disable.
  349. *
  350. * Range: 0, 1
  351. */
  352. u8 tx_energy_detection;
  353. /*
  354. * Configuration for rate classes for TX (currently only one
  355. * rate class supported.)
  356. */
  357. struct conf_tx_rate_class rc_conf;
  358. /*
  359. * Configuration for access categories for TX rate control.
  360. */
  361. u8 ac_conf_count;
  362. struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
  363. /*
  364. * Configuration for TID parameters.
  365. */
  366. u8 tid_conf_count;
  367. struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
  368. /*
  369. * The TX fragmentation threshold.
  370. *
  371. * Range: u16
  372. */
  373. u16 frag_threshold;
  374. /*
  375. * Max time in msec the FW may delay frame TX-Complete interrupt.
  376. *
  377. * Range: u16
  378. */
  379. u16 tx_compl_timeout;
  380. /*
  381. * Completed TX packet count which requires to issue the TX-Complete
  382. * interrupt.
  383. *
  384. * Range: u16
  385. */
  386. u16 tx_compl_threshold;
  387. };
  388. enum {
  389. CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
  390. CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
  391. CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
  392. CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
  393. CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
  394. };
  395. #define CONF_MAX_BCN_FILT_IE_COUNT 32
  396. #define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
  397. #define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
  398. #define CONF_BCN_IE_OUI_LEN 3
  399. #define CONF_BCN_IE_VER_LEN 2
  400. struct conf_bcn_filt_rule {
  401. /*
  402. * IE number to which to associate a rule.
  403. *
  404. * Range: u8
  405. */
  406. u8 ie;
  407. /*
  408. * Rule to associate with the specific ie.
  409. *
  410. * Range: CONF_BCN_RULE_PASS_ON_*
  411. */
  412. u8 rule;
  413. /*
  414. * OUI for the vendor specifie IE (221)
  415. */
  416. u8 oui[CONF_BCN_IE_OUI_LEN];
  417. /*
  418. * Type for the vendor specifie IE (221)
  419. */
  420. u8 type;
  421. /*
  422. * Version for the vendor specifie IE (221)
  423. */
  424. u8 version[CONF_BCN_IE_VER_LEN];
  425. };
  426. #define CONF_MAX_RSSI_SNR_TRIGGERS 8
  427. enum {
  428. CONF_TRIG_METRIC_RSSI_BEACON = 0,
  429. CONF_TRIG_METRIC_RSSI_DATA,
  430. CONF_TRIG_METRIC_SNR_BEACON,
  431. CONF_TRIG_METRIC_SNR_DATA
  432. };
  433. enum {
  434. CONF_TRIG_EVENT_TYPE_LEVEL = 0,
  435. CONF_TRIG_EVENT_TYPE_EDGE
  436. };
  437. enum {
  438. CONF_TRIG_EVENT_DIR_LOW = 0,
  439. CONF_TRIG_EVENT_DIR_HIGH,
  440. CONF_TRIG_EVENT_DIR_BIDIR
  441. };
  442. struct conf_sig_trigger {
  443. /*
  444. * The RSSI / SNR threshold value.
  445. *
  446. * FIXME: what is the range?
  447. */
  448. s16 threshold;
  449. /*
  450. * Minimum delay between two trigger events for this trigger in ms.
  451. *
  452. * Range: 0 - 60000
  453. */
  454. u16 pacing;
  455. /*
  456. * The measurement data source for this trigger.
  457. *
  458. * Range: CONF_TRIG_METRIC_*
  459. */
  460. u8 metric;
  461. /*
  462. * The trigger type of this trigger.
  463. *
  464. * Range: CONF_TRIG_EVENT_TYPE_*
  465. */
  466. u8 type;
  467. /*
  468. * The direction of the trigger.
  469. *
  470. * Range: CONF_TRIG_EVENT_DIR_*
  471. */
  472. u8 direction;
  473. /*
  474. * Hysteresis range of the trigger around the threshold (in dB)
  475. *
  476. * Range: u8
  477. */
  478. u8 hysteresis;
  479. /*
  480. * Index of the trigger rule.
  481. *
  482. * Range: 0 - CONF_MAX_RSSI_SNR_TRIGGERS-1
  483. */
  484. u8 index;
  485. /*
  486. * Enable / disable this rule (to use for clearing rules.)
  487. *
  488. * Range: 1 - Enabled, 2 - Not enabled
  489. */
  490. u8 enable;
  491. };
  492. struct conf_sig_weights {
  493. /*
  494. * RSSI from beacons average weight.
  495. *
  496. * Range: u8
  497. */
  498. u8 rssi_bcn_avg_weight;
  499. /*
  500. * RSSI from data average weight.
  501. *
  502. * Range: u8
  503. */
  504. u8 rssi_pkt_avg_weight;
  505. /*
  506. * SNR from beacons average weight.
  507. *
  508. * Range: u8
  509. */
  510. u8 snr_bcn_avg_weight;
  511. /*
  512. * SNR from data average weight.
  513. *
  514. * Range: u8
  515. */
  516. u8 snr_pkt_avg_weight;
  517. };
  518. enum conf_bcn_filt_mode {
  519. CONF_BCN_FILT_MODE_DISABLED = 0,
  520. CONF_BCN_FILT_MODE_ENABLED = 1
  521. };
  522. enum conf_bet_mode {
  523. CONF_BET_MODE_DISABLE = 0,
  524. CONF_BET_MODE_ENABLE = 1,
  525. };
  526. struct conf_conn_settings {
  527. /*
  528. * Firmware wakeup conditions configuration. The host may set only
  529. * one bit.
  530. *
  531. * Range: CONF_WAKE_UP_EVENT_*
  532. */
  533. u8 wake_up_event;
  534. /*
  535. * Listen interval for beacons or Dtims.
  536. *
  537. * Range: 0 for beacon and Dtim wakeup
  538. * 1-10 for x Dtims
  539. * 1-255 for x beacons
  540. */
  541. u8 listen_interval;
  542. /*
  543. * Enable or disable the beacon filtering.
  544. *
  545. * Range: CONF_BCN_FILT_MODE_*
  546. */
  547. enum conf_bcn_filt_mode bcn_filt_mode;
  548. /*
  549. * Configure Beacon filter pass-thru rules.
  550. */
  551. u8 bcn_filt_ie_count;
  552. struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
  553. /*
  554. * The number of consequtive beacons to lose, before the firmware
  555. * becomes out of synch.
  556. *
  557. * Range: u32
  558. */
  559. u32 synch_fail_thold;
  560. /*
  561. * After out-of-synch, the number of TU's to wait without a further
  562. * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
  563. * event.
  564. *
  565. * Range: u32
  566. */
  567. u32 bss_lose_timeout;
  568. /*
  569. * Beacon receive timeout.
  570. *
  571. * Range: u32
  572. */
  573. u32 beacon_rx_timeout;
  574. /*
  575. * Broadcast receive timeout.
  576. *
  577. * Range: u32
  578. */
  579. u32 broadcast_timeout;
  580. /*
  581. * Enable/disable reception of broadcast packets in power save mode
  582. *
  583. * Range: 1 - enable, 0 - disable
  584. */
  585. u8 rx_broadcast_in_ps;
  586. /*
  587. * Consequtive PS Poll failures before sending event to driver
  588. *
  589. * Range: u8
  590. */
  591. u8 ps_poll_threshold;
  592. /*
  593. * Configuration of signal (rssi/snr) triggers.
  594. */
  595. u8 sig_trigger_count;
  596. struct conf_sig_trigger sig_trigger[CONF_MAX_RSSI_SNR_TRIGGERS];
  597. /*
  598. * Configuration of signal average weights.
  599. */
  600. struct conf_sig_weights sig_weights;
  601. /*
  602. * Specifies if beacon early termination procedure is enabled or
  603. * disabled.
  604. *
  605. * Range: CONF_BET_MODE_*
  606. */
  607. u8 bet_enable;
  608. /*
  609. * Specifies the maximum number of consecutive beacons that may be
  610. * early terminated. After this number is reached at least one full
  611. * beacon must be correctly received in FW before beacon ET
  612. * resumes.
  613. *
  614. * Range 0 - 255
  615. */
  616. u8 bet_max_consecutive;
  617. /*
  618. * Specifies the maximum number of times to try PSM entry if it fails
  619. * (if sending the appropriate null-func message fails.)
  620. *
  621. * Range 0 - 255
  622. */
  623. u8 psm_entry_retries;
  624. };
  625. #define CONF_SR_ERR_TBL_MAX_VALUES 14
  626. struct conf_mart_reflex_err_table {
  627. /*
  628. * Length of the error table values table.
  629. *
  630. * Range: 0 - CONF_SR_ERR_TBL_MAX_VALUES
  631. */
  632. u8 len;
  633. /*
  634. * Smart Reflex error table upper limit.
  635. *
  636. * Range: s8
  637. */
  638. s8 upper_limit;
  639. /*
  640. * Smart Reflex error table values.
  641. *
  642. * Range: s8
  643. */
  644. s8 values[CONF_SR_ERR_TBL_MAX_VALUES];
  645. };
  646. enum {
  647. CONF_REF_CLK_19_2_E,
  648. CONF_REF_CLK_26_E,
  649. CONF_REF_CLK_38_4_E,
  650. CONF_REF_CLK_52_E
  651. };
  652. enum single_dual_band_enum {
  653. CONF_SINGLE_BAND,
  654. CONF_DUAL_BAND
  655. };
  656. struct conf_general_parms {
  657. /*
  658. * RF Reference Clock type / speed
  659. *
  660. * Range: CONF_REF_CLK_*
  661. */
  662. u8 ref_clk;
  663. /*
  664. * Settling time of the reference clock after boot.
  665. *
  666. * Range: u8
  667. */
  668. u8 settling_time;
  669. /*
  670. * Flag defining whether clock is valid on wakeup.
  671. *
  672. * Range: 0 - not valid on wakeup, 1 - valid on wakeup
  673. */
  674. u8 clk_valid_on_wakeup;
  675. /*
  676. * DC-to-DC mode.
  677. *
  678. * Range: Unknown
  679. */
  680. u8 dc2dcmode;
  681. /*
  682. * Flag defining whether used as single or dual-band.
  683. *
  684. * Range: CONF_SINGLE_BAND, CONF_DUAL_BAND
  685. */
  686. u8 single_dual_band;
  687. /*
  688. * TX bip fem autodetect flag.
  689. *
  690. * Range: Unknown
  691. */
  692. u8 tx_bip_fem_autodetect;
  693. /*
  694. * TX bip gem manufacturer.
  695. *
  696. * Range: Unknown
  697. */
  698. u8 tx_bip_fem_manufacturer;
  699. /*
  700. * Settings flags.
  701. *
  702. * Range: Unknown
  703. */
  704. u8 settings;
  705. };
  706. #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
  707. #define CONF_NUMBER_OF_SUB_BANDS_5 7
  708. #define CONF_NUMBER_OF_RATE_GROUPS 6
  709. #define CONF_NUMBER_OF_CHANNELS_2_4 14
  710. #define CONF_NUMBER_OF_CHANNELS_5 35
  711. struct conf_radio_parms {
  712. /*
  713. * Static radio parameters for 2.4GHz
  714. *
  715. * Range: unknown
  716. */
  717. u8 rx_trace_loss;
  718. u8 tx_trace_loss;
  719. s8 rx_rssi_and_proc_compens[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
  720. /*
  721. * Static radio parameters for 5GHz
  722. *
  723. * Range: unknown
  724. */
  725. u8 rx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
  726. u8 tx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
  727. s8 rx_rssi_and_proc_compens_5[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
  728. /*
  729. * Dynamic radio parameters for 2.4GHz
  730. *
  731. * Range: unknown
  732. */
  733. s16 tx_ref_pd_voltage;
  734. s8 tx_ref_power;
  735. s8 tx_offset_db;
  736. s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS];
  737. s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS];
  738. s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4];
  739. s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4];
  740. s8 tx_pdv_rate_offsets[CONF_NUMBER_OF_RATE_GROUPS];
  741. u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS];
  742. u8 rx_fem_insertion_loss;
  743. /*
  744. * Dynamic radio parameters for 5GHz
  745. *
  746. * Range: unknown
  747. */
  748. s16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
  749. s8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
  750. s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];
  751. s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS];
  752. s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS];
  753. s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5];
  754. s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS];
  755. /* FIXME: this is inconsistent with the types for 2.4GHz */
  756. s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS];
  757. s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
  758. };
  759. #define CONF_SR_ERR_TBL_COUNT 3
  760. struct conf_init_settings {
  761. /*
  762. * Configure Smart Reflex error table values.
  763. */
  764. struct conf_mart_reflex_err_table sr_err_tbl[CONF_SR_ERR_TBL_COUNT];
  765. /*
  766. * Smart Reflex enable flag.
  767. *
  768. * Range: 1 - Smart Reflex enabled, 0 - Smart Reflex disabled
  769. */
  770. u8 sr_enable;
  771. /*
  772. * Configure general parameters.
  773. */
  774. struct conf_general_parms genparam;
  775. /*
  776. * Configure radio parameters.
  777. */
  778. struct conf_radio_parms radioparam;
  779. };
  780. struct conf_drv_settings {
  781. struct conf_sg_settings sg;
  782. struct conf_rx_settings rx;
  783. struct conf_tx_settings tx;
  784. struct conf_conn_settings conn;
  785. struct conf_init_settings init;
  786. };
  787. #endif