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>
19
#include <wlc_phy_int.h>
20
#include <wlc_phytbl_lcn.h>
22
const u32 dot11lcn_gain_tbl_rev0[] = {
121
const u32 dot11lcn_gain_tbl_rev1[] = {
220
const u16 dot11lcn_aux_gain_idx_tbl_rev0[] = {
261
const u32 dot11lcn_gain_idx_tbl_rev0[] = {
412
const u16 dot11lcn_aux_gain_idx_tbl_2G[] = {
453
const u8 dot11lcn_gain_val_tbl_2G[] = {
524
const u32 dot11lcn_gain_idx_tbl_2G[] = {
679
const u32 dot11lcn_gain_tbl_2G[] = {
778
const u32 dot11lcn_gain_tbl_extlna_2G[] = {
877
const u16 dot11lcn_aux_gain_idx_tbl_extlna_2G[] = {
918
const u8 dot11lcn_gain_val_tbl_extlna_2G[] = {
989
const u32 dot11lcn_gain_idx_tbl_extlna_2G[] = {
1144
const u32 dot11lcn_aux_gain_idx_tbl_5G[] = {
1185
const u32 dot11lcn_gain_val_tbl_5G[] = {
1256
const u32 dot11lcn_gain_idx_tbl_5G[] = {
1411
const u32 dot11lcn_gain_tbl_5G[] = {
1510
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev0[] = {
1511
{&dot11lcn_gain_tbl_rev0,
1512
sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18,
1515
{&dot11lcn_aux_gain_idx_tbl_rev0,
1516
sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
1517
sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
1519
{&dot11lcn_gain_idx_tbl_rev0,
1520
sizeof(dot11lcn_gain_idx_tbl_rev0) /
1521
sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
1525
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_rev1[] = {
1526
{&dot11lcn_gain_tbl_rev1,
1527
sizeof(dot11lcn_gain_tbl_rev1) / sizeof(dot11lcn_gain_tbl_rev1[0]), 18,
1530
{&dot11lcn_aux_gain_idx_tbl_rev0,
1531
sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
1532
sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
1534
{&dot11lcn_gain_idx_tbl_rev0,
1535
sizeof(dot11lcn_gain_idx_tbl_rev0) /
1536
sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
1540
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_2G_rev2[] = {
1541
{&dot11lcn_gain_tbl_2G,
1542
sizeof(dot11lcn_gain_tbl_2G) / sizeof(dot11lcn_gain_tbl_2G[0]), 18, 0,
1545
{&dot11lcn_aux_gain_idx_tbl_2G,
1546
sizeof(dot11lcn_aux_gain_idx_tbl_2G) /
1547
sizeof(dot11lcn_aux_gain_idx_tbl_2G[0]), 14, 0, 16}
1549
{&dot11lcn_gain_idx_tbl_2G,
1550
sizeof(dot11lcn_gain_idx_tbl_2G) / sizeof(dot11lcn_gain_idx_tbl_2G[0]),
1553
{&dot11lcn_gain_val_tbl_2G,
1554
sizeof(dot11lcn_gain_val_tbl_2G) / sizeof(dot11lcn_gain_val_tbl_2G[0]),
1558
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_5G_rev2[] = {
1559
{&dot11lcn_gain_tbl_5G,
1560
sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
1563
{&dot11lcn_aux_gain_idx_tbl_5G,
1564
sizeof(dot11lcn_aux_gain_idx_tbl_5G) /
1565
sizeof(dot11lcn_aux_gain_idx_tbl_5G[0]), 14, 0, 16}
1567
{&dot11lcn_gain_idx_tbl_5G,
1568
sizeof(dot11lcn_gain_idx_tbl_5G) / sizeof(dot11lcn_gain_idx_tbl_5G[0]),
1571
{&dot11lcn_gain_val_tbl_5G,
1572
sizeof(dot11lcn_gain_val_tbl_5G) / sizeof(dot11lcn_gain_val_tbl_5G[0]),
1576
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_2G_rev2[] = {
1577
{&dot11lcn_gain_tbl_extlna_2G,
1578
sizeof(dot11lcn_gain_tbl_extlna_2G) /
1579
sizeof(dot11lcn_gain_tbl_extlna_2G[0]), 18, 0, 32}
1581
{&dot11lcn_aux_gain_idx_tbl_extlna_2G,
1582
sizeof(dot11lcn_aux_gain_idx_tbl_extlna_2G) /
1583
sizeof(dot11lcn_aux_gain_idx_tbl_extlna_2G[0]), 14, 0, 16}
1585
{&dot11lcn_gain_idx_tbl_extlna_2G,
1586
sizeof(dot11lcn_gain_idx_tbl_extlna_2G) /
1587
sizeof(dot11lcn_gain_idx_tbl_extlna_2G[0]), 13, 0, 32}
1589
{&dot11lcn_gain_val_tbl_extlna_2G,
1590
sizeof(dot11lcn_gain_val_tbl_extlna_2G) /
1591
sizeof(dot11lcn_gain_val_tbl_extlna_2G[0]), 17, 0, 8}
1594
const dot11lcnphytbl_info_t dot11lcnphytbl_rx_gain_info_extlna_5G_rev2[] = {
1595
{&dot11lcn_gain_tbl_5G,
1596
sizeof(dot11lcn_gain_tbl_5G) / sizeof(dot11lcn_gain_tbl_5G[0]), 18, 0,
1599
{&dot11lcn_aux_gain_idx_tbl_5G,
1600
sizeof(dot11lcn_aux_gain_idx_tbl_5G) /
1601
sizeof(dot11lcn_aux_gain_idx_tbl_5G[0]), 14, 0, 16}
1603
{&dot11lcn_gain_idx_tbl_5G,
1604
sizeof(dot11lcn_gain_idx_tbl_5G) / sizeof(dot11lcn_gain_idx_tbl_5G[0]),
1607
{&dot11lcn_gain_val_tbl_5G,
1608
sizeof(dot11lcn_gain_val_tbl_5G) / sizeof(dot11lcn_gain_val_tbl_5G[0]),
1612
const u32 dot11lcnphytbl_rx_gain_info_sz_rev0 =
1613
sizeof(dot11lcnphytbl_rx_gain_info_rev0) /
1614
sizeof(dot11lcnphytbl_rx_gain_info_rev0[0]);
1616
const u32 dot11lcnphytbl_rx_gain_info_sz_rev1 =
1617
sizeof(dot11lcnphytbl_rx_gain_info_rev1) /
1618
sizeof(dot11lcnphytbl_rx_gain_info_rev1[0]);
1620
const u32 dot11lcnphytbl_rx_gain_info_2G_rev2_sz =
1621
sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2) /
1622
sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2[0]);
1624
const u32 dot11lcnphytbl_rx_gain_info_5G_rev2_sz =
1625
sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2) /
1626
sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2[0]);
1628
const u16 dot11lcn_min_sig_sq_tbl_rev0[] = {
1695
const u16 dot11lcn_noise_scale_tbl_rev0[] = {
1762
const u32 dot11lcn_fltr_ctrl_tbl_rev0[] = {
1775
const u32 dot11lcn_ps_ctrl_tbl_rev0[] = {
1798
const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[] = {
1866
const u16 dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[] = {
1933
const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0[] = {
2000
const u16 dot11lcn_sw_ctrl_tbl_4313_rev0[] = {
2067
const u16 dot11lcn_sw_ctrl_tbl_rev0[] = {
2134
const u8 dot11lcn_nf_table_rev0[] = {
2153
const u8 dot11lcn_gain_val_tbl_rev0[] = {
2216
const u8 dot11lcn_spur_tbl_rev0[] = {
2347
const u16 dot11lcn_unsup_mcs_tbl_rev0[] = {
2504
const u16 dot11lcn_iq_local_tbl_rev0[] = {
2615
const u32 dot11lcn_papd_compdelta_tbl_rev0[] = {
2778
const dot11lcnphytbl_info_t dot11lcnphytbl_info_rev0[] = {
2779
{&dot11lcn_min_sig_sq_tbl_rev0,
2780
sizeof(dot11lcn_min_sig_sq_tbl_rev0) /
2781
sizeof(dot11lcn_min_sig_sq_tbl_rev0[0]), 2, 0, 16}
2783
{&dot11lcn_noise_scale_tbl_rev0,
2784
sizeof(dot11lcn_noise_scale_tbl_rev0) /
2785
sizeof(dot11lcn_noise_scale_tbl_rev0[0]), 1, 0, 16}
2787
{&dot11lcn_fltr_ctrl_tbl_rev0,
2788
sizeof(dot11lcn_fltr_ctrl_tbl_rev0) /
2789
sizeof(dot11lcn_fltr_ctrl_tbl_rev0[0]), 11, 0, 32}
2791
{&dot11lcn_ps_ctrl_tbl_rev0,
2792
sizeof(dot11lcn_ps_ctrl_tbl_rev0) /
2793
sizeof(dot11lcn_ps_ctrl_tbl_rev0[0]), 12, 0, 32}
2795
{&dot11lcn_gain_idx_tbl_rev0,
2796
sizeof(dot11lcn_gain_idx_tbl_rev0) /
2797
sizeof(dot11lcn_gain_idx_tbl_rev0[0]), 13, 0, 32}
2799
{&dot11lcn_aux_gain_idx_tbl_rev0,
2800
sizeof(dot11lcn_aux_gain_idx_tbl_rev0) /
2801
sizeof(dot11lcn_aux_gain_idx_tbl_rev0[0]), 14, 0, 16}
2803
{&dot11lcn_sw_ctrl_tbl_rev0,
2804
sizeof(dot11lcn_sw_ctrl_tbl_rev0) /
2805
sizeof(dot11lcn_sw_ctrl_tbl_rev0[0]), 15, 0, 16}
2807
{&dot11lcn_nf_table_rev0,
2808
sizeof(dot11lcn_nf_table_rev0) / sizeof(dot11lcn_nf_table_rev0[0]), 16,
2811
{&dot11lcn_gain_val_tbl_rev0,
2812
sizeof(dot11lcn_gain_val_tbl_rev0) /
2813
sizeof(dot11lcn_gain_val_tbl_rev0[0]), 17, 0, 8}
2815
{&dot11lcn_gain_tbl_rev0,
2816
sizeof(dot11lcn_gain_tbl_rev0) / sizeof(dot11lcn_gain_tbl_rev0[0]), 18,
2819
{&dot11lcn_spur_tbl_rev0,
2820
sizeof(dot11lcn_spur_tbl_rev0) / sizeof(dot11lcn_spur_tbl_rev0[0]), 20,
2823
{&dot11lcn_unsup_mcs_tbl_rev0,
2824
sizeof(dot11lcn_unsup_mcs_tbl_rev0) /
2825
sizeof(dot11lcn_unsup_mcs_tbl_rev0[0]), 23, 0, 16}
2827
{&dot11lcn_iq_local_tbl_rev0,
2828
sizeof(dot11lcn_iq_local_tbl_rev0) /
2829
sizeof(dot11lcn_iq_local_tbl_rev0[0]), 0, 0, 16}
2831
{&dot11lcn_papd_compdelta_tbl_rev0,
2832
sizeof(dot11lcn_papd_compdelta_tbl_rev0) /
2833
sizeof(dot11lcn_papd_compdelta_tbl_rev0[0]), 24, 0, 32}
2837
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313 = {
2838
&dot11lcn_sw_ctrl_tbl_4313_rev0,
2839
sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0) /
2840
sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0[0]), 15, 0, 16
2843
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_epa = {
2844
&dot11lcn_sw_ctrl_tbl_4313_epa_rev0,
2845
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0) /
2846
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0[0]), 15, 0, 16
2849
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa = {
2850
&dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo,
2851
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo) /
2852
sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo[0]), 15, 0, 16
2855
const dot11lcnphytbl_info_t dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250 = {
2856
&dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0,
2857
sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0) /
2858
sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0[0]), 15, 0, 16
2861
const u32 dot11lcnphytbl_info_sz_rev0 =
2862
sizeof(dot11lcnphytbl_info_rev0) / sizeof(dot11lcnphytbl_info_rev0[0]);
2864
const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_extPA_gaintable_rev0[128] = {
3123
const lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0[128] = {
3382
const lcnphy_tx_gain_tbl_entry dot11lcnphy_5GHz_gaintable_rev0[128] = {
3383
{255, 255, 0xf0, 0, 152,}
3385
{255, 255, 0xf0, 0, 147,}
3387
{255, 255, 0xf0, 0, 143,}
3389
{255, 255, 0xf0, 0, 139,}
3391
{255, 255, 0xf0, 0, 135,}
3393
{255, 255, 0xf0, 0, 131,}
3395
{255, 255, 0xf0, 0, 128,}
3397
{255, 255, 0xf0, 0, 124,}
3399
{255, 255, 0xf0, 0, 121,}
3401
{255, 255, 0xf0, 0, 117,}
3403
{255, 255, 0xf0, 0, 114,}
3405
{255, 255, 0xf0, 0, 111,}
3407
{255, 255, 0xf0, 0, 107,}
3409
{255, 255, 0xf0, 0, 104,}
3411
{255, 255, 0xf0, 0, 101,}
3413
{255, 255, 0xf0, 0, 99,}
3415
{255, 255, 0xf0, 0, 96,}
3417
{255, 255, 0xf0, 0, 93,}
3419
{255, 255, 0xf0, 0, 90,}
3421
{255, 255, 0xf0, 0, 88,}
3423
{255, 255, 0xf0, 0, 85,}
3425
{255, 255, 0xf0, 0, 83,}
3427
{255, 255, 0xf0, 0, 81,}
3429
{255, 255, 0xf0, 0, 78,}
3431
{255, 255, 0xf0, 0, 76,}
3433
{255, 255, 0xf0, 0, 74,}
3435
{255, 255, 0xf0, 0, 72,}
3437
{255, 255, 0xf0, 0, 70,}
3439
{255, 255, 0xf0, 0, 68,}
3441
{255, 255, 0xf0, 0, 66,}
3443
{255, 255, 0xf0, 0, 64,}
3445
{255, 248, 0xf0, 0, 64,}
3447
{255, 241, 0xf0, 0, 64,}
3449
{255, 251, 0xe0, 0, 64,}
3451
{255, 244, 0xe0, 0, 64,}
3453
{255, 254, 0xd0, 0, 64,}
3455
{255, 246, 0xd0, 0, 64,}
3457
{255, 239, 0xd0, 0, 64,}
3459
{255, 249, 0xc0, 0, 64,}
3461
{255, 242, 0xc0, 0, 64,}
3463
{255, 255, 0xb0, 0, 64,}
3465
{255, 248, 0xb0, 0, 64,}
3467
{255, 241, 0xb0, 0, 64,}
3469
{255, 254, 0xa0, 0, 64,}
3471
{255, 246, 0xa0, 0, 64,}
3473
{255, 239, 0xa0, 0, 64,}
3475
{255, 255, 0x90, 0, 64,}
3477
{255, 248, 0x90, 0, 64,}
3479
{255, 241, 0x90, 0, 64,}
3481
{255, 234, 0x90, 0, 64,}
3483
{255, 255, 0x80, 0, 64,}
3485
{255, 248, 0x80, 0, 64,}
3487
{255, 241, 0x80, 0, 64,}
3489
{255, 234, 0x80, 0, 64,}
3491
{255, 255, 0x70, 0, 64,}
3493
{255, 248, 0x70, 0, 64,}
3495
{255, 241, 0x70, 0, 64,}
3497
{255, 234, 0x70, 0, 64,}
3499
{255, 227, 0x70, 0, 64,}
3501
{255, 221, 0x70, 0, 64,}
3503
{255, 215, 0x70, 0, 64,}
3505
{255, 208, 0x70, 0, 64,}
3507
{255, 203, 0x70, 0, 64,}
3509
{255, 197, 0x70, 0, 64,}
3511
{255, 255, 0x60, 0, 64,}
3513
{255, 248, 0x60, 0, 64,}
3515
{255, 241, 0x60, 0, 64,}
3517
{255, 234, 0x60, 0, 64,}
3519
{255, 227, 0x60, 0, 64,}
3521
{255, 221, 0x60, 0, 64,}
3523
{255, 255, 0x50, 0, 64,}
3525
{255, 248, 0x50, 0, 64,}
3527
{255, 241, 0x50, 0, 64,}
3529
{255, 234, 0x50, 0, 64,}
3531
{255, 227, 0x50, 0, 64,}
3533
{255, 221, 0x50, 0, 64,}
3535
{255, 215, 0x50, 0, 64,}
3537
{255, 208, 0x50, 0, 64,}
3539
{255, 255, 0x40, 0, 64,}
3541
{255, 248, 0x40, 0, 64,}
3543
{255, 241, 0x40, 0, 64,}
3545
{255, 234, 0x40, 0, 64,}
3547
{255, 227, 0x40, 0, 64,}
3549
{255, 221, 0x40, 0, 64,}
3551
{255, 215, 0x40, 0, 64,}
3553
{255, 208, 0x40, 0, 64,}
3555
{255, 203, 0x40, 0, 64,}
3557
{255, 197, 0x40, 0, 64,}
3559
{255, 255, 0x30, 0, 64,}
3561
{255, 248, 0x30, 0, 64,}
3563
{255, 241, 0x30, 0, 64,}
3565
{255, 234, 0x30, 0, 64,}
3567
{255, 227, 0x30, 0, 64,}
3569
{255, 221, 0x30, 0, 64,}
3571
{255, 215, 0x30, 0, 64,}
3573
{255, 208, 0x30, 0, 64,}
3575
{255, 203, 0x30, 0, 64,}
3577
{255, 197, 0x30, 0, 64,}
3579
{255, 191, 0x30, 0, 64,}
3581
{255, 186, 0x30, 0, 64,}
3583
{255, 181, 0x30, 0, 64,}
3585
{255, 175, 0x30, 0, 64,}
3587
{255, 255, 0x20, 0, 64,}
3589
{255, 248, 0x20, 0, 64,}
3591
{255, 241, 0x20, 0, 64,}
3593
{255, 234, 0x20, 0, 64,}
3595
{255, 227, 0x20, 0, 64,}
3597
{255, 221, 0x20, 0, 64,}
3599
{255, 215, 0x20, 0, 64,}
3601
{255, 208, 0x20, 0, 64,}
3603
{255, 203, 0x20, 0, 64,}
3605
{255, 197, 0x20, 0, 64,}
3607
{255, 191, 0x20, 0, 64,}
3609
{255, 186, 0x20, 0, 64,}
3611
{255, 181, 0x20, 0, 64,}
3613
{255, 175, 0x20, 0, 64,}
3615
{255, 170, 0x20, 0, 64,}
3617
{255, 166, 0x20, 0, 64,}
3619
{255, 161, 0x20, 0, 64,}
3621
{255, 156, 0x20, 0, 64,}
3623
{255, 152, 0x20, 0, 64,}
3625
{255, 148, 0x20, 0, 64,}
3627
{255, 143, 0x20, 0, 64,}
3629
{255, 139, 0x20, 0, 64,}
3631
{255, 135, 0x20, 0, 64,}
3633
{255, 132, 0x20, 0, 64,}
3635
{255, 255, 0x10, 0, 64,}
3637
{255, 248, 0x10, 0, 64,}