2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 #include "phytbl_lcn.h"
20 const u32 dot11lcn_gain_tbl_rev0[] = {
119 const u32 dot11lcn_gain_tbl_rev1[] = {
218 const u16 dot11lcn_aux_gain_idx_tbl_rev0[] = {
259 const u32 dot11lcn_gain_idx_tbl_rev0[] = {
410 const u16 dot11lcn_aux_gain_idx_tbl_2G[] = {
451 const u8 dot11lcn_gain_val_tbl_2G[] = {
522 const u32 dot11lcn_gain_idx_tbl_2G[] = {
677 const u32 dot11lcn_gain_tbl_2G[] = {
776 const u32 dot11lcn_gain_tbl_extlna_2G[] = {
875 const u16 dot11lcn_aux_gain_idx_tbl_extlna_2G[] = {
916 const u8 dot11lcn_gain_val_tbl_extlna_2G[] = {
987 const u32 dot11lcn_gain_idx_tbl_extlna_2G[] = {
1142 const u32 dot11lcn_aux_gain_idx_tbl_5G[] = {
1183 const u32 dot11lcn_gain_val_tbl_5G[] = {
1254 const u32 dot11lcn_gain_idx_tbl_5G[] = {
1409 const u32 dot11lcn_gain_tbl_5G[] = {
1508 const struct phytbl_info dot11lcnphytbl_rx_gain_info_rev0[] = {
1509 {&dot11lcn_gain_tbl_rev0,
1510 sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18,
1513 {&dot11lcn_aux_gain_idx_tbl_rev0,
1514 sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
1515 sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
1517 {&dot11lcn_gain_idx_tbl_rev0,
1518 sizeof(dot11lcn_gain_idx_tbl_rev0) /
1519 sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
1523 const struct phytbl_info dot11lcnphytbl_rx_gain_info_rev1[] = {
1524 {&dot11lcn_gain_tbl_rev1,
1525 sizeof(dot11lcn_gain_tbl_rev1) / sizeof(dot11lcn_gain_tbl_rev1[0]), 18,
1528 {&dot11lcn_aux_gain_idx_tbl_rev0,
1529 sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
1530 sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
1532 {&dot11lcn_gain_idx_tbl_rev0,
1533 sizeof(dot11lcn_gain_idx_tbl_rev0) /
1534 sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
1538 const struct phytbl_info dot11lcnphytbl_rx_gain_info_2G_rev2[] = {
1539 {&dot11lcn_gain_tbl_2G,
1540 sizeof(dot11lcn_gain_tbl_2G) / sizeof(dot11lcn_gain_tbl_2G[0]), 18, 0,
1543 {&dot11lcn_aux_gain_idx_tbl_2G,
1544 sizeof(dot11lcn_aux_gain_idx_tbl_2G) /
1545 sizeof(dot11lcn_aux_gain_idx_tbl_2G[0]), 14, 0, 16}
1547 {&dot11lcn_gain_idx_tbl_2G,
1548 sizeof(dot11lcn_gain_idx_tbl_2G) / sizeof(dot11lcn_gain_idx_tbl_2G[0]),
1551 {&dot11lcn_gain_val_tbl_2G,
1552 sizeof(dot11lcn_gain_val_tbl_2G) / sizeof(dot11lcn_gain_val_tbl_2G[0]),
1556 const struct phytbl_info dot11lcnphytbl_rx_gain_info_5G_rev2[] = {
1557 {&dot11lcn_gain_tbl_5G,
1558 sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
1561 {&dot11lcn_aux_gain_idx_tbl_5G,
1562 sizeof(dot11lcn_aux_gain_idx_tbl_5G) /
1563 sizeof(dot11lcn_aux_gain_idx_tbl_5G[0]), 14, 0, 16}
1565 {&dot11lcn_gain_idx_tbl_5G,
1566 sizeof(dot11lcn_gain_idx_tbl_5G) / sizeof(dot11lcn_gain_idx_tbl_5G[0]),
1569 {&dot11lcn_gain_val_tbl_5G,
1570 sizeof(dot11lcn_gain_val_tbl_5G) / sizeof(dot11lcn_gain_val_tbl_5G[0]),
1574 const struct phytbl_info dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[] = {
1575 {&dot11lcn_gain_tbl_extlna_2G,
1576 sizeof(dot11lcn_gain_tbl_extlna_2G) /
1577 sizeof(dot11lcn_gain_tbl_extlna_2G[0]), 18, 0, 32}
1579 {&dot11lcn_aux_gain_idx_tbl_extlna_2G,
1580 sizeof(dot11lcn_aux_gain_idx_tbl_extlna_2G) /
1581 sizeof(dot11lcn_aux_gain_idx_tbl_extlna_2G[0]), 14, 0, 16}
1583 {&dot11lcn_gain_idx_tbl_extlna_2G,
1584 sizeof(dot11lcn_gain_idx_tbl_extlna_2G) /
1585 sizeof(dot11lcn_gain_idx_tbl_extlna_2G[0]), 13, 0, 32}
1587 {&dot11lcn_gain_val_tbl_extlna_2G,
1588 sizeof(dot11lcn_gain_val_tbl_extlna_2G) /
1589 sizeof(dot11lcn_gain_val_tbl_extlna_2G[0]), 17, 0, 8}
1592 const struct phytbl_info dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[] = {
1593 {&dot11lcn_gain_tbl_5G,
1594 sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
1597 {&dot11lcn_aux_gain_idx_tbl_5G,
1598 sizeof(dot11lcn_aux_gain_idx_tbl_5G) /
1599 sizeof(dot11lcn_aux_gain_idx_tbl_5G[0]), 14, 0, 16}
1601 {&dot11lcn_gain_idx_tbl_5G,
1602 sizeof(dot11lcn_gain_idx_tbl_5G) / sizeof(dot11lcn_gain_idx_tbl_5G[0]),
1605 {&dot11lcn_gain_val_tbl_5G,
1606 sizeof(dot11lcn_gain_val_tbl_5G) / sizeof(dot11lcn_gain_val_tbl_5G[0]),
1610 const u32 dot11lcnphytbl_rx_gain_info_sz_rev0 =
1611 sizeof(dot11lcnphytbl_rx_gain_info_rev0) /
1612 sizeof(dot11lcnphytbl_rx_gain_info_rev0[0]);
1614 const u32 dot11lcnphytbl_rx_gain_info_sz_rev1 =
1615 sizeof(dot11lcnphytbl_rx_gain_info_rev1) /
1616 sizeof(dot11lcnphytbl_rx_gain_info_rev1[0]);
1618 const u32 dot11lcnphytbl_rx_gain_info_2G_rev2_sz =
1619 sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2) /
1620 sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2[0]);
1622 const u32 dot11lcnphytbl_rx_gain_info_5G_rev2_sz =
1623 sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2) /
1624 sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2[0]);
1626 const u16 dot11lcn_min_sig_sq_tbl_rev0[] = {
1693 const u16 dot11lcn_noise_scale_tbl_rev0[] = {
1760 const u32 dot11lcn_fltr_ctrl_tbl_rev0[] = {
1773 const u32 dot11lcn_ps_ctrl_tbl_rev0[] = {
1796 const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[] = {
1864 const u16 dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[] = {
1931 const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0[] = {
1998 const u16 dot11lcn_sw_ctrl_tbl_4313_rev0[] = {
2065 const u16 dot11lcn_sw_ctrl_tbl_rev0[] = {
2132 const u8 dot11lcn_nf_table_rev0[] = {
2151 const u8 dot11lcn_gain_val_tbl_rev0[] = {
2214 const u8 dot11lcn_spur_tbl_rev0[] = {
2345 const u16 dot11lcn_unsup_mcs_tbl_rev0[] = {
2502 const u16 dot11lcn_iq_local_tbl_rev0[] = {
2613 const u32 dot11lcn_papd_compdelta_tbl_rev0[] = {
2776 const struct phytbl_info dot11lcnphytbl_info_rev0[] = {
2777 {&dot11lcn_min_sig_sq_tbl_rev0,
2778 sizeof(dot11lcn_min_sig_sq_tbl_rev0) /
2779 sizeof(dot11lcn_min_sig_sq_tbl_rev0[0]), 2, 0, 16}
2781 {&dot11lcn_noise_scale_tbl_rev0,
2782 sizeof(dot11lcn_noise_scale_tbl_rev0) /
2783 sizeof(dot11lcn_noise_scale_tbl_rev0[0]), 1, 0, 16}
2785 {&dot11lcn_fltr_ctrl_tbl_rev0,
2786 sizeof(dot11lcn_fltr_ctrl_tbl_rev0) /
2787 sizeof(dot11lcn_fltr_ctrl_tbl_rev0[0]), 11, 0, 32}
2789 {&dot11lcn_ps_ctrl_tbl_rev0,
2790 sizeof(dot11lcn_ps_ctrl_tbl_rev0) /
2791 sizeof(dot11lcn_ps_ctrl_tbl_rev0[0]), 12, 0, 32}
2793 {&dot11lcn_gain_idx_tbl_rev0,
2794 sizeof(dot11lcn_gain_idx_tbl_rev0) /
2795 sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
2797 {&dot11lcn_aux_gain_idx_tbl_rev0,
2798 sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
2799 sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
2801 {&dot11lcn_sw_ctrl_tbl_rev0,
2802 sizeof(dot11lcn_sw_ctrl_tbl_rev0) /
2803 sizeof(dot11lcn_sw_ctrl_tbl_rev0[0]), 15, 0, 16}
2805 {&dot11lcn_nf_table_rev0,
2806 sizeof(dot11lcn_nf_table_rev0) / sizeof(dot11lcn_nf_table_rev0[0]), 16,
2809 {&dot11lcn_gain_val_tbl_rev0,
2810 sizeof(dot11lcn_gain_val_tbl_rev0) /
2811 sizeof(dot11lcn_gain_val_tbl_rev0[0]), 17, 0, 8}
2813 {&dot11lcn_gain_tbl_rev0,
2814 sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18,
2817 {&dot11lcn_spur_tbl_rev0,
2818 sizeof(dot11lcn_spur_tbl_rev0) / sizeof(dot11lcn_spur_tbl_rev0[0]), 20,
2821 {&dot11lcn_unsup_mcs_tbl_rev0,
2822 sizeof(dot11lcn_unsup_mcs_tbl_rev0) /
2823 sizeof(dot11lcn_unsup_mcs_tbl_rev0[0]), 23, 0, 16}
2825 {&dot11lcn_iq_local_tbl_rev0,
2826 sizeof(dot11lcn_iq_local_tbl_rev0) /
2827 sizeof(dot11lcn_iq_local_tbl_rev0[0]), 0, 0, 16}
2829 {&dot11lcn_papd_compdelta_tbl_rev0,
2830 sizeof(dot11lcn_papd_compdelta_tbl_rev0) /
2831 sizeof(dot11lcn_papd_compdelta_tbl_rev0[0]), 24, 0, 32}
2835 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313 = {
2836 &dot11lcn_sw_ctrl_tbl_4313_rev0,
2837 sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0) /
2838 sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0[0]), 15, 0, 16
2841 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_epa = {
2842 &dot11lcn_sw_ctrl_tbl_4313_epa_rev0,
2843 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0) /
2844 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0[0]), 15, 0, 16
2847 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa = {
2848 &dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo,
2849 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo) /
2850 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[0]), 15, 0, 16
2853 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250 = {
2854 &dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0,
2855 sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0) /
2856 sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[0]), 15, 0, 16
2859 const u32 dot11lcnphytbl_info_sz_rev0 =
2860 sizeof(dot11lcnphytbl_info_rev0) / sizeof(dot11lcnphytbl_info_rev0[0]);
2862 const struct lcnphy_tx_gain_tbl_entry
2863 dot11lcnphy_2GHz_extPA_gaintable_rev0[128] = {
3122 const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[128] = {
3381 const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_5GHz_gaintable_rev0[128] = {
3382 {255, 255, 0xf0, 0, 152,}
3384 {255, 255, 0xf0, 0, 147,}
3386 {255, 255, 0xf0, 0, 143,}
3388 {255, 255, 0xf0, 0, 139,}
3390 {255, 255, 0xf0, 0, 135,}
3392 {255, 255, 0xf0, 0, 131,}
3394 {255, 255, 0xf0, 0, 128,}
3396 {255, 255, 0xf0, 0, 124,}
3398 {255, 255, 0xf0, 0, 121,}
3400 {255, 255, 0xf0, 0, 117,}
3402 {255, 255, 0xf0, 0, 114,}
3404 {255, 255, 0xf0, 0, 111,}
3406 {255, 255, 0xf0, 0, 107,}
3408 {255, 255, 0xf0, 0, 104,}
3410 {255, 255, 0xf0, 0, 101,}
3412 {255, 255, 0xf0, 0, 99,}
3414 {255, 255, 0xf0, 0, 96,}
3416 {255, 255, 0xf0, 0, 93,}
3418 {255, 255, 0xf0, 0, 90,}
3420 {255, 255, 0xf0, 0, 88,}
3422 {255, 255, 0xf0, 0, 85,}
3424 {255, 255, 0xf0, 0, 83,}
3426 {255, 255, 0xf0, 0, 81,}
3428 {255, 255, 0xf0, 0, 78,}
3430 {255, 255, 0xf0, 0, 76,}
3432 {255, 255, 0xf0, 0, 74,}
3434 {255, 255, 0xf0, 0, 72,}
3436 {255, 255, 0xf0, 0, 70,}
3438 {255, 255, 0xf0, 0, 68,}
3440 {255, 255, 0xf0, 0, 66,}
3442 {255, 255, 0xf0, 0, 64,}
3444 {255, 248, 0xf0, 0, 64,}
3446 {255, 241, 0xf0, 0, 64,}
3448 {255, 251, 0xe0, 0, 64,}
3450 {255, 244, 0xe0, 0, 64,}
3452 {255, 254, 0xd0, 0, 64,}
3454 {255, 246, 0xd0, 0, 64,}
3456 {255, 239, 0xd0, 0, 64,}
3458 {255, 249, 0xc0, 0, 64,}
3460 {255, 242, 0xc0, 0, 64,}
3462 {255, 255, 0xb0, 0, 64,}
3464 {255, 248, 0xb0, 0, 64,}
3466 {255, 241, 0xb0, 0, 64,}
3468 {255, 254, 0xa0, 0, 64,}
3470 {255, 246, 0xa0, 0, 64,}
3472 {255, 239, 0xa0, 0, 64,}
3474 {255, 255, 0x90, 0, 64,}
3476 {255, 248, 0x90, 0, 64,}
3478 {255, 241, 0x90, 0, 64,}
3480 {255, 234, 0x90, 0, 64,}
3482 {255, 255, 0x80, 0, 64,}
3484 {255, 248, 0x80, 0, 64,}
3486 {255, 241, 0x80, 0, 64,}
3488 {255, 234, 0x80, 0, 64,}
3490 {255, 255, 0x70, 0, 64,}
3492 {255, 248, 0x70, 0, 64,}
3494 {255, 241, 0x70, 0, 64,}
3496 {255, 234, 0x70, 0, 64,}
3498 {255, 227, 0x70, 0, 64,}
3500 {255, 221, 0x70, 0, 64,}
3502 {255, 215, 0x70, 0, 64,}
3504 {255, 208, 0x70, 0, 64,}
3506 {255, 203, 0x70, 0, 64,}
3508 {255, 197, 0x70, 0, 64,}
3510 {255, 255, 0x60, 0, 64,}
3512 {255, 248, 0x60, 0, 64,}
3514 {255, 241, 0x60, 0, 64,}
3516 {255, 234, 0x60, 0, 64,}
3518 {255, 227, 0x60, 0, 64,}
3520 {255, 221, 0x60, 0, 64,}
3522 {255, 255, 0x50, 0, 64,}
3524 {255, 248, 0x50, 0, 64,}
3526 {255, 241, 0x50, 0, 64,}
3528 {255, 234, 0x50, 0, 64,}
3530 {255, 227, 0x50, 0, 64,}
3532 {255, 221, 0x50, 0, 64,}
3534 {255, 215, 0x50, 0, 64,}
3536 {255, 208, 0x50, 0, 64,}
3538 {255, 255, 0x40, 0, 64,}
3540 {255, 248, 0x40, 0, 64,}
3542 {255, 241, 0x40, 0, 64,}
3544 {255, 234, 0x40, 0, 64,}
3546 {255, 227, 0x40, 0, 64,}
3548 {255, 221, 0x40, 0, 64,}
3550 {255, 215, 0x40, 0, 64,}
3552 {255, 208, 0x40, 0, 64,}
3554 {255, 203, 0x40, 0, 64,}
3556 {255, 197, 0x40, 0, 64,}
3558 {255, 255, 0x30, 0, 64,}
3560 {255, 248, 0x30, 0, 64,}
3562 {255, 241, 0x30, 0, 64,}
3564 {255, 234, 0x30, 0, 64,}
3566 {255, 227, 0x30, 0, 64,}
3568 {255, 221, 0x30, 0, 64,}
3570 {255, 215, 0x30, 0, 64,}
3572 {255, 208, 0x30, 0, 64,}
3574 {255, 203, 0x30, 0, 64,}
3576 {255, 197, 0x30, 0, 64,}
3578 {255, 191, 0x30, 0, 64,}
3580 {255, 186, 0x30, 0, 64,}
3582 {255, 181, 0x30, 0, 64,}
3584 {255, 175, 0x30, 0, 64,}
3586 {255, 255, 0x20, 0, 64,}
3588 {255, 248, 0x20, 0, 64,}
3590 {255, 241, 0x20, 0, 64,}
3592 {255, 234, 0x20, 0, 64,}
3594 {255, 227, 0x20, 0, 64,}
3596 {255, 221, 0x20, 0, 64,}
3598 {255, 215, 0x20, 0, 64,}
3600 {255, 208, 0x20, 0, 64,}
3602 {255, 203, 0x20, 0, 64,}
3604 {255, 197, 0x20, 0, 64,}
3606 {255, 191, 0x20, 0, 64,}
3608 {255, 186, 0x20, 0, 64,}
3610 {255, 181, 0x20, 0, 64,}
3612 {255, 175, 0x20, 0, 64,}
3614 {255, 170, 0x20, 0, 64,}
3616 {255, 166, 0x20, 0, 64,}
3618 {255, 161, 0x20, 0, 64,}
3620 {255, 156, 0x20, 0, 64,}
3622 {255, 152, 0x20, 0, 64,}
3624 {255, 148, 0x20, 0, 64,}
3626 {255, 143, 0x20, 0, 64,}
3628 {255, 139, 0x20, 0, 64,}
3630 {255, 135, 0x20, 0, 64,}
3632 {255, 132, 0x20, 0, 64,}
3634 {255, 255, 0x10, 0, 64,}
3636 {255, 248, 0x10, 0, 64,}