hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/wireless/broadcom/b43/phy_common.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23
34 Broadcom B43 wireless driver
....@@ -9,20 +10,6 @@
910 Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org>
1011 Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch>
1112
12
- This program is free software; you can redistribute it and/or modify
13
- it under the terms of the GNU General Public License as published by
14
- the Free Software Foundation; either version 2 of the License, or
15
- (at your option) any later version.
16
-
17
- This program is distributed in the hope that it will be useful,
18
- but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
- GNU General Public License for more details.
21
-
22
- You should have received a copy of the GNU General Public License
23
- along with this program; see the file COPYING. If not, write to
24
- the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
25
- Boston, MA 02110-1301, USA.
2613
2714 */
2815
....@@ -471,7 +458,7 @@
471458 b43_mac_enable(dev);
472459 }
473460
474
-/**
461
+/*
475462 * b43_phy_txpower_adjust_work - TX power workqueue.
476463 *
477464 * Workqueue for updating the TX power parameters in hardware.
....@@ -572,7 +559,7 @@
572559 return dev->phy.chandef->width == NL80211_CHAN_WIDTH_40;
573560 }
574561
575
-/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */
562
+/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */
576563 void b43_phy_force_clock(struct b43_wldev *dev, bool force)
577564 {
578565 u32 tmp;
....@@ -603,51 +590,4 @@
603590 break;
604591 #endif
605592 }
606
-}
607
-
608
-/* http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic */
609
-struct b43_c32 b43_cordic(int theta)
610
-{
611
- static const u32 arctg[] = {
612
- 2949120, 1740967, 919879, 466945, 234379, 117304,
613
- 58666, 29335, 14668, 7334, 3667, 1833,
614
- 917, 458, 229, 115, 57, 29,
615
- };
616
- u8 i;
617
- s32 tmp;
618
- s8 signx = 1;
619
- s32 angle = 0;
620
- struct b43_c32 ret = { .i = 39797, .q = 0, };
621
-
622
- while (theta > (180 << 16))
623
- theta -= (360 << 16);
624
- while (theta < -(180 << 16))
625
- theta += (360 << 16);
626
-
627
- if (theta > (90 << 16)) {
628
- theta -= (180 << 16);
629
- signx = -1;
630
- } else if (theta < -(90 << 16)) {
631
- theta += (180 << 16);
632
- signx = -1;
633
- }
634
-
635
- for (i = 0; i <= 17; i++) {
636
- if (theta > angle) {
637
- tmp = ret.i - (ret.q >> i);
638
- ret.q += ret.i >> i;
639
- ret.i = tmp;
640
- angle += arctg[i];
641
- } else {
642
- tmp = ret.i + (ret.q >> i);
643
- ret.q -= ret.i >> i;
644
- ret.i = tmp;
645
- angle -= arctg[i];
646
- }
647
- }
648
-
649
- ret.i *= signx;
650
- ret.q *= signx;
651
-
652
- return ret;
653593 }