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.
17 #include <linux/types.h>
18 #include <wlc_phy_int.h>
19 #include <wlc_phytbl_lcn.h>
21 const u32 dot11lcn_gain_tbl_rev0[] = {
120 const u32 dot11lcn_gain_tbl_rev1[] = {
219 const u16 dot11lcn_aux_gain_idx_tbl_rev0[] = {
260 const u32 dot11lcn_gain_idx_tbl_rev0[] = {
411 const u16 dot11lcn_aux_gain_idx_tbl_2G[] = {
452 const u8 dot11lcn_gain_val_tbl_2G[] = {
523 const u32 dot11lcn_gain_idx_tbl_2G[] = {
678 const u32 dot11lcn_gain_tbl_2G[] = {
777 const u32 dot11lcn_gain_tbl_extlna_2G[] = {
876 const u16 dot11lcn_aux_gain_idx_tbl_extlna_2G[] = {
917 const u8 dot11lcn_gain_val_tbl_extlna_2G[] = {
988 const u32 dot11lcn_gain_idx_tbl_extlna_2G[] = {
1143 const u32 dot11lcn_aux_gain_idx_tbl_5G[] = {
1184 const u32 dot11lcn_gain_val_tbl_5G[] = {
1255 const u32 dot11lcn_gain_idx_tbl_5G[] = {
1410 const u32 dot11lcn_gain_tbl_5G[] = {
1509 const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[] = {
1510 {&dot11lcn_gain_tbl_rev0,
1511 sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18,
1514 {&dot11lcn_aux_gain_idx_tbl_rev0,
1515 sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
1516 sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
1518 {&dot11lcn_gain_idx_tbl_rev0,
1519 sizeof(dot11lcn_gain_idx_tbl_rev0) /
1520 sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
1524 const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev1[] = {
1525 {&dot11lcn_gain_tbl_rev1,
1526 sizeof(dot11lcn_gain_tbl_rev1) / sizeof(dot11lcn_gain_tbl_rev1[0]), 18,
1529 {&dot11lcn_aux_gain_idx_tbl_rev0,
1530 sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
1531 sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
1533 {&dot11lcn_gain_idx_tbl_rev0,
1534 sizeof(dot11lcn_gain_idx_tbl_rev0) /
1535 sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
1539 const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_2G_rev2[] = {
1540 {&dot11lcn_gain_tbl_2G,
1541 sizeof(dot11lcn_gain_tbl_2G) / sizeof(dot11lcn_gain_tbl_2G[0]), 18, 0,
1544 {&dot11lcn_aux_gain_idx_tbl_2G,
1545 sizeof(dot11lcn_aux_gain_idx_tbl_2G) /
1546 sizeof(dot11lcn_aux_gain_idx_tbl_2G[0]), 14, 0, 16}
1548 {&dot11lcn_gain_idx_tbl_2G,
1549 sizeof(dot11lcn_gain_idx_tbl_2G) / sizeof(dot11lcn_gain_idx_tbl_2G[0]),
1552 {&dot11lcn_gain_val_tbl_2G,
1553 sizeof(dot11lcn_gain_val_tbl_2G) / sizeof(dot11lcn_gain_val_tbl_2G[0]),
1557 const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_5G_rev2[] = {
1558 {&dot11lcn_gain_tbl_5G,
1559 sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
1562 {&dot11lcn_aux_gain_idx_tbl_5G,
1563 sizeof(dot11lcn_aux_gain_idx_tbl_5G) /
1564 sizeof(dot11lcn_aux_gain_idx_tbl_5G[0]), 14, 0, 16}
1566 {&dot11lcn_gain_idx_tbl_5G,
1567 sizeof(dot11lcn_gain_idx_tbl_5G) / sizeof(dot11lcn_gain_idx_tbl_5G[0]),
1570 {&dot11lcn_gain_val_tbl_5G,
1571 sizeof(dot11lcn_gain_val_tbl_5G) / sizeof(dot11lcn_gain_val_tbl_5G[0]),
1575 const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[] = {
1576 {&dot11lcn_gain_tbl_extlna_2G,
1577 sizeof(dot11lcn_gain_tbl_extlna_2G) /
1578 sizeof(dot11lcn_gain_tbl_extlna_2G[0]), 18, 0, 32}
1580 {&dot11lcn_aux_gain_idx_tbl_extlna_2G,
1581 sizeof(dot11lcn_aux_gain_idx_tbl_extlna_2G) /
1582 sizeof(dot11lcn_aux_gain_idx_tbl_extlna_2G[0]), 14, 0, 16}
1584 {&dot11lcn_gain_idx_tbl_extlna_2G,
1585 sizeof(dot11lcn_gain_idx_tbl_extlna_2G) /
1586 sizeof(dot11lcn_gain_idx_tbl_extlna_2G[0]), 13, 0, 32}
1588 {&dot11lcn_gain_val_tbl_extlna_2G,
1589 sizeof(dot11lcn_gain_val_tbl_extlna_2G) /
1590 sizeof(dot11lcn_gain_val_tbl_extlna_2G[0]), 17, 0, 8}
1593 const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[] = {
1594 {&dot11lcn_gain_tbl_5G,
1595 sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
1598 {&dot11lcn_aux_gain_idx_tbl_5G,
1599 sizeof(dot11lcn_aux_gain_idx_tbl_5G) /
1600 sizeof(dot11lcn_aux_gain_idx_tbl_5G[0]), 14, 0, 16}
1602 {&dot11lcn_gain_idx_tbl_5G,
1603 sizeof(dot11lcn_gain_idx_tbl_5G) / sizeof(dot11lcn_gain_idx_tbl_5G[0]),
1606 {&dot11lcn_gain_val_tbl_5G,
1607 sizeof(dot11lcn_gain_val_tbl_5G) / sizeof(dot11lcn_gain_val_tbl_5G[0]),
1611 const u32 dot11lcnphytbl_rx_gain_info_sz_rev0 =
1612 sizeof(dot11lcnphytbl_rx_gain_info_rev0) /
1613 sizeof(dot11lcnphytbl_rx_gain_info_rev0[0]);
1615 const u32 dot11lcnphytbl_rx_gain_info_sz_rev1 =
1616 sizeof(dot11lcnphytbl_rx_gain_info_rev1) /
1617 sizeof(dot11lcnphytbl_rx_gain_info_rev1[0]);
1619 const u32 dot11lcnphytbl_rx_gain_info_2G_rev2_sz =
1620 sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2) /
1621 sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2[0]);
1623 const u32 dot11lcnphytbl_rx_gain_info_5G_rev2_sz =
1624 sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2) /
1625 sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2[0]);
1627 const u16 dot11lcn_min_sig_sq_tbl_rev0[] = {
1694 const u16 dot11lcn_noise_scale_tbl_rev0[] = {
1761 const u32 dot11lcn_fltr_ctrl_tbl_rev0[] = {
1774 const u32 dot11lcn_ps_ctrl_tbl_rev0[] = {
1797 const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[] = {
1865 const u16 dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[] = {
1932 const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0[] = {
1999 const u16 dot11lcn_sw_ctrl_tbl_4313_rev0[] = {
2066 const u16 dot11lcn_sw_ctrl_tbl_rev0[] = {
2133 const u8 dot11lcn_nf_table_rev0[] = {
2152 const u8 dot11lcn_gain_val_tbl_rev0[] = {
2215 const u8 dot11lcn_spur_tbl_rev0[] = {
2346 const u16 dot11lcn_unsup_mcs_tbl_rev0[] = {
2503 const u16 dot11lcn_iq_local_tbl_rev0[] = {
2614 const u32 dot11lcn_papd_compdelta_tbl_rev0[] = {
2777 const dot11lcnphytbl_info_t dot11lcnphytbl_info_rev0[] = {
2778 {&dot11lcn_min_sig_sq_tbl_rev0,
2779 sizeof(dot11lcn_min_sig_sq_tbl_rev0) /
2780 sizeof(dot11lcn_min_sig_sq_tbl_rev0[0]), 2, 0, 16}
2782 {&dot11lcn_noise_scale_tbl_rev0,
2783 sizeof(dot11lcn_noise_scale_tbl_rev0) /
2784 sizeof(dot11lcn_noise_scale_tbl_rev0[0]), 1, 0, 16}
2786 {&dot11lcn_fltr_ctrl_tbl_rev0,
2787 sizeof(dot11lcn_fltr_ctrl_tbl_rev0) /
2788 sizeof(dot11lcn_fltr_ctrl_tbl_rev0[0]), 11, 0, 32}
2790 {&dot11lcn_ps_ctrl_tbl_rev0,
2791 sizeof(dot11lcn_ps_ctrl_tbl_rev0) /
2792 sizeof(dot11lcn_ps_ctrl_tbl_rev0[0]), 12, 0, 32}
2794 {&dot11lcn_gain_idx_tbl_rev0,
2795 sizeof(dot11lcn_gain_idx_tbl_rev0) /
2796 sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
2798 {&dot11lcn_aux_gain_idx_tbl_rev0,
2799 sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
2800 sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
2802 {&dot11lcn_sw_ctrl_tbl_rev0,
2803 sizeof(dot11lcn_sw_ctrl_tbl_rev0) /
2804 sizeof(dot11lcn_sw_ctrl_tbl_rev0[0]), 15, 0, 16}
2806 {&dot11lcn_nf_table_rev0,
2807 sizeof(dot11lcn_nf_table_rev0) / sizeof(dot11lcn_nf_table_rev0[0]), 16,
2810 {&dot11lcn_gain_val_tbl_rev0,
2811 sizeof(dot11lcn_gain_val_tbl_rev0) /
2812 sizeof(dot11lcn_gain_val_tbl_rev0[0]), 17, 0, 8}
2814 {&dot11lcn_gain_tbl_rev0,
2815 sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18,
2818 {&dot11lcn_spur_tbl_rev0,
2819 sizeof(dot11lcn_spur_tbl_rev0) / sizeof(dot11lcn_spur_tbl_rev0[0]), 20,
2822 {&dot11lcn_unsup_mcs_tbl_rev0,
2823 sizeof(dot11lcn_unsup_mcs_tbl_rev0) /
2824 sizeof(dot11lcn_unsup_mcs_tbl_rev0[0]), 23, 0, 16}
2826 {&dot11lcn_iq_local_tbl_rev0,
2827 sizeof(dot11lcn_iq_local_tbl_rev0) /
2828 sizeof(dot11lcn_iq_local_tbl_rev0[0]), 0, 0, 16}
2830 {&dot11lcn_papd_compdelta_tbl_rev0,
2831 sizeof(dot11lcn_papd_compdelta_tbl_rev0) /
2832 sizeof(dot11lcn_papd_compdelta_tbl_rev0[0]), 24, 0, 32}
2836 const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313 = {
2837 &dot11lcn_sw_ctrl_tbl_4313_rev0,
2838 sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0) /
2839 sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0[0]), 15, 0, 16
2842 const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_epa = {
2843 &dot11lcn_sw_ctrl_tbl_4313_epa_rev0,
2844 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0) /
2845 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0[0]), 15, 0, 16
2848 const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa = {
2849 &dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo,
2850 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo) /
2851 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[0]), 15, 0, 16
2854 const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250 = {
2855 &dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0,
2856 sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0) /
2857 sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[0]), 15, 0, 16
2860 const u32 dot11lcnphytbl_info_sz_rev0 =
2861 sizeof(dot11lcnphytbl_info_rev0) / sizeof(dot11lcnphytbl_info_rev0[0]);
2863 const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[128] = {
3122 const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[128] = {
3381 const 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,}