.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | |
---|
3 | 4 | Broadcom B43 wireless driver |
---|
.. | .. |
---|
9 | 10 | Copyright (c) 2005, 2006 Danny van Dyk <kugelfang@gentoo.org> |
---|
10 | 11 | Copyright (c) 2005, 2006 Andreas Jaggi <andreas.jaggi@waterwave.ch> |
---|
11 | 12 | |
---|
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. |
---|
26 | 13 | |
---|
27 | 14 | */ |
---|
28 | 15 | |
---|
.. | .. |
---|
471 | 458 | b43_mac_enable(dev); |
---|
472 | 459 | } |
---|
473 | 460 | |
---|
474 | | -/** |
---|
| 461 | +/* |
---|
475 | 462 | * b43_phy_txpower_adjust_work - TX power workqueue. |
---|
476 | 463 | * |
---|
477 | 464 | * Workqueue for updating the TX power parameters in hardware. |
---|
.. | .. |
---|
572 | 559 | return dev->phy.chandef->width == NL80211_CHAN_WIDTH_40; |
---|
573 | 560 | } |
---|
574 | 561 | |
---|
575 | | -/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */ |
---|
| 562 | +/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/BmacPhyClkFgc */ |
---|
576 | 563 | void b43_phy_force_clock(struct b43_wldev *dev, bool force) |
---|
577 | 564 | { |
---|
578 | 565 | u32 tmp; |
---|
.. | .. |
---|
603 | 590 | break; |
---|
604 | 591 | #endif |
---|
605 | 592 | } |
---|
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; |
---|
653 | 593 | } |
---|