| .. | .. |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | #include "Mp_Precomp.h" |
|---|
| 9 | 9 | |
|---|
| 10 | +/* defines */ |
|---|
| 11 | +#define HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(val) \ |
|---|
| 12 | +do { \ |
|---|
| 13 | + halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, val); \ |
|---|
| 14 | + pCoexDm->psTdmaDuAdjType = val; \ |
|---|
| 15 | +} while (0) |
|---|
| 16 | + |
|---|
| 10 | 17 | /* Global variables, these are static variables */ |
|---|
| 11 | 18 | static COEX_DM_8723B_2ANT GLCoexDm8723b2Ant; |
|---|
| 12 | 19 | static PCOEX_DM_8723B_2ANT pCoexDm = &GLCoexDm8723b2Ant; |
|---|
| .. | .. |
|---|
| 1599 | 1606 | { |
|---|
| 1600 | 1607 | if (bScoHid) { |
|---|
| 1601 | 1608 | if (bTxPause) { |
|---|
| 1602 | | - if (maxInterval == 1) { |
|---|
| 1603 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 13); |
|---|
| 1604 | | - pCoexDm->psTdmaDuAdjType = 13; |
|---|
| 1605 | | - } else if (maxInterval == 2) { |
|---|
| 1606 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1607 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1608 | | - } else if (maxInterval == 3) { |
|---|
| 1609 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1610 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1611 | | - } else { |
|---|
| 1612 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1613 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1614 | | - } |
|---|
| 1609 | + if (maxInterval == 1) |
|---|
| 1610 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(13); |
|---|
| 1611 | + else if (maxInterval == 2) |
|---|
| 1612 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1613 | + else |
|---|
| 1614 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1615 | 1615 | } else { |
|---|
| 1616 | | - if (maxInterval == 1) { |
|---|
| 1617 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); |
|---|
| 1618 | | - pCoexDm->psTdmaDuAdjType = 9; |
|---|
| 1619 | | - } else if (maxInterval == 2) { |
|---|
| 1620 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 1621 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 1622 | | - } else if (maxInterval == 3) { |
|---|
| 1623 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 1624 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 1625 | | - } else { |
|---|
| 1626 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 1627 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 1628 | | - } |
|---|
| 1616 | + if (maxInterval == 1) |
|---|
| 1617 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(9); |
|---|
| 1618 | + else if (maxInterval == 2) |
|---|
| 1619 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1620 | + else |
|---|
| 1621 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1629 | 1622 | } |
|---|
| 1630 | 1623 | } else { |
|---|
| 1631 | 1624 | if (bTxPause) { |
|---|
| 1632 | | - if (maxInterval == 1) { |
|---|
| 1633 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 5); |
|---|
| 1634 | | - pCoexDm->psTdmaDuAdjType = 5; |
|---|
| 1635 | | - } else if (maxInterval == 2) { |
|---|
| 1636 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1637 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1638 | | - } else if (maxInterval == 3) { |
|---|
| 1639 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1640 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1641 | | - } else { |
|---|
| 1642 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1643 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1644 | | - } |
|---|
| 1625 | + if (maxInterval == 1) |
|---|
| 1626 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(5); |
|---|
| 1627 | + else if (maxInterval == 2) |
|---|
| 1628 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1629 | + else |
|---|
| 1630 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1645 | 1631 | } else { |
|---|
| 1646 | | - if (maxInterval == 1) { |
|---|
| 1647 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 1); |
|---|
| 1648 | | - pCoexDm->psTdmaDuAdjType = 1; |
|---|
| 1649 | | - } else if (maxInterval == 2) { |
|---|
| 1650 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 1651 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 1652 | | - } else if (maxInterval == 3) { |
|---|
| 1653 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 1654 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 1655 | | - } else { |
|---|
| 1656 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 1657 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 1658 | | - } |
|---|
| 1632 | + if (maxInterval == 1) |
|---|
| 1633 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(1); |
|---|
| 1634 | + else if (maxInterval == 2) |
|---|
| 1635 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1636 | + else |
|---|
| 1637 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1659 | 1638 | } |
|---|
| 1660 | 1639 | } |
|---|
| 1661 | 1640 | } |
|---|
| .. | .. |
|---|
| 1667 | 1646 | result = 0; |
|---|
| 1668 | 1647 | WaitCount = 0; |
|---|
| 1669 | 1648 | } else { |
|---|
| 1670 | | - /* accquire the BT TRx retry count from BT_Info byte2 */ |
|---|
| 1649 | + /* acquire the BT TRx retry count from BT_Info byte2 */ |
|---|
| 1671 | 1650 | retryCount = pCoexSta->btRetryCnt; |
|---|
| 1672 | 1651 | BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], retryCount = %d\n", retryCount)); |
|---|
| 1673 | 1652 | BTC_PRINT( |
|---|
| .. | .. |
|---|
| 1741 | 1720 | if (bTxPause) { |
|---|
| 1742 | 1721 | BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], TxPause = 1\n")); |
|---|
| 1743 | 1722 | |
|---|
| 1744 | | - if (pCoexDm->curPsTdma == 71) { |
|---|
| 1745 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 5); |
|---|
| 1746 | | - pCoexDm->psTdmaDuAdjType = 5; |
|---|
| 1747 | | - } else if (pCoexDm->curPsTdma == 1) { |
|---|
| 1748 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 5); |
|---|
| 1749 | | - pCoexDm->psTdmaDuAdjType = 5; |
|---|
| 1750 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 1751 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1752 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1753 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 1754 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1755 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1756 | | - } else if (pCoexDm->curPsTdma == 4) { |
|---|
| 1757 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 8); |
|---|
| 1758 | | - pCoexDm->psTdmaDuAdjType = 8; |
|---|
| 1759 | | - } |
|---|
| 1723 | + if (pCoexDm->curPsTdma == 71) |
|---|
| 1724 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(5); |
|---|
| 1725 | + else if (pCoexDm->curPsTdma == 1) |
|---|
| 1726 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(5); |
|---|
| 1727 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1728 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1729 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1730 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1731 | + else if (pCoexDm->curPsTdma == 4) |
|---|
| 1732 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(8); |
|---|
| 1760 | 1733 | |
|---|
| 1761 | | - if (pCoexDm->curPsTdma == 9) { |
|---|
| 1762 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 13); |
|---|
| 1763 | | - pCoexDm->psTdmaDuAdjType = 13; |
|---|
| 1764 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 1765 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1766 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1767 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 1768 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1769 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1770 | | - } else if (pCoexDm->curPsTdma == 12) { |
|---|
| 1771 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 16); |
|---|
| 1772 | | - pCoexDm->psTdmaDuAdjType = 16; |
|---|
| 1773 | | - } |
|---|
| 1734 | + if (pCoexDm->curPsTdma == 9) |
|---|
| 1735 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(13); |
|---|
| 1736 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1737 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1738 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1739 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1740 | + else if (pCoexDm->curPsTdma == 12) |
|---|
| 1741 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(16); |
|---|
| 1774 | 1742 | |
|---|
| 1775 | 1743 | if (result == -1) { |
|---|
| 1776 | | - if (pCoexDm->curPsTdma == 5) { |
|---|
| 1777 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1778 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1779 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 1780 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1781 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1782 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 1783 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 8); |
|---|
| 1784 | | - pCoexDm->psTdmaDuAdjType = 8; |
|---|
| 1785 | | - } else if (pCoexDm->curPsTdma == 13) { |
|---|
| 1786 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1787 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1788 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 1789 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1790 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1791 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 1792 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 16); |
|---|
| 1793 | | - pCoexDm->psTdmaDuAdjType = 16; |
|---|
| 1794 | | - } |
|---|
| 1744 | + if (pCoexDm->curPsTdma == 5) |
|---|
| 1745 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1746 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1747 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1748 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1749 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(8); |
|---|
| 1750 | + else if (pCoexDm->curPsTdma == 13) |
|---|
| 1751 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1752 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1753 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1754 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1755 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(16); |
|---|
| 1795 | 1756 | } else if (result == 1) { |
|---|
| 1796 | | - if (pCoexDm->curPsTdma == 8) { |
|---|
| 1797 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1798 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1799 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 1800 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1801 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1802 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 1803 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 5); |
|---|
| 1804 | | - pCoexDm->psTdmaDuAdjType = 5; |
|---|
| 1805 | | - } else if (pCoexDm->curPsTdma == 16) { |
|---|
| 1806 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1807 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1808 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 1809 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1810 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1811 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 1812 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 13); |
|---|
| 1813 | | - pCoexDm->psTdmaDuAdjType = 13; |
|---|
| 1814 | | - } |
|---|
| 1757 | + if (pCoexDm->curPsTdma == 8) |
|---|
| 1758 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1759 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1760 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1761 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1762 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(5); |
|---|
| 1763 | + else if (pCoexDm->curPsTdma == 16) |
|---|
| 1764 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1765 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1766 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1767 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1768 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(13); |
|---|
| 1815 | 1769 | } |
|---|
| 1816 | 1770 | } else { |
|---|
| 1817 | 1771 | BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], TxPause = 0\n")); |
|---|
| 1818 | | - if (pCoexDm->curPsTdma == 5) { |
|---|
| 1819 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 71); |
|---|
| 1820 | | - pCoexDm->psTdmaDuAdjType = 71; |
|---|
| 1821 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 1822 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 1823 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 1824 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 1825 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 1826 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 1827 | | - } else if (pCoexDm->curPsTdma == 8) { |
|---|
| 1828 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 4); |
|---|
| 1829 | | - pCoexDm->psTdmaDuAdjType = 4; |
|---|
| 1830 | | - } |
|---|
| 1772 | + if (pCoexDm->curPsTdma == 5) |
|---|
| 1773 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(71); |
|---|
| 1774 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1775 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1776 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1777 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1778 | + else if (pCoexDm->curPsTdma == 8) |
|---|
| 1779 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(4); |
|---|
| 1831 | 1780 | |
|---|
| 1832 | | - if (pCoexDm->curPsTdma == 13) { |
|---|
| 1833 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); |
|---|
| 1834 | | - pCoexDm->psTdmaDuAdjType = 9; |
|---|
| 1835 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 1836 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 1837 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 1838 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 1839 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 1840 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 1841 | | - } else if (pCoexDm->curPsTdma == 16) { |
|---|
| 1842 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 12); |
|---|
| 1843 | | - pCoexDm->psTdmaDuAdjType = 12; |
|---|
| 1844 | | - } |
|---|
| 1781 | + if (pCoexDm->curPsTdma == 13) |
|---|
| 1782 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(9); |
|---|
| 1783 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1784 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1785 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1786 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1787 | + else if (pCoexDm->curPsTdma == 16) |
|---|
| 1788 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(12); |
|---|
| 1845 | 1789 | |
|---|
| 1846 | 1790 | if (result == -1) { |
|---|
| 1847 | | - if (pCoexDm->curPsTdma == 71) { |
|---|
| 1848 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 1); |
|---|
| 1849 | | - pCoexDm->psTdmaDuAdjType = 1; |
|---|
| 1850 | | - } else if (pCoexDm->curPsTdma == 1) { |
|---|
| 1851 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 1852 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 1853 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 1854 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 1855 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 1856 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 1857 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 4); |
|---|
| 1858 | | - pCoexDm->psTdmaDuAdjType = 4; |
|---|
| 1859 | | - } else if (pCoexDm->curPsTdma == 9) { |
|---|
| 1860 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 1861 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 1862 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 1863 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 1864 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 1865 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 1866 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 12); |
|---|
| 1867 | | - pCoexDm->psTdmaDuAdjType = 12; |
|---|
| 1868 | | - } |
|---|
| 1791 | + if (pCoexDm->curPsTdma == 71) |
|---|
| 1792 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(1); |
|---|
| 1793 | + else if (pCoexDm->curPsTdma == 1) |
|---|
| 1794 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1795 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1796 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1797 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1798 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(4); |
|---|
| 1799 | + else if (pCoexDm->curPsTdma == 9) |
|---|
| 1800 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1801 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1802 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1803 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1804 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(12); |
|---|
| 1869 | 1805 | } else if (result == 1) { |
|---|
| 1870 | | - if (pCoexDm->curPsTdma == 4) { |
|---|
| 1871 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 1872 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 1873 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 1874 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 1875 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 1876 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 1877 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 1); |
|---|
| 1878 | | - pCoexDm->psTdmaDuAdjType = 1; |
|---|
| 1879 | | - } else if (pCoexDm->curPsTdma == 1) { |
|---|
| 1880 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 71); |
|---|
| 1881 | | - pCoexDm->psTdmaDuAdjType = 71; |
|---|
| 1882 | | - } else if (pCoexDm->curPsTdma == 12) { |
|---|
| 1883 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 1884 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 1885 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 1886 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 1887 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 1888 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 1889 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); |
|---|
| 1890 | | - pCoexDm->psTdmaDuAdjType = 9; |
|---|
| 1891 | | - } |
|---|
| 1806 | + if (pCoexDm->curPsTdma == 4) |
|---|
| 1807 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1808 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1809 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1810 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1811 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(1); |
|---|
| 1812 | + else if (pCoexDm->curPsTdma == 1) |
|---|
| 1813 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(71); |
|---|
| 1814 | + else if (pCoexDm->curPsTdma == 12) |
|---|
| 1815 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1816 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1817 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1818 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1819 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(9); |
|---|
| 1892 | 1820 | } |
|---|
| 1893 | 1821 | } |
|---|
| 1894 | 1822 | } else if (maxInterval == 2) { |
|---|
| 1895 | 1823 | if (bTxPause) { |
|---|
| 1896 | 1824 | BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], TxPause = 1\n")); |
|---|
| 1897 | | - if (pCoexDm->curPsTdma == 1) { |
|---|
| 1898 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1899 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1900 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 1901 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1902 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1903 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 1904 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1905 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1906 | | - } else if (pCoexDm->curPsTdma == 4) { |
|---|
| 1907 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 8); |
|---|
| 1908 | | - pCoexDm->psTdmaDuAdjType = 8; |
|---|
| 1909 | | - } |
|---|
| 1825 | + if (pCoexDm->curPsTdma == 1) |
|---|
| 1826 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1827 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1828 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1829 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1830 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1831 | + else if (pCoexDm->curPsTdma == 4) |
|---|
| 1832 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(8); |
|---|
| 1910 | 1833 | |
|---|
| 1911 | | - if (pCoexDm->curPsTdma == 9) { |
|---|
| 1912 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1913 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1914 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 1915 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1916 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1917 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 1918 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1919 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1920 | | - } else if (pCoexDm->curPsTdma == 12) { |
|---|
| 1921 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 16); |
|---|
| 1922 | | - pCoexDm->psTdmaDuAdjType = 16; |
|---|
| 1923 | | - } |
|---|
| 1834 | + if (pCoexDm->curPsTdma == 9) |
|---|
| 1835 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1836 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1837 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1838 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1839 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1840 | + else if (pCoexDm->curPsTdma == 12) |
|---|
| 1841 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(16); |
|---|
| 1924 | 1842 | |
|---|
| 1925 | 1843 | if (result == -1) { |
|---|
| 1926 | | - if (pCoexDm->curPsTdma == 5) { |
|---|
| 1927 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1928 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1929 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 1930 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1931 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1932 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 1933 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 8); |
|---|
| 1934 | | - pCoexDm->psTdmaDuAdjType = 8; |
|---|
| 1935 | | - } else if (pCoexDm->curPsTdma == 13) { |
|---|
| 1936 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1937 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1938 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 1939 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1940 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1941 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 1942 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 16); |
|---|
| 1943 | | - pCoexDm->psTdmaDuAdjType = 16; |
|---|
| 1944 | | - } |
|---|
| 1844 | + if (pCoexDm->curPsTdma == 5) |
|---|
| 1845 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1846 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1847 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1848 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1849 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(8); |
|---|
| 1850 | + else if (pCoexDm->curPsTdma == 13) |
|---|
| 1851 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1852 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1853 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1854 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1855 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(16); |
|---|
| 1945 | 1856 | } else if (result == 1) { |
|---|
| 1946 | | - if (pCoexDm->curPsTdma == 8) { |
|---|
| 1947 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 1948 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 1949 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 1950 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1951 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1952 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 1953 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); |
|---|
| 1954 | | - pCoexDm->psTdmaDuAdjType = 6; |
|---|
| 1955 | | - } else if (pCoexDm->curPsTdma == 16) { |
|---|
| 1956 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 1957 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 1958 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 1959 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1960 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1961 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 1962 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); |
|---|
| 1963 | | - pCoexDm->psTdmaDuAdjType = 14; |
|---|
| 1964 | | - } |
|---|
| 1857 | + if (pCoexDm->curPsTdma == 8) |
|---|
| 1858 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1859 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1860 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1861 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1862 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(6); |
|---|
| 1863 | + else if (pCoexDm->curPsTdma == 16) |
|---|
| 1864 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1865 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1866 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1867 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1868 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(14); |
|---|
| 1965 | 1869 | } |
|---|
| 1966 | 1870 | } else { |
|---|
| 1967 | 1871 | BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], TxPause = 0\n")); |
|---|
| 1968 | | - if (pCoexDm->curPsTdma == 5) { |
|---|
| 1969 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 1970 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 1971 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 1972 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 1973 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 1974 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 1975 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 1976 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 1977 | | - } else if (pCoexDm->curPsTdma == 8) { |
|---|
| 1978 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 4); |
|---|
| 1979 | | - pCoexDm->psTdmaDuAdjType = 4; |
|---|
| 1980 | | - } |
|---|
| 1872 | + if (pCoexDm->curPsTdma == 5) |
|---|
| 1873 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1874 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1875 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1876 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1877 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1878 | + else if (pCoexDm->curPsTdma == 8) |
|---|
| 1879 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(4); |
|---|
| 1981 | 1880 | |
|---|
| 1982 | | - if (pCoexDm->curPsTdma == 13) { |
|---|
| 1983 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 1984 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 1985 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 1986 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 1987 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 1988 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 1989 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 1990 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 1991 | | - } else if (pCoexDm->curPsTdma == 16) { |
|---|
| 1992 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 12); |
|---|
| 1993 | | - pCoexDm->psTdmaDuAdjType = 12; |
|---|
| 1994 | | - } |
|---|
| 1881 | + if (pCoexDm->curPsTdma == 13) |
|---|
| 1882 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1883 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1884 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1885 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1886 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1887 | + else if (pCoexDm->curPsTdma == 16) |
|---|
| 1888 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(12); |
|---|
| 1995 | 1889 | |
|---|
| 1996 | 1890 | if (result == -1) { |
|---|
| 1997 | | - if (pCoexDm->curPsTdma == 1) { |
|---|
| 1998 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 1999 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 2000 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 2001 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2002 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2003 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 2004 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 4); |
|---|
| 2005 | | - pCoexDm->psTdmaDuAdjType = 4; |
|---|
| 2006 | | - } else if (pCoexDm->curPsTdma == 9) { |
|---|
| 2007 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 2008 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 2009 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 2010 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2011 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2012 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 2013 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 12); |
|---|
| 2014 | | - pCoexDm->psTdmaDuAdjType = 12; |
|---|
| 2015 | | - } |
|---|
| 1891 | + if (pCoexDm->curPsTdma == 1) |
|---|
| 1892 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1893 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1894 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1895 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1896 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(4); |
|---|
| 1897 | + else if (pCoexDm->curPsTdma == 9) |
|---|
| 1898 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1899 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1900 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1901 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1902 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(12); |
|---|
| 2016 | 1903 | } else if (result == 1) { |
|---|
| 2017 | | - if (pCoexDm->curPsTdma == 4) { |
|---|
| 2018 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2019 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2020 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 2021 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 2022 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 2023 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 2024 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); |
|---|
| 2025 | | - pCoexDm->psTdmaDuAdjType = 2; |
|---|
| 2026 | | - } else if (pCoexDm->curPsTdma == 12) { |
|---|
| 2027 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2028 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2029 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 2030 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 2031 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 2032 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 2033 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 10); |
|---|
| 2034 | | - pCoexDm->psTdmaDuAdjType = 10; |
|---|
| 2035 | | - } |
|---|
| 1904 | + if (pCoexDm->curPsTdma == 4) |
|---|
| 1905 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1906 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1907 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1908 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1909 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(2); |
|---|
| 1910 | + else if (pCoexDm->curPsTdma == 12) |
|---|
| 1911 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1912 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1913 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 1914 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1915 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(10); |
|---|
| 2036 | 1916 | } |
|---|
| 2037 | 1917 | } |
|---|
| 2038 | 1918 | } else if (maxInterval == 3) { |
|---|
| 2039 | 1919 | if (bTxPause) { |
|---|
| 2040 | 1920 | BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], TxPause = 1\n")); |
|---|
| 2041 | | - if (pCoexDm->curPsTdma == 1) { |
|---|
| 2042 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2043 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2044 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 2045 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2046 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2047 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 2048 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2049 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2050 | | - } else if (pCoexDm->curPsTdma == 4) { |
|---|
| 2051 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 8); |
|---|
| 2052 | | - pCoexDm->psTdmaDuAdjType = 8; |
|---|
| 2053 | | - } |
|---|
| 1921 | + if (pCoexDm->curPsTdma == 1) |
|---|
| 1922 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1923 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1924 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1925 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1926 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1927 | + else if (pCoexDm->curPsTdma == 4) |
|---|
| 1928 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(8); |
|---|
| 2054 | 1929 | |
|---|
| 2055 | | - if (pCoexDm->curPsTdma == 9) { |
|---|
| 2056 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2057 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2058 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 2059 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2060 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2061 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 2062 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2063 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2064 | | - } else if (pCoexDm->curPsTdma == 12) { |
|---|
| 2065 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 16); |
|---|
| 2066 | | - pCoexDm->psTdmaDuAdjType = 16; |
|---|
| 2067 | | - } |
|---|
| 1930 | + if (pCoexDm->curPsTdma == 9) |
|---|
| 1931 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1932 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1933 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1934 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1935 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1936 | + else if (pCoexDm->curPsTdma == 12) |
|---|
| 1937 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(16); |
|---|
| 2068 | 1938 | |
|---|
| 2069 | 1939 | if (result == -1) { |
|---|
| 2070 | | - if (pCoexDm->curPsTdma == 5) { |
|---|
| 2071 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2072 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2073 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 2074 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2075 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2076 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 2077 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 8); |
|---|
| 2078 | | - pCoexDm->psTdmaDuAdjType = 8; |
|---|
| 2079 | | - } else if (pCoexDm->curPsTdma == 13) { |
|---|
| 2080 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2081 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2082 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 2083 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2084 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2085 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 2086 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 16); |
|---|
| 2087 | | - pCoexDm->psTdmaDuAdjType = 16; |
|---|
| 2088 | | - } |
|---|
| 1940 | + if (pCoexDm->curPsTdma == 5) |
|---|
| 1941 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1942 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1943 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1944 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1945 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(8); |
|---|
| 1946 | + else if (pCoexDm->curPsTdma == 13) |
|---|
| 1947 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1948 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1949 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1950 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1951 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(16); |
|---|
| 2089 | 1952 | } else if (result == 1) { |
|---|
| 2090 | | - if (pCoexDm->curPsTdma == 8) { |
|---|
| 2091 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2092 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2093 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 2094 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2095 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2096 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 2097 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 7); |
|---|
| 2098 | | - pCoexDm->psTdmaDuAdjType = 7; |
|---|
| 2099 | | - } else if (pCoexDm->curPsTdma == 16) { |
|---|
| 2100 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2101 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2102 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 2103 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2104 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2105 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 2106 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 15); |
|---|
| 2107 | | - pCoexDm->psTdmaDuAdjType = 15; |
|---|
| 2108 | | - } |
|---|
| 1953 | + if (pCoexDm->curPsTdma == 8) |
|---|
| 1954 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1955 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1956 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1957 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1958 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(7); |
|---|
| 1959 | + else if (pCoexDm->curPsTdma == 16) |
|---|
| 1960 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1961 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1962 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 1963 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1964 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(15); |
|---|
| 2109 | 1965 | } |
|---|
| 2110 | 1966 | } else { |
|---|
| 2111 | 1967 | BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], TxPause = 0\n")); |
|---|
| 2112 | | - if (pCoexDm->curPsTdma == 5) { |
|---|
| 2113 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2114 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2115 | | - } else if (pCoexDm->curPsTdma == 6) { |
|---|
| 2116 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2117 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2118 | | - } else if (pCoexDm->curPsTdma == 7) { |
|---|
| 2119 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2120 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2121 | | - } else if (pCoexDm->curPsTdma == 8) { |
|---|
| 2122 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 4); |
|---|
| 2123 | | - pCoexDm->psTdmaDuAdjType = 4; |
|---|
| 2124 | | - } |
|---|
| 1968 | + if (pCoexDm->curPsTdma == 5) |
|---|
| 1969 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1970 | + else if (pCoexDm->curPsTdma == 6) |
|---|
| 1971 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1972 | + else if (pCoexDm->curPsTdma == 7) |
|---|
| 1973 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1974 | + else if (pCoexDm->curPsTdma == 8) |
|---|
| 1975 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(4); |
|---|
| 2125 | 1976 | |
|---|
| 2126 | | - if (pCoexDm->curPsTdma == 13) { |
|---|
| 2127 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2128 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2129 | | - } else if (pCoexDm->curPsTdma == 14) { |
|---|
| 2130 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2131 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2132 | | - } else if (pCoexDm->curPsTdma == 15) { |
|---|
| 2133 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2134 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2135 | | - } else if (pCoexDm->curPsTdma == 16) { |
|---|
| 2136 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 12); |
|---|
| 2137 | | - pCoexDm->psTdmaDuAdjType = 12; |
|---|
| 2138 | | - } |
|---|
| 1977 | + if (pCoexDm->curPsTdma == 13) |
|---|
| 1978 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1979 | + else if (pCoexDm->curPsTdma == 14) |
|---|
| 1980 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1981 | + else if (pCoexDm->curPsTdma == 15) |
|---|
| 1982 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1983 | + else if (pCoexDm->curPsTdma == 16) |
|---|
| 1984 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(12); |
|---|
| 2139 | 1985 | |
|---|
| 2140 | 1986 | if (result == -1) { |
|---|
| 2141 | | - if (pCoexDm->curPsTdma == 1) { |
|---|
| 2142 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2143 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2144 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 2145 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2146 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2147 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 2148 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 4); |
|---|
| 2149 | | - pCoexDm->psTdmaDuAdjType = 4; |
|---|
| 2150 | | - } else if (pCoexDm->curPsTdma == 9) { |
|---|
| 2151 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2152 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2153 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 2154 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2155 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2156 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 2157 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 12); |
|---|
| 2158 | | - pCoexDm->psTdmaDuAdjType = 12; |
|---|
| 2159 | | - } |
|---|
| 1987 | + if (pCoexDm->curPsTdma == 1) |
|---|
| 1988 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1989 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 1990 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 1991 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 1992 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(4); |
|---|
| 1993 | + else if (pCoexDm->curPsTdma == 9) |
|---|
| 1994 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1995 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 1996 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 1997 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 1998 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(12); |
|---|
| 2160 | 1999 | } else if (result == 1) { |
|---|
| 2161 | | - if (pCoexDm->curPsTdma == 4) { |
|---|
| 2162 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2163 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2164 | | - } else if (pCoexDm->curPsTdma == 3) { |
|---|
| 2165 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2166 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2167 | | - } else if (pCoexDm->curPsTdma == 2) { |
|---|
| 2168 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); |
|---|
| 2169 | | - pCoexDm->psTdmaDuAdjType = 3; |
|---|
| 2170 | | - } else if (pCoexDm->curPsTdma == 12) { |
|---|
| 2171 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2172 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2173 | | - } else if (pCoexDm->curPsTdma == 11) { |
|---|
| 2174 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2175 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2176 | | - } else if (pCoexDm->curPsTdma == 10) { |
|---|
| 2177 | | - halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); |
|---|
| 2178 | | - pCoexDm->psTdmaDuAdjType = 11; |
|---|
| 2179 | | - } |
|---|
| 2000 | + if (pCoexDm->curPsTdma == 4) |
|---|
| 2001 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 2002 | + else if (pCoexDm->curPsTdma == 3) |
|---|
| 2003 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 2004 | + else if (pCoexDm->curPsTdma == 2) |
|---|
| 2005 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(3); |
|---|
| 2006 | + else if (pCoexDm->curPsTdma == 12) |
|---|
| 2007 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 2008 | + else if (pCoexDm->curPsTdma == 11) |
|---|
| 2009 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 2010 | + else if (pCoexDm->curPsTdma == 10) |
|---|
| 2011 | + HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(11); |
|---|
| 2180 | 2012 | } |
|---|
| 2181 | 2013 | } |
|---|
| 2182 | 2014 | } |
|---|