.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | |
---|
3 | 4 | Broadcom B43 wireless driver |
---|
.. | .. |
---|
6 | 7 | Copyright (c) 2008 Michael Buesch <m@bues.ch> |
---|
7 | 8 | Copyright (c) 2010-2011 Rafał Miłecki <zajec5@gmail.com> |
---|
8 | 9 | |
---|
9 | | - This program is free software; you can redistribute it and/or modify |
---|
10 | | - it under the terms of the GNU General Public License as published by |
---|
11 | | - the Free Software Foundation; either version 2 of the License, or |
---|
12 | | - (at your option) any later version. |
---|
13 | | - |
---|
14 | | - This program is distributed in the hope that it will be useful, |
---|
15 | | - but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | | - GNU General Public License for more details. |
---|
18 | | - |
---|
19 | | - You should have received a copy of the GNU General Public License |
---|
20 | | - along with this program; see the file COPYING. If not, write to |
---|
21 | | - the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, |
---|
22 | | - Boston, MA 02110-1301, USA. |
---|
23 | 10 | |
---|
24 | 11 | */ |
---|
25 | 12 | |
---|
| 13 | +#include <linux/cordic.h> |
---|
26 | 14 | #include <linux/delay.h> |
---|
27 | 15 | #include <linux/slab.h> |
---|
28 | 16 | #include <linux/types.h> |
---|
.. | .. |
---|
110 | 98 | (dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ)); |
---|
111 | 99 | } |
---|
112 | 100 | |
---|
113 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreGetState */ |
---|
| 101 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreGetState */ |
---|
114 | 102 | static u8 b43_nphy_get_rx_core_state(struct b43_wldev *dev) |
---|
115 | 103 | { |
---|
116 | 104 | return (b43_phy_read(dev, B43_NPHY_RFSEQCA) & B43_NPHY_RFSEQCA_RXEN) >> |
---|
.. | .. |
---|
121 | 109 | * RF (just without b43_nphy_rf_ctl_intc_override) |
---|
122 | 110 | **************************************************/ |
---|
123 | 111 | |
---|
124 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ForceRFSeq */ |
---|
| 112 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/ForceRFSeq */ |
---|
125 | 113 | static void b43_nphy_force_rf_sequence(struct b43_wldev *dev, |
---|
126 | 114 | enum b43_nphy_rf_sequence seq) |
---|
127 | 115 | { |
---|
.. | .. |
---|
158 | 146 | /* TODO */ |
---|
159 | 147 | } |
---|
160 | 148 | |
---|
161 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverrideRev7 */ |
---|
| 149 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverrideRev7 */ |
---|
162 | 150 | static void b43_nphy_rf_ctl_override_rev7(struct b43_wldev *dev, u16 field, |
---|
163 | 151 | u16 value, u8 core, bool off, |
---|
164 | 152 | u8 override) |
---|
.. | .. |
---|
205 | 193 | } |
---|
206 | 194 | } |
---|
207 | 195 | |
---|
208 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverideOneToMany */ |
---|
| 196 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverideOneToMany */ |
---|
209 | 197 | static void b43_nphy_rf_ctl_override_one_to_many(struct b43_wldev *dev, |
---|
210 | 198 | enum n_rf_ctl_over_cmd cmd, |
---|
211 | 199 | u16 value, u8 core, bool off) |
---|
.. | .. |
---|
249 | 237 | } |
---|
250 | 238 | } |
---|
251 | 239 | |
---|
252 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverride */ |
---|
| 240 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverride */ |
---|
253 | 241 | static void b43_nphy_rf_ctl_override(struct b43_wldev *dev, u16 field, |
---|
254 | 242 | u16 value, u8 core, bool off) |
---|
255 | 243 | { |
---|
.. | .. |
---|
394 | 382 | } |
---|
395 | 383 | } |
---|
396 | 384 | |
---|
397 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlIntcOverride */ |
---|
| 385 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlIntcOverride */ |
---|
398 | 386 | static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, |
---|
399 | 387 | enum n_intc_override intc_override, |
---|
400 | 388 | u16 value, u8 core) |
---|
.. | .. |
---|
502 | 490 | * Various PHY ops |
---|
503 | 491 | **************************************************/ |
---|
504 | 492 | |
---|
505 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/clip-detection */ |
---|
| 493 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/clip-detection */ |
---|
506 | 494 | static void b43_nphy_write_clip_detection(struct b43_wldev *dev, |
---|
507 | 495 | const u16 *clip_st) |
---|
508 | 496 | { |
---|
.. | .. |
---|
510 | 498 | b43_phy_write(dev, B43_NPHY_C2_CLIP1THRES, clip_st[1]); |
---|
511 | 499 | } |
---|
512 | 500 | |
---|
513 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/clip-detection */ |
---|
| 501 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/clip-detection */ |
---|
514 | 502 | static void b43_nphy_read_clip_detection(struct b43_wldev *dev, u16 *clip_st) |
---|
515 | 503 | { |
---|
516 | 504 | clip_st[0] = b43_phy_read(dev, B43_NPHY_C1_CLIP1THRES); |
---|
517 | 505 | clip_st[1] = b43_phy_read(dev, B43_NPHY_C2_CLIP1THRES); |
---|
518 | 506 | } |
---|
519 | 507 | |
---|
520 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/classifier */ |
---|
| 508 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/classifier */ |
---|
521 | 509 | static u16 b43_nphy_classifier(struct b43_wldev *dev, u16 mask, u16 val) |
---|
522 | 510 | { |
---|
523 | 511 | u16 tmp; |
---|
.. | .. |
---|
538 | 526 | return tmp; |
---|
539 | 527 | } |
---|
540 | 528 | |
---|
541 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CCA */ |
---|
| 529 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/CCA */ |
---|
542 | 530 | static void b43_nphy_reset_cca(struct b43_wldev *dev) |
---|
543 | 531 | { |
---|
544 | 532 | u16 bbcfg; |
---|
.. | .. |
---|
552 | 540 | b43_nphy_force_rf_sequence(dev, B43_RFSEQ_RESET2RX); |
---|
553 | 541 | } |
---|
554 | 542 | |
---|
555 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/carriersearch */ |
---|
| 543 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/carriersearch */ |
---|
556 | 544 | static void b43_nphy_stay_in_carrier_search(struct b43_wldev *dev, bool enable) |
---|
557 | 545 | { |
---|
558 | 546 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
576 | 564 | } |
---|
577 | 565 | } |
---|
578 | 566 | |
---|
579 | | -/* http://bcm-v4.sipsolutions.net/PHY/N/Read_Lpf_Bw_Ctl */ |
---|
| 567 | +/* https://bcm-v4.sipsolutions.net/PHY/N/Read_Lpf_Bw_Ctl */ |
---|
580 | 568 | static u16 b43_nphy_read_lpf_ctl(struct b43_wldev *dev, u16 offset) |
---|
581 | 569 | { |
---|
582 | 570 | if (!offset) |
---|
.. | .. |
---|
584 | 572 | return b43_ntab_read(dev, B43_NTAB16(7, offset)) & 0x7; |
---|
585 | 573 | } |
---|
586 | 574 | |
---|
587 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/AdjustLnaGainTbl */ |
---|
| 575 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/AdjustLnaGainTbl */ |
---|
588 | 576 | static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev) |
---|
589 | 577 | { |
---|
590 | 578 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
594 | 582 | u16 data[4]; |
---|
595 | 583 | s16 gain[2]; |
---|
596 | 584 | u16 minmax[2]; |
---|
597 | | - static const u16 lna_gain[4] = { -2, 10, 19, 25 }; |
---|
| 585 | + static const s16 lna_gain[4] = { -2, 10, 19, 25 }; |
---|
598 | 586 | |
---|
599 | 587 | if (nphy->hang_avoid) |
---|
600 | 588 | b43_nphy_stay_in_carrier_search(dev, 1); |
---|
.. | .. |
---|
640 | 628 | b43_nphy_stay_in_carrier_search(dev, 0); |
---|
641 | 629 | } |
---|
642 | 630 | |
---|
643 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SetRfSeq */ |
---|
| 631 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/SetRfSeq */ |
---|
644 | 632 | static void b43_nphy_set_rf_sequence(struct b43_wldev *dev, u8 cmd, |
---|
645 | 633 | u8 *events, u8 *delays, u8 length) |
---|
646 | 634 | { |
---|
.. | .. |
---|
817 | 805 | } |
---|
818 | 806 | |
---|
819 | 807 | /* Calibrate resistors in LPF of PLL? |
---|
820 | | - * http://bcm-v4.sipsolutions.net/PHY/radio205x_rcal |
---|
| 808 | + * https://bcm-v4.sipsolutions.net/PHY/radio205x_rcal |
---|
821 | 809 | */ |
---|
822 | 810 | static u8 b43_radio_2057_rcal(struct b43_wldev *dev) |
---|
823 | 811 | { |
---|
.. | .. |
---|
931 | 919 | } |
---|
932 | 920 | |
---|
933 | 921 | /* Calibrate the internal RC oscillator? |
---|
934 | | - * http://bcm-v4.sipsolutions.net/PHY/radio2057_rccal |
---|
| 922 | + * https://bcm-v4.sipsolutions.net/PHY/radio2057_rccal |
---|
935 | 923 | */ |
---|
936 | 924 | static u16 b43_radio_2057_rccal(struct b43_wldev *dev) |
---|
937 | 925 | { |
---|
.. | .. |
---|
1042 | 1030 | b43_radio_mask(dev, R2057_RFPLL_MASTER, ~0x8); |
---|
1043 | 1031 | } |
---|
1044 | 1032 | |
---|
1045 | | -/* http://bcm-v4.sipsolutions.net/802.11/Radio/2057/Init */ |
---|
| 1033 | +/* https://bcm-v4.sipsolutions.net/802.11/Radio/2057/Init */ |
---|
1046 | 1034 | static void b43_radio_2057_init(struct b43_wldev *dev) |
---|
1047 | 1035 | { |
---|
1048 | 1036 | b43_radio_2057_init_pre(dev); |
---|
.. | .. |
---|
1129 | 1117 | e->radio_tx1_mixg_boost_tune); |
---|
1130 | 1118 | } |
---|
1131 | 1119 | |
---|
1132 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/Radio/2056Setup */ |
---|
| 1120 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/Radio/2056Setup */ |
---|
1133 | 1121 | static void b43_radio_2056_setup(struct b43_wldev *dev, |
---|
1134 | 1122 | const struct b43_nphy_channeltab_entry_rev3 *e) |
---|
1135 | 1123 | { |
---|
.. | .. |
---|
1368 | 1356 | |
---|
1369 | 1357 | /* |
---|
1370 | 1358 | * Initialize a Broadcom 2056 N-radio |
---|
1371 | | - * http://bcm-v4.sipsolutions.net/802.11/Radio/2056/Init |
---|
| 1359 | + * https://bcm-v4.sipsolutions.net/802.11/Radio/2056/Init |
---|
1372 | 1360 | */ |
---|
1373 | 1361 | static void b43_radio_init2056(struct b43_wldev *dev) |
---|
1374 | 1362 | { |
---|
.. | .. |
---|
1418 | 1406 | b43_radio_write(dev, B2055_C2_TX_MXBGTRIM, e->radio_c2_tx_mxbgtrim); |
---|
1419 | 1407 | } |
---|
1420 | 1408 | |
---|
1421 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/Radio/2055Setup */ |
---|
| 1409 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/Radio/2055Setup */ |
---|
1422 | 1410 | static void b43_radio_2055_setup(struct b43_wldev *dev, |
---|
1423 | 1411 | const struct b43_nphy_channeltab_entry_rev2 *e) |
---|
1424 | 1412 | { |
---|
.. | .. |
---|
1492 | 1480 | |
---|
1493 | 1481 | /* |
---|
1494 | 1482 | * Initialize a Broadcom 2055 N-radio |
---|
1495 | | - * http://bcm-v4.sipsolutions.net/802.11/Radio/2055/Init |
---|
| 1483 | + * https://bcm-v4.sipsolutions.net/802.11/Radio/2055/Init |
---|
1496 | 1484 | */ |
---|
1497 | 1485 | static void b43_radio_init2055(struct b43_wldev *dev) |
---|
1498 | 1486 | { |
---|
.. | .. |
---|
1511 | 1499 | * Samples |
---|
1512 | 1500 | **************************************************/ |
---|
1513 | 1501 | |
---|
1514 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/LoadSampleTable */ |
---|
| 1502 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/LoadSampleTable */ |
---|
1515 | 1503 | static int b43_nphy_load_samples(struct b43_wldev *dev, |
---|
1516 | | - struct b43_c32 *samples, u16 len) { |
---|
| 1504 | + struct cordic_iq *samples, u16 len) { |
---|
1517 | 1505 | struct b43_phy_n *nphy = dev->phy.n; |
---|
1518 | 1506 | u16 i; |
---|
1519 | 1507 | u32 *data; |
---|
.. | .. |
---|
1538 | 1526 | return 0; |
---|
1539 | 1527 | } |
---|
1540 | 1528 | |
---|
1541 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/GenLoadSamples */ |
---|
| 1529 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/GenLoadSamples */ |
---|
1542 | 1530 | static u16 b43_nphy_gen_load_samples(struct b43_wldev *dev, u32 freq, u16 max, |
---|
1543 | 1531 | bool test) |
---|
1544 | 1532 | { |
---|
1545 | 1533 | int i; |
---|
1546 | 1534 | u16 bw, len, rot, angle; |
---|
1547 | | - struct b43_c32 *samples; |
---|
| 1535 | + struct cordic_iq *samples; |
---|
1548 | 1536 | |
---|
1549 | 1537 | bw = b43_is_40mhz(dev) ? 40 : 20; |
---|
1550 | 1538 | len = bw << 3; |
---|
.. | .. |
---|
1561 | 1549 | len = bw << 1; |
---|
1562 | 1550 | } |
---|
1563 | 1551 | |
---|
1564 | | - samples = kcalloc(len, sizeof(struct b43_c32), GFP_KERNEL); |
---|
| 1552 | + samples = kcalloc(len, sizeof(struct cordic_iq), GFP_KERNEL); |
---|
1565 | 1553 | if (!samples) { |
---|
1566 | 1554 | b43err(dev->wl, "allocation for samples generation failed\n"); |
---|
1567 | 1555 | return 0; |
---|
.. | .. |
---|
1570 | 1558 | angle = 0; |
---|
1571 | 1559 | |
---|
1572 | 1560 | for (i = 0; i < len; i++) { |
---|
1573 | | - samples[i] = b43_cordic(angle); |
---|
| 1561 | + samples[i] = cordic_calc_iq(CORDIC_FIXED(angle)); |
---|
1574 | 1562 | angle += rot; |
---|
1575 | | - samples[i].q = CORDIC_CONVERT(samples[i].q * max); |
---|
1576 | | - samples[i].i = CORDIC_CONVERT(samples[i].i * max); |
---|
| 1563 | + samples[i].q = CORDIC_FLOAT(samples[i].q * max); |
---|
| 1564 | + samples[i].i = CORDIC_FLOAT(samples[i].i * max); |
---|
1577 | 1565 | } |
---|
1578 | 1566 | |
---|
1579 | 1567 | i = b43_nphy_load_samples(dev, samples, len); |
---|
.. | .. |
---|
1581 | 1569 | return (i < 0) ? 0 : len; |
---|
1582 | 1570 | } |
---|
1583 | 1571 | |
---|
1584 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RunSamples */ |
---|
| 1572 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RunSamples */ |
---|
1585 | 1573 | static void b43_nphy_run_samples(struct b43_wldev *dev, u16 samps, u16 loops, |
---|
1586 | 1574 | u16 wait, bool iqmode, bool dac_test, |
---|
1587 | 1575 | bool modify_bbmult) |
---|
.. | .. |
---|
1662 | 1650 | * RSSI |
---|
1663 | 1651 | **************************************************/ |
---|
1664 | 1652 | |
---|
1665 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ScaleOffsetRssi */ |
---|
| 1653 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/ScaleOffsetRssi */ |
---|
1666 | 1654 | static void b43_nphy_scale_offset_rssi(struct b43_wldev *dev, u16 scale, |
---|
1667 | 1655 | s8 offset, u8 core, |
---|
1668 | 1656 | enum n_rail_type rail, |
---|
.. | .. |
---|
1907 | 1895 | } |
---|
1908 | 1896 | } |
---|
1909 | 1897 | |
---|
1910 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSISel */ |
---|
| 1898 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSISel */ |
---|
1911 | 1899 | static void b43_nphy_rssi_select(struct b43_wldev *dev, u8 code, |
---|
1912 | 1900 | enum n_rssi_type type) |
---|
1913 | 1901 | { |
---|
.. | .. |
---|
1919 | 1907 | b43_nphy_rev2_rssi_select(dev, code, type); |
---|
1920 | 1908 | } |
---|
1921 | 1909 | |
---|
1922 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SetRssi2055Vcm */ |
---|
| 1910 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/SetRssi2055Vcm */ |
---|
1923 | 1911 | static void b43_nphy_set_rssi_2055_vcm(struct b43_wldev *dev, |
---|
1924 | 1912 | enum n_rssi_type rssi_type, u8 *buf) |
---|
1925 | 1913 | { |
---|
.. | .. |
---|
1948 | 1936 | } |
---|
1949 | 1937 | } |
---|
1950 | 1938 | |
---|
1951 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/PollRssi */ |
---|
| 1939 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/PollRssi */ |
---|
1952 | 1940 | static int b43_nphy_poll_rssi(struct b43_wldev *dev, enum n_rssi_type rssi_type, |
---|
1953 | 1941 | s32 *buf, u8 nsamp) |
---|
1954 | 1942 | { |
---|
.. | .. |
---|
2037 | 2025 | return out; |
---|
2038 | 2026 | } |
---|
2039 | 2027 | |
---|
2040 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICalRev3 */ |
---|
| 2028 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICalRev3 */ |
---|
2041 | 2029 | static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) |
---|
2042 | 2030 | { |
---|
2043 | 2031 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
2299 | 2287 | b43_nphy_write_clip_detection(dev, clip_state); |
---|
2300 | 2288 | } |
---|
2301 | 2289 | |
---|
2302 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICal */ |
---|
| 2290 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICal */ |
---|
2303 | 2291 | static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, enum n_rssi_type type) |
---|
2304 | 2292 | { |
---|
2305 | 2293 | int i, j, vcm; |
---|
.. | .. |
---|
2465 | 2453 | |
---|
2466 | 2454 | /* |
---|
2467 | 2455 | * RSSI Calibration |
---|
2468 | | - * http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICal |
---|
| 2456 | + * https://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICal |
---|
2469 | 2457 | */ |
---|
2470 | 2458 | static void b43_nphy_rssi_cal(struct b43_wldev *dev) |
---|
2471 | 2459 | { |
---|
.. | .. |
---|
2692 | 2680 | b43_phy_maskset(dev, B43_PHY_N(0xC5D), 0xFF80, 4); |
---|
2693 | 2681 | } |
---|
2694 | 2682 | |
---|
2695 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/WorkaroundsGainCtrl */ |
---|
| 2683 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/WorkaroundsGainCtrl */ |
---|
2696 | 2684 | static void b43_nphy_gain_ctl_workarounds(struct b43_wldev *dev) |
---|
2697 | 2685 | { |
---|
2698 | 2686 | if (dev->phy.rev >= 19) |
---|
.. | .. |
---|
3251 | 3239 | if (!(dev->phy.rev >= 4 && |
---|
3252 | 3240 | b43_current_band(dev->wl) == NL80211_BAND_2GHZ)) |
---|
3253 | 3241 | break; |
---|
3254 | | - /* FALL THROUGH */ |
---|
| 3242 | + fallthrough; |
---|
3255 | 3243 | case 0: |
---|
3256 | 3244 | case 1: |
---|
3257 | 3245 | b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x08), 4, vmid); |
---|
.. | .. |
---|
3354 | 3342 | b43_phy_write(dev, B43_NPHY_ED_CRS20UDEASSERTTHRESH0, 0x0381); |
---|
3355 | 3343 | b43_phy_write(dev, B43_NPHY_ED_CRS20UDEASSERTTHRESH1, 0x0381); |
---|
3356 | 3344 | |
---|
3357 | | - if (dev->phy.rev >= 6 && sprom->boardflags2_lo & B43_BFL2_SINGLEANT_CCK) |
---|
| 3345 | + if (dev->phy.rev >= 6 && sprom->boardflags2_lo & B43_BFL2_SINGLEANT_CCK) { |
---|
3358 | 3346 | ; /* TODO: 0x0080000000000000 HF */ |
---|
| 3347 | + } |
---|
3359 | 3348 | } |
---|
3360 | 3349 | |
---|
3361 | 3350 | static void b43_nphy_workarounds_rev1_2(struct b43_wldev *dev) |
---|
.. | .. |
---|
3445 | 3434 | B43_NPHY_FINERX2_CGC_DECGC); |
---|
3446 | 3435 | } |
---|
3447 | 3436 | |
---|
3448 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Workarounds */ |
---|
| 3437 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/Workarounds */ |
---|
3449 | 3438 | static void b43_nphy_workarounds(struct b43_wldev *dev) |
---|
3450 | 3439 | { |
---|
3451 | 3440 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
3480 | 3469 | |
---|
3481 | 3470 | /* |
---|
3482 | 3471 | * Transmits a known value for LO calibration |
---|
3483 | | - * http://bcm-v4.sipsolutions.net/802.11/PHY/N/TXTone |
---|
| 3472 | + * https://bcm-v4.sipsolutions.net/802.11/PHY/N/TXTone |
---|
3484 | 3473 | */ |
---|
3485 | 3474 | static int b43_nphy_tx_tone(struct b43_wldev *dev, u32 freq, u16 max_val, |
---|
3486 | 3475 | bool iqmode, bool dac_test, bool modify_bbmult) |
---|
.. | .. |
---|
3493 | 3482 | return 0; |
---|
3494 | 3483 | } |
---|
3495 | 3484 | |
---|
3496 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/Chains */ |
---|
| 3485 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/Chains */ |
---|
3497 | 3486 | static void b43_nphy_update_txrx_chain(struct b43_wldev *dev) |
---|
3498 | 3487 | { |
---|
3499 | 3488 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
3521 | 3510 | ~B43_NPHY_RFSEQMODE_CAOVER); |
---|
3522 | 3511 | } |
---|
3523 | 3512 | |
---|
3524 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/stop-playback */ |
---|
| 3513 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/stop-playback */ |
---|
3525 | 3514 | static void b43_nphy_stop_playback(struct b43_wldev *dev) |
---|
3526 | 3515 | { |
---|
3527 | 3516 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
3558 | 3547 | b43_nphy_stay_in_carrier_search(dev, 0); |
---|
3559 | 3548 | } |
---|
3560 | 3549 | |
---|
3561 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/IqCalGainParams */ |
---|
| 3550 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/IqCalGainParams */ |
---|
3562 | 3551 | static void b43_nphy_iq_cal_gain_params(struct b43_wldev *dev, u16 core, |
---|
3563 | 3552 | struct nphy_txgains target, |
---|
3564 | 3553 | struct nphy_iqcal_params *params) |
---|
.. | .. |
---|
3607 | 3596 | * Tx and Rx |
---|
3608 | 3597 | **************************************************/ |
---|
3609 | 3598 | |
---|
3610 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlEnable */ |
---|
| 3599 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlEnable */ |
---|
3611 | 3600 | static void b43_nphy_tx_power_ctrl(struct b43_wldev *dev, bool enable) |
---|
3612 | 3601 | { |
---|
3613 | 3602 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
3744 | 3733 | b43_nphy_stay_in_carrier_search(dev, 0); |
---|
3745 | 3734 | } |
---|
3746 | 3735 | |
---|
3747 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrFix */ |
---|
| 3736 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrFix */ |
---|
3748 | 3737 | static void b43_nphy_tx_power_fix(struct b43_wldev *dev) |
---|
3749 | 3738 | { |
---|
3750 | 3739 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
3938 | 3927 | /* |
---|
3939 | 3928 | * Stop radio and transmit known signal. Then check received signal strength to |
---|
3940 | 3929 | * get TSSI (Transmit Signal Strength Indicator). |
---|
3941 | | - * http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlIdleTssi |
---|
| 3930 | + * https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlIdleTssi |
---|
3942 | 3931 | */ |
---|
3943 | 3932 | static void b43_nphy_tx_power_ctl_idle_tssi(struct b43_wldev *dev) |
---|
3944 | 3933 | { |
---|
.. | .. |
---|
3990 | 3979 | nphy->pwr_ctl_info[1].idle_tssi_2g = (tmp >> 8) & 0xFF; |
---|
3991 | 3980 | } |
---|
3992 | 3981 | |
---|
3993 | | -/* http://bcm-v4.sipsolutions.net/PHY/N/TxPwrLimitToTbl */ |
---|
| 3982 | +/* https://bcm-v4.sipsolutions.net/PHY/N/TxPwrLimitToTbl */ |
---|
3994 | 3983 | static void b43_nphy_tx_prepare_adjusted_power_table(struct b43_wldev *dev) |
---|
3995 | 3984 | { |
---|
3996 | 3985 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
4051 | 4040 | } |
---|
4052 | 4041 | } |
---|
4053 | 4042 | |
---|
4054 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlSetup */ |
---|
| 4043 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlSetup */ |
---|
4055 | 4044 | static void b43_nphy_tx_power_ctl_setup(struct b43_wldev *dev) |
---|
4056 | 4045 | { |
---|
4057 | 4046 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
4234 | 4223 | u32 rfpwr_offset; |
---|
4235 | 4224 | u8 pga_gain, pad_gain; |
---|
4236 | 4225 | int i; |
---|
4237 | | - const s16 *uninitialized_var(rf_pwr_offset_table); |
---|
| 4226 | + const s16 *rf_pwr_offset_table = NULL; |
---|
4238 | 4227 | |
---|
4239 | 4228 | table = b43_nphy_get_tx_gain_table(dev); |
---|
4240 | 4229 | if (!table) |
---|
.. | .. |
---|
4284 | 4273 | } |
---|
4285 | 4274 | } |
---|
4286 | 4275 | |
---|
4287 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/PA%20override */ |
---|
| 4276 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/PA%20override */ |
---|
4288 | 4277 | static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable) |
---|
4289 | 4278 | { |
---|
4290 | 4279 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
4322 | 4311 | |
---|
4323 | 4312 | /* |
---|
4324 | 4313 | * TX low-pass filter bandwidth setup |
---|
4325 | | - * http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxLpFbw |
---|
| 4314 | + * https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxLpFbw |
---|
4326 | 4315 | */ |
---|
4327 | 4316 | static void b43_nphy_tx_lpf_bw(struct b43_wldev *dev) |
---|
4328 | 4317 | { |
---|
.. | .. |
---|
4345 | 4334 | } |
---|
4346 | 4335 | } |
---|
4347 | 4336 | |
---|
4348 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqEst */ |
---|
| 4337 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqEst */ |
---|
4349 | 4338 | static void b43_nphy_rx_iq_est(struct b43_wldev *dev, struct nphy_iq_est *est, |
---|
4350 | 4339 | u16 samps, u8 time, bool wait) |
---|
4351 | 4340 | { |
---|
.. | .. |
---|
4384 | 4373 | memset(est, 0, sizeof(*est)); |
---|
4385 | 4374 | } |
---|
4386 | 4375 | |
---|
4387 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqCoeffs */ |
---|
| 4376 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RxIqCoeffs */ |
---|
4388 | 4377 | static void b43_nphy_rx_iq_coeffs(struct b43_wldev *dev, bool write, |
---|
4389 | 4378 | struct b43_phy_n_iq_comp *pcomp) |
---|
4390 | 4379 | { |
---|
.. | .. |
---|
4403 | 4392 | |
---|
4404 | 4393 | #if 0 |
---|
4405 | 4394 | /* Ready but not used anywhere */ |
---|
4406 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCalPhyCleanup */ |
---|
| 4395 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCalPhyCleanup */ |
---|
4407 | 4396 | static void b43_nphy_rx_cal_phy_cleanup(struct b43_wldev *dev, u8 core) |
---|
4408 | 4397 | { |
---|
4409 | 4398 | u16 *regs = dev->phy.n->tx_rx_cal_phy_saveregs; |
---|
.. | .. |
---|
4426 | 4415 | b43_phy_write(dev, B43_NPHY_PAPD_EN1, regs[10]); |
---|
4427 | 4416 | } |
---|
4428 | 4417 | |
---|
4429 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCalPhySetup */ |
---|
| 4418 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCalPhySetup */ |
---|
4430 | 4419 | static void b43_nphy_rx_cal_phy_setup(struct b43_wldev *dev, u8 core) |
---|
4431 | 4420 | { |
---|
4432 | 4421 | u8 rxval, txval; |
---|
.. | .. |
---|
4488 | 4477 | } |
---|
4489 | 4478 | #endif |
---|
4490 | 4479 | |
---|
4491 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CalcRxIqComp */ |
---|
| 4480 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/CalcRxIqComp */ |
---|
4492 | 4481 | static void b43_nphy_calc_rx_iq_comp(struct b43_wldev *dev, u8 mask) |
---|
4493 | 4482 | { |
---|
4494 | 4483 | int i; |
---|
.. | .. |
---|
4586 | 4575 | b43_nphy_rx_iq_coeffs(dev, true, &new); |
---|
4587 | 4576 | } |
---|
4588 | 4577 | |
---|
4589 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxIqWar */ |
---|
| 4578 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxIqWar */ |
---|
4590 | 4579 | static void b43_nphy_tx_iq_workaround(struct b43_wldev *dev) |
---|
4591 | 4580 | { |
---|
4592 | 4581 | u16 array[4]; |
---|
.. | .. |
---|
4598 | 4587 | b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_NPHY_TXIQW3, array[3]); |
---|
4599 | 4588 | } |
---|
4600 | 4589 | |
---|
4601 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SpurWar */ |
---|
| 4590 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/SpurWar */ |
---|
4602 | 4591 | static void b43_nphy_spur_workaround(struct b43_wldev *dev) |
---|
4603 | 4592 | { |
---|
4604 | 4593 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
4614 | 4603 | |
---|
4615 | 4604 | if (nphy->gband_spurwar_en) { |
---|
4616 | 4605 | /* TODO: N PHY Adjust Analog Pfbw (7) */ |
---|
4617 | | - if (channel == 11 && b43_is_40mhz(dev)) |
---|
| 4606 | + if (channel == 11 && b43_is_40mhz(dev)) { |
---|
4618 | 4607 | ; /* TODO: N PHY Adjust Min Noise Var(2, tone, noise)*/ |
---|
4619 | | - else |
---|
| 4608 | + } else { |
---|
4620 | 4609 | ; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/ |
---|
| 4610 | + } |
---|
4621 | 4611 | /* TODO: N PHY Adjust CRS Min Power (0x1E) */ |
---|
4622 | 4612 | } |
---|
4623 | 4613 | |
---|
.. | .. |
---|
4647 | 4637 | noise[0] = 0; |
---|
4648 | 4638 | } |
---|
4649 | 4639 | |
---|
4650 | | - if (!tone[0] && !noise[0]) |
---|
| 4640 | + if (!tone[0] && !noise[0]) { |
---|
4651 | 4641 | ; /* TODO: N PHY Adjust Min Noise Var(1, tone, noise)*/ |
---|
4652 | | - else |
---|
| 4642 | + } else { |
---|
4653 | 4643 | ; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/ |
---|
| 4644 | + } |
---|
4654 | 4645 | } |
---|
4655 | 4646 | |
---|
4656 | 4647 | if (nphy->hang_avoid) |
---|
4657 | 4648 | b43_nphy_stay_in_carrier_search(dev, 0); |
---|
4658 | 4649 | } |
---|
4659 | 4650 | |
---|
4660 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlCoefSetup */ |
---|
| 4651 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxPwrCtrlCoefSetup */ |
---|
4661 | 4652 | static void b43_nphy_tx_pwr_ctrl_coef_setup(struct b43_wldev *dev) |
---|
4662 | 4653 | { |
---|
4663 | 4654 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
4725 | 4716 | |
---|
4726 | 4717 | /* |
---|
4727 | 4718 | * Restore RSSI Calibration |
---|
4728 | | - * http://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreRssiCal |
---|
| 4719 | + * https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreRssiCal |
---|
4729 | 4720 | */ |
---|
4730 | 4721 | static void b43_nphy_restore_rssi_cal(struct b43_wldev *dev) |
---|
4731 | 4722 | { |
---|
.. | .. |
---|
4834 | 4825 | } |
---|
4835 | 4826 | } |
---|
4836 | 4827 | |
---|
4837 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxCalRadioSetup */ |
---|
| 4828 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxCalRadioSetup */ |
---|
4838 | 4829 | static void b43_nphy_tx_cal_radio_setup(struct b43_wldev *dev) |
---|
4839 | 4830 | { |
---|
4840 | 4831 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
4933 | 4924 | } |
---|
4934 | 4925 | } |
---|
4935 | 4926 | |
---|
4936 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/UpdateTxCalLadder */ |
---|
| 4927 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/UpdateTxCalLadder */ |
---|
4937 | 4928 | static void b43_nphy_update_tx_cal_ladder(struct b43_wldev *dev, u16 core) |
---|
4938 | 4929 | { |
---|
4939 | 4930 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
4967 | 4958 | b43_phy_write(dev, offset, filter[i]); |
---|
4968 | 4959 | } |
---|
4969 | 4960 | |
---|
4970 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ExtPaSetTxDigiFilts */ |
---|
| 4961 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/ExtPaSetTxDigiFilts */ |
---|
4971 | 4962 | static void b43_nphy_ext_pa_set_tx_dig_filters(struct b43_wldev *dev) |
---|
4972 | 4963 | { |
---|
4973 | 4964 | b43_nphy_pa_set_tx_dig_filter(dev, 0x2C5, |
---|
4974 | 4965 | tbl_tx_filter_coef_rev4[2]); |
---|
4975 | 4966 | } |
---|
4976 | 4967 | |
---|
4977 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/IpaSetTxDigiFilts */ |
---|
| 4968 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/IpaSetTxDigiFilts */ |
---|
4978 | 4969 | static void b43_nphy_int_pa_set_tx_dig_filters(struct b43_wldev *dev) |
---|
4979 | 4970 | { |
---|
4980 | 4971 | /* B43_NPHY_TXF_20CO_S0A1, B43_NPHY_TXF_40CO_S0A1, unknown */ |
---|
.. | .. |
---|
5014 | 5005 | } |
---|
5015 | 5006 | } |
---|
5016 | 5007 | |
---|
5017 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/GetTxGain */ |
---|
| 5008 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/GetTxGain */ |
---|
5018 | 5009 | static struct nphy_txgains b43_nphy_get_tx_gains(struct b43_wldev *dev) |
---|
5019 | 5010 | { |
---|
5020 | 5011 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
5089 | 5080 | return target; |
---|
5090 | 5081 | } |
---|
5091 | 5082 | |
---|
5092 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxCalPhyCleanup */ |
---|
| 5083 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxCalPhyCleanup */ |
---|
5093 | 5084 | static void b43_nphy_tx_cal_phy_cleanup(struct b43_wldev *dev) |
---|
5094 | 5085 | { |
---|
5095 | 5086 | u16 *regs = dev->phy.n->tx_rx_cal_phy_saveregs; |
---|
.. | .. |
---|
5118 | 5109 | } |
---|
5119 | 5110 | } |
---|
5120 | 5111 | |
---|
5121 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/TxCalPhySetup */ |
---|
| 5112 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/TxCalPhySetup */ |
---|
5122 | 5113 | static void b43_nphy_tx_cal_phy_setup(struct b43_wldev *dev) |
---|
5123 | 5114 | { |
---|
5124 | 5115 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
5219 | 5210 | } |
---|
5220 | 5211 | } |
---|
5221 | 5212 | |
---|
5222 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SaveCal */ |
---|
| 5213 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/SaveCal */ |
---|
5223 | 5214 | static void b43_nphy_save_cal(struct b43_wldev *dev) |
---|
5224 | 5215 | { |
---|
5225 | 5216 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
5290 | 5281 | b43_nphy_stay_in_carrier_search(dev, 0); |
---|
5291 | 5282 | } |
---|
5292 | 5283 | |
---|
5293 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal */ |
---|
| 5284 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RestoreCal */ |
---|
5294 | 5285 | static void b43_nphy_restore_cal(struct b43_wldev *dev) |
---|
5295 | 5286 | { |
---|
5296 | 5287 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
5378 | 5369 | b43_nphy_rx_iq_coeffs(dev, true, rxcal_coeffs); |
---|
5379 | 5370 | } |
---|
5380 | 5371 | |
---|
5381 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CalTxIqlo */ |
---|
| 5372 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/CalTxIqlo */ |
---|
5382 | 5373 | static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev, |
---|
5383 | 5374 | struct nphy_txgains target, |
---|
5384 | 5375 | bool full, bool mphase) |
---|
.. | .. |
---|
5519 | 5510 | core = (cmd & 0x3000) >> 12; |
---|
5520 | 5511 | type = (cmd & 0x0F00) >> 8; |
---|
5521 | 5512 | |
---|
5522 | | - if (phy6or5x && updated[core] == 0) { |
---|
| 5513 | + if (phy6or5x && !updated[core]) { |
---|
5523 | 5514 | b43_nphy_update_tx_cal_ladder(dev, core); |
---|
5524 | 5515 | updated[core] = true; |
---|
5525 | 5516 | } |
---|
.. | .. |
---|
5611 | 5602 | return error; |
---|
5612 | 5603 | } |
---|
5613 | 5604 | |
---|
5614 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ReapplyTxCalCoeffs */ |
---|
| 5605 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/ReapplyTxCalCoeffs */ |
---|
5615 | 5606 | static void b43_nphy_reapply_tx_cal_coeffs(struct b43_wldev *dev) |
---|
5616 | 5607 | { |
---|
5617 | 5608 | struct b43_phy_n *nphy = dev->phy.n; |
---|
.. | .. |
---|
5646 | 5637 | } |
---|
5647 | 5638 | } |
---|
5648 | 5639 | |
---|
5649 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CalRxIqRev2 */ |
---|
| 5640 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/CalRxIqRev2 */ |
---|
5650 | 5641 | static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev, |
---|
5651 | 5642 | struct nphy_txgains target, u8 type, bool debug) |
---|
5652 | 5643 | { |
---|
.. | .. |
---|
5655 | 5646 | u8 rfctl[2]; |
---|
5656 | 5647 | u8 afectl_core; |
---|
5657 | 5648 | u16 tmp[6]; |
---|
5658 | | - u16 uninitialized_var(cur_hpf1), uninitialized_var(cur_hpf2), cur_lna; |
---|
| 5649 | + u16 cur_hpf1, cur_hpf2, cur_lna; |
---|
5659 | 5650 | u32 real, imag; |
---|
5660 | 5651 | enum nl80211_band band; |
---|
5661 | 5652 | |
---|
.. | .. |
---|
5833 | 5824 | return -1; |
---|
5834 | 5825 | } |
---|
5835 | 5826 | |
---|
5836 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/CalRxIq */ |
---|
| 5827 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/CalRxIq */ |
---|
5837 | 5828 | static int b43_nphy_cal_rx_iq(struct b43_wldev *dev, |
---|
5838 | 5829 | struct nphy_txgains target, u8 type, bool debug) |
---|
5839 | 5830 | { |
---|
.. | .. |
---|
5846 | 5837 | return b43_nphy_rev2_cal_rx_iq(dev, target, type, debug); |
---|
5847 | 5838 | } |
---|
5848 | 5839 | |
---|
5849 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreSetState */ |
---|
| 5840 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreSetState */ |
---|
5850 | 5841 | static void b43_nphy_set_rx_core_state(struct b43_wldev *dev, u8 mask) |
---|
5851 | 5842 | { |
---|
5852 | 5843 | struct b43_phy *phy = &dev->phy; |
---|
.. | .. |
---|
5894 | 5885 | struct ieee80211_channel *channel = dev->wl->hw->conf.chandef.chan; |
---|
5895 | 5886 | struct b43_ppr *ppr = &nphy->tx_pwr_max_ppr; |
---|
5896 | 5887 | u8 max; /* qdBm */ |
---|
5897 | | - bool tx_pwr_state; |
---|
5898 | 5888 | |
---|
5899 | 5889 | if (nphy->tx_pwr_last_recalc_freq == channel->center_freq && |
---|
5900 | 5890 | nphy->tx_pwr_last_recalc_limit == phy->desired_txpower) |
---|
.. | .. |
---|
5930 | 5920 | b43_ppr_apply_min(dev, ppr, INT_TO_Q52(8)); |
---|
5931 | 5921 | |
---|
5932 | 5922 | /* Apply */ |
---|
5933 | | - tx_pwr_state = nphy->txpwrctrl; |
---|
5934 | 5923 | b43_mac_suspend(dev); |
---|
5935 | 5924 | b43_nphy_tx_power_ctl_setup(dev); |
---|
5936 | 5925 | if (dev->dev->core_rev == 11 || dev->dev->core_rev == 12) { |
---|
.. | .. |
---|
5953 | 5942 | * N-PHY init |
---|
5954 | 5943 | **************************************************/ |
---|
5955 | 5944 | |
---|
5956 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/MIMOConfig */ |
---|
| 5945 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/MIMOConfig */ |
---|
5957 | 5946 | static void b43_nphy_update_mimo_config(struct b43_wldev *dev, s32 preamble) |
---|
5958 | 5947 | { |
---|
5959 | 5948 | u16 mimocfg = b43_phy_read(dev, B43_NPHY_MIMOCFG); |
---|
.. | .. |
---|
5967 | 5956 | b43_phy_write(dev, B43_NPHY_MIMOCFG, mimocfg); |
---|
5968 | 5957 | } |
---|
5969 | 5958 | |
---|
5970 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BPHYInit */ |
---|
| 5959 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/BPHYInit */ |
---|
5971 | 5960 | static void b43_nphy_bphy_init(struct b43_wldev *dev) |
---|
5972 | 5961 | { |
---|
5973 | 5962 | unsigned int i; |
---|
.. | .. |
---|
5986 | 5975 | b43_phy_write(dev, B43_PHY_N_BMODE(0x38), 0x668); |
---|
5987 | 5976 | } |
---|
5988 | 5977 | |
---|
5989 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SuperSwitchInit */ |
---|
| 5978 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/SuperSwitchInit */ |
---|
5990 | 5979 | static void b43_nphy_superswitch_init(struct b43_wldev *dev, bool init) |
---|
5991 | 5980 | { |
---|
5992 | 5981 | if (dev->phy.rev >= 7) |
---|
.. | .. |
---|
6043 | 6032 | u8 tx_pwr_state; |
---|
6044 | 6033 | struct nphy_txgains target; |
---|
6045 | 6034 | u16 tmp; |
---|
6046 | | - enum nl80211_band tmp2; |
---|
6047 | 6035 | bool do_rssi_cal; |
---|
6048 | 6036 | |
---|
6049 | 6037 | u16 clip[2]; |
---|
.. | .. |
---|
6137 | 6125 | b43_phy_write(dev, B43_NPHY_DUP40_BL, 0x9A4); |
---|
6138 | 6126 | } |
---|
6139 | 6127 | |
---|
6140 | | - tmp2 = b43_current_band(dev->wl); |
---|
6141 | 6128 | if (b43_nphy_ipa(dev)) { |
---|
6142 | 6129 | b43_phy_set(dev, B43_NPHY_PAPD_EN0, 0x1); |
---|
6143 | 6130 | b43_phy_maskset(dev, B43_NPHY_EPS_TABLE_ADJ0, 0x007F, |
---|
.. | .. |
---|
6182 | 6169 | |
---|
6183 | 6170 | if (nphy->phyrxchain != 3) |
---|
6184 | 6171 | b43_nphy_set_rx_core_state(dev, nphy->phyrxchain); |
---|
6185 | | - if (nphy->mphase_cal_phase_id > 0) |
---|
| 6172 | + if (nphy->mphase_cal_phase_id > 0) { |
---|
6186 | 6173 | ;/* TODO PHY Periodic Calibration Multi-Phase Restart */ |
---|
| 6174 | + } |
---|
6187 | 6175 | |
---|
6188 | 6176 | do_rssi_cal = false; |
---|
6189 | 6177 | if (phy->rev >= 3) { |
---|
.. | .. |
---|
6227 | 6215 | if (!b43_nphy_cal_tx_iq_lo(dev, target, true, false)) |
---|
6228 | 6216 | if (b43_nphy_cal_rx_iq(dev, target, 2, 0) == 0) |
---|
6229 | 6217 | b43_nphy_save_cal(dev); |
---|
6230 | | - } else if (nphy->mphase_cal_phase_id == 0) |
---|
| 6218 | + } else if (nphy->mphase_cal_phase_id == 0) { |
---|
6231 | 6219 | ;/* N PHY Periodic Calibration with arg 3 */ |
---|
| 6220 | + } |
---|
6232 | 6221 | } else { |
---|
6233 | 6222 | b43_nphy_restore_cal(dev); |
---|
6234 | 6223 | } |
---|
.. | .. |
---|
6262 | 6251 | b43_phy_write(dev, B43_NPHY_BW6, e->phy_bw6); |
---|
6263 | 6252 | } |
---|
6264 | 6253 | |
---|
6265 | | -/* http://bcm-v4.sipsolutions.net/802.11/PmuSpurAvoid */ |
---|
| 6254 | +/* https://bcm-v4.sipsolutions.net/802.11/PmuSpurAvoid */ |
---|
6266 | 6255 | static void b43_nphy_pmu_spur_avoid(struct b43_wldev *dev, bool avoid) |
---|
6267 | 6256 | { |
---|
6268 | 6257 | switch (dev->dev->bus_type) { |
---|
.. | .. |
---|
6281 | 6270 | } |
---|
6282 | 6271 | } |
---|
6283 | 6272 | |
---|
6284 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ChanspecSetup */ |
---|
| 6273 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/ChanspecSetup */ |
---|
6285 | 6274 | static void b43_nphy_channel_setup(struct b43_wldev *dev, |
---|
6286 | 6275 | const struct b43_phy_n_sfo_cfg *e, |
---|
6287 | 6276 | struct ieee80211_channel *new_channel) |
---|
.. | .. |
---|
6388 | 6377 | b43_nphy_spur_workaround(dev); |
---|
6389 | 6378 | } |
---|
6390 | 6379 | |
---|
6391 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/SetChanspec */ |
---|
| 6380 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/SetChanspec */ |
---|
6392 | 6381 | static int b43_nphy_set_channel(struct b43_wldev *dev, |
---|
6393 | 6382 | struct ieee80211_channel *channel, |
---|
6394 | 6383 | enum nl80211_channel_type channel_type) |
---|
.. | .. |
---|
6605 | 6594 | b43_write16(dev, B43_MMIO_RADIO_DATA_LOW, value); |
---|
6606 | 6595 | } |
---|
6607 | 6596 | |
---|
6608 | | -/* http://bcm-v4.sipsolutions.net/802.11/Radio/Switch%20Radio */ |
---|
| 6597 | +/* https://bcm-v4.sipsolutions.net/802.11/Radio/Switch%20Radio */ |
---|
6609 | 6598 | static void b43_nphy_op_software_rfkill(struct b43_wldev *dev, |
---|
6610 | 6599 | bool blocked) |
---|
6611 | 6600 | { |
---|
.. | .. |
---|
6659 | 6648 | } |
---|
6660 | 6649 | } |
---|
6661 | 6650 | |
---|
6662 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/Anacore */ |
---|
| 6651 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/Anacore */ |
---|
6663 | 6652 | static void b43_nphy_op_switch_analog(struct b43_wldev *dev, bool on) |
---|
6664 | 6653 | { |
---|
6665 | 6654 | struct b43_phy *phy = &dev->phy; |
---|