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 static const u32 dot11lcn_gain_tbl_rev0
[] = {
119 static const u32 dot11lcn_gain_tbl_rev1
[] = {
218 static const u16 dot11lcn_aux_gain_idx_tbl_rev0
[] = {
259 static const u32 dot11lcn_gain_idx_tbl_rev0
[] = {
410 static const u16 dot11lcn_aux_gain_idx_tbl_2G
[] = {
451 static const u8 dot11lcn_gain_val_tbl_2G
[] = {
522 static const u32 dot11lcn_gain_idx_tbl_2G
[] = {
677 static const u32 dot11lcn_gain_tbl_2G
[] = {
776 static const u32 dot11lcn_gain_tbl_extlna_2G
[] = {
875 static const u16 dot11lcn_aux_gain_idx_tbl_extlna_2G
[] = {
916 static const u8 dot11lcn_gain_val_tbl_extlna_2G
[] = {
987 static const u32 dot11lcn_gain_idx_tbl_extlna_2G
[] = {
1142 static const u32 dot11lcn_aux_gain_idx_tbl_5G
[] = {
1183 static const u32 dot11lcn_gain_val_tbl_5G
[] = {
1254 static const u32 dot11lcn_gain_idx_tbl_5G
[] = {
1409 static 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 static 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_2G_rev2_sz
=
1615 sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2
) /
1616 sizeof(dot11lcnphytbl_rx_gain_info_2G_rev2
[0]);
1618 const u32 dot11lcnphytbl_rx_gain_info_5G_rev2_sz
=
1619 sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2
) /
1620 sizeof(dot11lcnphytbl_rx_gain_info_5G_rev2
[0]);
1622 static const u16 dot11lcn_min_sig_sq_tbl_rev0
[] = {
1689 static const u16 dot11lcn_noise_scale_tbl_rev0
[] = {
1756 static const u32 dot11lcn_fltr_ctrl_tbl_rev0
[] = {
1769 static const u32 dot11lcn_ps_ctrl_tbl_rev0
[] = {
1792 static const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo
[] = {
1860 static const u16 dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0
[] = {
1927 static const u16 dot11lcn_sw_ctrl_tbl_4313_epa_rev0
[] = {
1994 static const u16 dot11lcn_sw_ctrl_tbl_4313_rev0
[] = {
2061 static const u16 dot11lcn_sw_ctrl_tbl_rev0
[] = {
2128 static const u8 dot11lcn_nf_table_rev0
[] = {
2147 static const u8 dot11lcn_gain_val_tbl_rev0
[] = {
2210 static const u8 dot11lcn_spur_tbl_rev0
[] = {
2341 static const u16 dot11lcn_unsup_mcs_tbl_rev0
[] = {
2498 static const u16 dot11lcn_iq_local_tbl_rev0
[] = {
2609 static const u32 dot11lcn_papd_compdelta_tbl_rev0
[] = {
2772 const struct phytbl_info dot11lcnphytbl_info_rev0
[] = {
2773 {&dot11lcn_min_sig_sq_tbl_rev0
,
2774 sizeof(dot11lcn_min_sig_sq_tbl_rev0
) /
2775 sizeof(dot11lcn_min_sig_sq_tbl_rev0
[0]), 2, 0, 16}
2777 {&dot11lcn_noise_scale_tbl_rev0
,
2778 sizeof(dot11lcn_noise_scale_tbl_rev0
) /
2779 sizeof(dot11lcn_noise_scale_tbl_rev0
[0]), 1, 0, 16}
2781 {&dot11lcn_fltr_ctrl_tbl_rev0
,
2782 sizeof(dot11lcn_fltr_ctrl_tbl_rev0
) /
2783 sizeof(dot11lcn_fltr_ctrl_tbl_rev0
[0]), 11, 0, 32}
2785 {&dot11lcn_ps_ctrl_tbl_rev0
,
2786 sizeof(dot11lcn_ps_ctrl_tbl_rev0
) /
2787 sizeof(dot11lcn_ps_ctrl_tbl_rev0
[0]), 12, 0, 32}
2789 {&dot11lcn_gain_idx_tbl_rev0
,
2790 sizeof(dot11lcn_gain_idx_tbl_rev0
) /
2791 sizeof(dot11lcn_gain_idx_tbl_rev0
[0]), 13, 0, 32}
2793 {&dot11lcn_aux_gain_idx_tbl_rev0
,
2794 sizeof(dot11lcn_aux_gain_idx_tbl_rev0
) /
2795 sizeof(dot11lcn_aux_gain_idx_tbl_rev0
[0]), 14, 0, 16}
2797 {&dot11lcn_sw_ctrl_tbl_rev0
,
2798 sizeof(dot11lcn_sw_ctrl_tbl_rev0
) /
2799 sizeof(dot11lcn_sw_ctrl_tbl_rev0
[0]), 15, 0, 16}
2801 {&dot11lcn_nf_table_rev0
,
2802 sizeof(dot11lcn_nf_table_rev0
) / sizeof(dot11lcn_nf_table_rev0
[0]), 16,
2805 {&dot11lcn_gain_val_tbl_rev0
,
2806 sizeof(dot11lcn_gain_val_tbl_rev0
) /
2807 sizeof(dot11lcn_gain_val_tbl_rev0
[0]), 17, 0, 8}
2809 {&dot11lcn_gain_tbl_rev0
,
2810 sizeof(dot11lcn_gain_tbl_rev0
) / sizeof(dot11lcn_gain_tbl_rev0
[0]), 18,
2813 {&dot11lcn_spur_tbl_rev0
,
2814 sizeof(dot11lcn_spur_tbl_rev0
) / sizeof(dot11lcn_spur_tbl_rev0
[0]), 20,
2817 {&dot11lcn_unsup_mcs_tbl_rev0
,
2818 sizeof(dot11lcn_unsup_mcs_tbl_rev0
) /
2819 sizeof(dot11lcn_unsup_mcs_tbl_rev0
[0]), 23, 0, 16}
2821 {&dot11lcn_iq_local_tbl_rev0
,
2822 sizeof(dot11lcn_iq_local_tbl_rev0
) /
2823 sizeof(dot11lcn_iq_local_tbl_rev0
[0]), 0, 0, 16}
2825 {&dot11lcn_papd_compdelta_tbl_rev0
,
2826 sizeof(dot11lcn_papd_compdelta_tbl_rev0
) /
2827 sizeof(dot11lcn_papd_compdelta_tbl_rev0
[0]), 24, 0, 32}
2831 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313
= {
2832 &dot11lcn_sw_ctrl_tbl_4313_rev0
,
2833 sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0
) /
2834 sizeof(dot11lcn_sw_ctrl_tbl_4313_rev0
[0]), 15, 0, 16
2837 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_epa
= {
2838 &dot11lcn_sw_ctrl_tbl_4313_epa_rev0
,
2839 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0
) /
2840 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0
[0]), 15, 0, 16
2843 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa
= {
2844 &dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo
,
2845 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo
) /
2846 sizeof(dot11lcn_sw_ctrl_tbl_4313_epa_rev0_combo
[0]), 15, 0, 16
2849 const struct phytbl_info dot11lcn_sw_ctrl_tbl_info_4313_bt_epa_p250
= {
2850 &dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0
,
2851 sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0
) /
2852 sizeof(dot11lcn_sw_ctrl_tbl_4313_bt_epa_p250_rev0
[0]), 15, 0, 16
2855 const u32 dot11lcnphytbl_info_sz_rev0
=
2856 sizeof(dot11lcnphytbl_info_rev0
) / sizeof(dot11lcnphytbl_info_rev0
[0]);
2858 const struct lcnphy_tx_gain_tbl_entry
2859 dot11lcnphy_2GHz_extPA_gaintable_rev0
[128] = {
2990 const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_2GHz_gaintable_rev0
[128] = {
3121 const struct lcnphy_tx_gain_tbl_entry dot11lcnphy_5GHz_gaintable_rev0
[128] = {
3122 {255, 255, 0xf0, 0, 152},
3123 {255, 255, 0xf0, 0, 147},
3124 {255, 255, 0xf0, 0, 143},
3125 {255, 255, 0xf0, 0, 139},
3126 {255, 255, 0xf0, 0, 135},
3127 {255, 255, 0xf0, 0, 131},
3128 {255, 255, 0xf0, 0, 128},
3129 {255, 255, 0xf0, 0, 124},
3130 {255, 255, 0xf0, 0, 121},
3131 {255, 255, 0xf0, 0, 117},
3132 {255, 255, 0xf0, 0, 114},
3133 {255, 255, 0xf0, 0, 111},
3134 {255, 255, 0xf0, 0, 107},
3135 {255, 255, 0xf0, 0, 104},
3136 {255, 255, 0xf0, 0, 101},
3137 {255, 255, 0xf0, 0, 99},
3138 {255, 255, 0xf0, 0, 96},
3139 {255, 255, 0xf0, 0, 93},
3140 {255, 255, 0xf0, 0, 90},
3141 {255, 255, 0xf0, 0, 88},
3142 {255, 255, 0xf0, 0, 85},
3143 {255, 255, 0xf0, 0, 83},
3144 {255, 255, 0xf0, 0, 81},
3145 {255, 255, 0xf0, 0, 78},
3146 {255, 255, 0xf0, 0, 76},
3147 {255, 255, 0xf0, 0, 74},
3148 {255, 255, 0xf0, 0, 72},
3149 {255, 255, 0xf0, 0, 70},
3150 {255, 255, 0xf0, 0, 68},
3151 {255, 255, 0xf0, 0, 66},
3152 {255, 255, 0xf0, 0, 64},
3153 {255, 248, 0xf0, 0, 64},
3154 {255, 241, 0xf0, 0, 64},
3155 {255, 251, 0xe0, 0, 64},
3156 {255, 244, 0xe0, 0, 64},
3157 {255, 254, 0xd0, 0, 64},
3158 {255, 246, 0xd0, 0, 64},
3159 {255, 239, 0xd0, 0, 64},
3160 {255, 249, 0xc0, 0, 64},
3161 {255, 242, 0xc0, 0, 64},
3162 {255, 255, 0xb0, 0, 64},
3163 {255, 248, 0xb0, 0, 64},
3164 {255, 241, 0xb0, 0, 64},
3165 {255, 254, 0xa0, 0, 64},
3166 {255, 246, 0xa0, 0, 64},
3167 {255, 239, 0xa0, 0, 64},
3168 {255, 255, 0x90, 0, 64},
3169 {255, 248, 0x90, 0, 64},
3170 {255, 241, 0x90, 0, 64},
3171 {255, 234, 0x90, 0, 64},
3172 {255, 255, 0x80, 0, 64},
3173 {255, 248, 0x80, 0, 64},
3174 {255, 241, 0x80, 0, 64},
3175 {255, 234, 0x80, 0, 64},
3176 {255, 255, 0x70, 0, 64},
3177 {255, 248, 0x70, 0, 64},
3178 {255, 241, 0x70, 0, 64},
3179 {255, 234, 0x70, 0, 64},
3180 {255, 227, 0x70, 0, 64},
3181 {255, 221, 0x70, 0, 64},
3182 {255, 215, 0x70, 0, 64},
3183 {255, 208, 0x70, 0, 64},
3184 {255, 203, 0x70, 0, 64},
3185 {255, 197, 0x70, 0, 64},
3186 {255, 255, 0x60, 0, 64},
3187 {255, 248, 0x60, 0, 64},
3188 {255, 241, 0x60, 0, 64},
3189 {255, 234, 0x60, 0, 64},
3190 {255, 227, 0x60, 0, 64},
3191 {255, 221, 0x60, 0, 64},
3192 {255, 255, 0x50, 0, 64},
3193 {255, 248, 0x50, 0, 64},
3194 {255, 241, 0x50, 0, 64},
3195 {255, 234, 0x50, 0, 64},
3196 {255, 227, 0x50, 0, 64},
3197 {255, 221, 0x50, 0, 64},
3198 {255, 215, 0x50, 0, 64},
3199 {255, 208, 0x50, 0, 64},
3200 {255, 255, 0x40, 0, 64},
3201 {255, 248, 0x40, 0, 64},
3202 {255, 241, 0x40, 0, 64},
3203 {255, 234, 0x40, 0, 64},
3204 {255, 227, 0x40, 0, 64},
3205 {255, 221, 0x40, 0, 64},
3206 {255, 215, 0x40, 0, 64},
3207 {255, 208, 0x40, 0, 64},
3208 {255, 203, 0x40, 0, 64},
3209 {255, 197, 0x40, 0, 64},
3210 {255, 255, 0x30, 0, 64},
3211 {255, 248, 0x30, 0, 64},
3212 {255, 241, 0x30, 0, 64},
3213 {255, 234, 0x30, 0, 64},
3214 {255, 227, 0x30, 0, 64},
3215 {255, 221, 0x30, 0, 64},
3216 {255, 215, 0x30, 0, 64},
3217 {255, 208, 0x30, 0, 64},
3218 {255, 203, 0x30, 0, 64},
3219 {255, 197, 0x30, 0, 64},
3220 {255, 191, 0x30, 0, 64},
3221 {255, 186, 0x30, 0, 64},
3222 {255, 181, 0x30, 0, 64},
3223 {255, 175, 0x30, 0, 64},
3224 {255, 255, 0x20, 0, 64},
3225 {255, 248, 0x20, 0, 64},
3226 {255, 241, 0x20, 0, 64},
3227 {255, 234, 0x20, 0, 64},
3228 {255, 227, 0x20, 0, 64},
3229 {255, 221, 0x20, 0, 64},
3230 {255, 215, 0x20, 0, 64},
3231 {255, 208, 0x20, 0, 64},
3232 {255, 203, 0x20, 0, 64},
3233 {255, 197, 0x20, 0, 64},
3234 {255, 191, 0x20, 0, 64},
3235 {255, 186, 0x20, 0, 64},
3236 {255, 181, 0x20, 0, 64},
3237 {255, 175, 0x20, 0, 64},
3238 {255, 170, 0x20, 0, 64},
3239 {255, 166, 0x20, 0, 64},
3240 {255, 161, 0x20, 0, 64},
3241 {255, 156, 0x20, 0, 64},
3242 {255, 152, 0x20, 0, 64},
3243 {255, 148, 0x20, 0, 64},
3244 {255, 143, 0x20, 0, 64},
3245 {255, 139, 0x20, 0, 64},
3246 {255, 135, 0x20, 0, 64},
3247 {255, 132, 0x20, 0, 64},
3248 {255, 255, 0x10, 0, 64},
3249 {255, 248, 0x10, 0, 64},