diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.c | 519 |
1 files changed, 429 insertions, 90 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 23eca8bc85d1..aeea1c793943 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c | |||
@@ -956,23 +956,45 @@ err_pull: | |||
956 | 956 | ||
957 | static void ath10k_wmi_tx_beacon_nowait(struct ath10k_vif *arvif) | 957 | static void ath10k_wmi_tx_beacon_nowait(struct ath10k_vif *arvif) |
958 | { | 958 | { |
959 | struct ath10k *ar = arvif->ar; | ||
960 | struct ath10k_skb_cb *cb; | ||
961 | struct sk_buff *bcn; | ||
959 | int ret; | 962 | int ret; |
960 | 963 | ||
961 | lockdep_assert_held(&arvif->ar->data_lock); | 964 | spin_lock_bh(&ar->data_lock); |
962 | 965 | ||
963 | if (arvif->beacon == NULL) | 966 | bcn = arvif->beacon; |
964 | return; | ||
965 | 967 | ||
966 | if (arvif->beacon_sent) | 968 | if (!bcn) |
967 | return; | 969 | goto unlock; |
968 | 970 | ||
969 | ret = ath10k_wmi_beacon_send_ref_nowait(arvif); | 971 | cb = ATH10K_SKB_CB(bcn); |
970 | if (ret) | 972 | |
971 | return; | 973 | switch (arvif->beacon_state) { |
974 | case ATH10K_BEACON_SENDING: | ||
975 | case ATH10K_BEACON_SENT: | ||
976 | break; | ||
977 | case ATH10K_BEACON_SCHEDULED: | ||
978 | arvif->beacon_state = ATH10K_BEACON_SENDING; | ||
979 | spin_unlock_bh(&ar->data_lock); | ||
980 | |||
981 | ret = ath10k_wmi_beacon_send_ref_nowait(arvif->ar, | ||
982 | arvif->vdev_id, | ||
983 | bcn->data, bcn->len, | ||
984 | cb->paddr, | ||
985 | cb->bcn.dtim_zero, | ||
986 | cb->bcn.deliver_cab); | ||
987 | |||
988 | spin_lock_bh(&ar->data_lock); | ||
989 | |||
990 | if (ret == 0) | ||
991 | arvif->beacon_state = ATH10K_BEACON_SENT; | ||
992 | else | ||
993 | arvif->beacon_state = ATH10K_BEACON_SCHEDULED; | ||
994 | } | ||
972 | 995 | ||
973 | /* We need to retain the arvif->beacon reference for DMA unmapping and | 996 | unlock: |
974 | * freeing the skbuff later. */ | 997 | spin_unlock_bh(&ar->data_lock); |
975 | arvif->beacon_sent = true; | ||
976 | } | 998 | } |
977 | 999 | ||
978 | static void ath10k_wmi_tx_beacons_iter(void *data, u8 *mac, | 1000 | static void ath10k_wmi_tx_beacons_iter(void *data, u8 *mac, |
@@ -985,12 +1007,10 @@ static void ath10k_wmi_tx_beacons_iter(void *data, u8 *mac, | |||
985 | 1007 | ||
986 | static void ath10k_wmi_tx_beacons_nowait(struct ath10k *ar) | 1008 | static void ath10k_wmi_tx_beacons_nowait(struct ath10k *ar) |
987 | { | 1009 | { |
988 | spin_lock_bh(&ar->data_lock); | ||
989 | ieee80211_iterate_active_interfaces_atomic(ar->hw, | 1010 | ieee80211_iterate_active_interfaces_atomic(ar->hw, |
990 | IEEE80211_IFACE_ITER_NORMAL, | 1011 | IEEE80211_IFACE_ITER_NORMAL, |
991 | ath10k_wmi_tx_beacons_iter, | 1012 | ath10k_wmi_tx_beacons_iter, |
992 | NULL); | 1013 | NULL); |
993 | spin_unlock_bh(&ar->data_lock); | ||
994 | } | 1014 | } |
995 | 1015 | ||
996 | static void ath10k_wmi_op_ep_tx_credits(struct ath10k *ar) | 1016 | static void ath10k_wmi_op_ep_tx_credits(struct ath10k *ar) |
@@ -1680,12 +1700,9 @@ int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb) | |||
1680 | return 0; | 1700 | return 0; |
1681 | } | 1701 | } |
1682 | 1702 | ||
1683 | void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src, | 1703 | void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src, |
1684 | struct ath10k_fw_stats_pdev *dst) | 1704 | struct ath10k_fw_stats_pdev *dst) |
1685 | { | 1705 | { |
1686 | const struct wal_dbg_tx_stats *tx = &src->wal.tx; | ||
1687 | const struct wal_dbg_rx_stats *rx = &src->wal.rx; | ||
1688 | |||
1689 | dst->ch_noise_floor = __le32_to_cpu(src->chan_nf); | 1706 | dst->ch_noise_floor = __le32_to_cpu(src->chan_nf); |
1690 | dst->tx_frame_count = __le32_to_cpu(src->tx_frame_count); | 1707 | dst->tx_frame_count = __le32_to_cpu(src->tx_frame_count); |
1691 | dst->rx_frame_count = __le32_to_cpu(src->rx_frame_count); | 1708 | dst->rx_frame_count = __le32_to_cpu(src->rx_frame_count); |
@@ -1693,44 +1710,63 @@ void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src, | |||
1693 | dst->cycle_count = __le32_to_cpu(src->cycle_count); | 1710 | dst->cycle_count = __le32_to_cpu(src->cycle_count); |
1694 | dst->phy_err_count = __le32_to_cpu(src->phy_err_count); | 1711 | dst->phy_err_count = __le32_to_cpu(src->phy_err_count); |
1695 | dst->chan_tx_power = __le32_to_cpu(src->chan_tx_pwr); | 1712 | dst->chan_tx_power = __le32_to_cpu(src->chan_tx_pwr); |
1713 | } | ||
1696 | 1714 | ||
1697 | dst->comp_queued = __le32_to_cpu(tx->comp_queued); | 1715 | void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src, |
1698 | dst->comp_delivered = __le32_to_cpu(tx->comp_delivered); | 1716 | struct ath10k_fw_stats_pdev *dst) |
1699 | dst->msdu_enqued = __le32_to_cpu(tx->msdu_enqued); | 1717 | { |
1700 | dst->mpdu_enqued = __le32_to_cpu(tx->mpdu_enqued); | 1718 | dst->comp_queued = __le32_to_cpu(src->comp_queued); |
1701 | dst->wmm_drop = __le32_to_cpu(tx->wmm_drop); | 1719 | dst->comp_delivered = __le32_to_cpu(src->comp_delivered); |
1702 | dst->local_enqued = __le32_to_cpu(tx->local_enqued); | 1720 | dst->msdu_enqued = __le32_to_cpu(src->msdu_enqued); |
1703 | dst->local_freed = __le32_to_cpu(tx->local_freed); | 1721 | dst->mpdu_enqued = __le32_to_cpu(src->mpdu_enqued); |
1704 | dst->hw_queued = __le32_to_cpu(tx->hw_queued); | 1722 | dst->wmm_drop = __le32_to_cpu(src->wmm_drop); |
1705 | dst->hw_reaped = __le32_to_cpu(tx->hw_reaped); | 1723 | dst->local_enqued = __le32_to_cpu(src->local_enqued); |
1706 | dst->underrun = __le32_to_cpu(tx->underrun); | 1724 | dst->local_freed = __le32_to_cpu(src->local_freed); |
1707 | dst->tx_abort = __le32_to_cpu(tx->tx_abort); | 1725 | dst->hw_queued = __le32_to_cpu(src->hw_queued); |
1708 | dst->mpdus_requed = __le32_to_cpu(tx->mpdus_requed); | 1726 | dst->hw_reaped = __le32_to_cpu(src->hw_reaped); |
1709 | dst->tx_ko = __le32_to_cpu(tx->tx_ko); | 1727 | dst->underrun = __le32_to_cpu(src->underrun); |
1710 | dst->data_rc = __le32_to_cpu(tx->data_rc); | 1728 | dst->tx_abort = __le32_to_cpu(src->tx_abort); |
1711 | dst->self_triggers = __le32_to_cpu(tx->self_triggers); | 1729 | dst->mpdus_requed = __le32_to_cpu(src->mpdus_requed); |
1712 | dst->sw_retry_failure = __le32_to_cpu(tx->sw_retry_failure); | 1730 | dst->tx_ko = __le32_to_cpu(src->tx_ko); |
1713 | dst->illgl_rate_phy_err = __le32_to_cpu(tx->illgl_rate_phy_err); | 1731 | dst->data_rc = __le32_to_cpu(src->data_rc); |
1714 | dst->pdev_cont_xretry = __le32_to_cpu(tx->pdev_cont_xretry); | 1732 | dst->self_triggers = __le32_to_cpu(src->self_triggers); |
1715 | dst->pdev_tx_timeout = __le32_to_cpu(tx->pdev_tx_timeout); | 1733 | dst->sw_retry_failure = __le32_to_cpu(src->sw_retry_failure); |
1716 | dst->pdev_resets = __le32_to_cpu(tx->pdev_resets); | 1734 | dst->illgl_rate_phy_err = __le32_to_cpu(src->illgl_rate_phy_err); |
1717 | dst->phy_underrun = __le32_to_cpu(tx->phy_underrun); | 1735 | dst->pdev_cont_xretry = __le32_to_cpu(src->pdev_cont_xretry); |
1718 | dst->txop_ovf = __le32_to_cpu(tx->txop_ovf); | 1736 | dst->pdev_tx_timeout = __le32_to_cpu(src->pdev_tx_timeout); |
1719 | 1737 | dst->pdev_resets = __le32_to_cpu(src->pdev_resets); | |
1720 | dst->mid_ppdu_route_change = __le32_to_cpu(rx->mid_ppdu_route_change); | 1738 | dst->phy_underrun = __le32_to_cpu(src->phy_underrun); |
1721 | dst->status_rcvd = __le32_to_cpu(rx->status_rcvd); | 1739 | dst->txop_ovf = __le32_to_cpu(src->txop_ovf); |
1722 | dst->r0_frags = __le32_to_cpu(rx->r0_frags); | 1740 | } |
1723 | dst->r1_frags = __le32_to_cpu(rx->r1_frags); | 1741 | |
1724 | dst->r2_frags = __le32_to_cpu(rx->r2_frags); | 1742 | void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src, |
1725 | dst->r3_frags = __le32_to_cpu(rx->r3_frags); | 1743 | struct ath10k_fw_stats_pdev *dst) |
1726 | dst->htt_msdus = __le32_to_cpu(rx->htt_msdus); | 1744 | { |
1727 | dst->htt_mpdus = __le32_to_cpu(rx->htt_mpdus); | 1745 | dst->mid_ppdu_route_change = __le32_to_cpu(src->mid_ppdu_route_change); |
1728 | dst->loc_msdus = __le32_to_cpu(rx->loc_msdus); | 1746 | dst->status_rcvd = __le32_to_cpu(src->status_rcvd); |
1729 | dst->loc_mpdus = __le32_to_cpu(rx->loc_mpdus); | 1747 | dst->r0_frags = __le32_to_cpu(src->r0_frags); |
1730 | dst->oversize_amsdu = __le32_to_cpu(rx->oversize_amsdu); | 1748 | dst->r1_frags = __le32_to_cpu(src->r1_frags); |
1731 | dst->phy_errs = __le32_to_cpu(rx->phy_errs); | 1749 | dst->r2_frags = __le32_to_cpu(src->r2_frags); |
1732 | dst->phy_err_drop = __le32_to_cpu(rx->phy_err_drop); | 1750 | dst->r3_frags = __le32_to_cpu(src->r3_frags); |
1733 | dst->mpdu_errs = __le32_to_cpu(rx->mpdu_errs); | 1751 | dst->htt_msdus = __le32_to_cpu(src->htt_msdus); |
1752 | dst->htt_mpdus = __le32_to_cpu(src->htt_mpdus); | ||
1753 | dst->loc_msdus = __le32_to_cpu(src->loc_msdus); | ||
1754 | dst->loc_mpdus = __le32_to_cpu(src->loc_mpdus); | ||
1755 | dst->oversize_amsdu = __le32_to_cpu(src->oversize_amsdu); | ||
1756 | dst->phy_errs = __le32_to_cpu(src->phy_errs); | ||
1757 | dst->phy_err_drop = __le32_to_cpu(src->phy_err_drop); | ||
1758 | dst->mpdu_errs = __le32_to_cpu(src->mpdu_errs); | ||
1759 | } | ||
1760 | |||
1761 | void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src, | ||
1762 | struct ath10k_fw_stats_pdev *dst) | ||
1763 | { | ||
1764 | dst->ack_rx_bad = __le32_to_cpu(src->ack_rx_bad); | ||
1765 | dst->rts_bad = __le32_to_cpu(src->rts_bad); | ||
1766 | dst->rts_good = __le32_to_cpu(src->rts_good); | ||
1767 | dst->fcs_bad = __le32_to_cpu(src->fcs_bad); | ||
1768 | dst->no_beacons = __le32_to_cpu(src->no_beacons); | ||
1769 | dst->mib_int_count = __le32_to_cpu(src->mib_int_count); | ||
1734 | } | 1770 | } |
1735 | 1771 | ||
1736 | void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src, | 1772 | void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src, |
@@ -1768,7 +1804,10 @@ static int ath10k_wmi_main_op_pull_fw_stats(struct ath10k *ar, | |||
1768 | if (!dst) | 1804 | if (!dst) |
1769 | continue; | 1805 | continue; |
1770 | 1806 | ||
1771 | ath10k_wmi_pull_pdev_stats(src, dst); | 1807 | ath10k_wmi_pull_pdev_stats_base(&src->base, dst); |
1808 | ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); | ||
1809 | ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); | ||
1810 | |||
1772 | list_add_tail(&dst->list, &stats->pdevs); | 1811 | list_add_tail(&dst->list, &stats->pdevs); |
1773 | } | 1812 | } |
1774 | 1813 | ||
@@ -1820,14 +1859,10 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, | |||
1820 | if (!dst) | 1859 | if (!dst) |
1821 | continue; | 1860 | continue; |
1822 | 1861 | ||
1823 | ath10k_wmi_pull_pdev_stats(&src->old, dst); | 1862 | ath10k_wmi_pull_pdev_stats_base(&src->base, dst); |
1824 | 1863 | ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); | |
1825 | dst->ack_rx_bad = __le32_to_cpu(src->ack_rx_bad); | 1864 | ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); |
1826 | dst->rts_bad = __le32_to_cpu(src->rts_bad); | 1865 | ath10k_wmi_pull_pdev_stats_extra(&src->extra, dst); |
1827 | dst->rts_good = __le32_to_cpu(src->rts_good); | ||
1828 | dst->fcs_bad = __le32_to_cpu(src->fcs_bad); | ||
1829 | dst->no_beacons = __le32_to_cpu(src->no_beacons); | ||
1830 | dst->mib_int_count = __le32_to_cpu(src->mib_int_count); | ||
1831 | 1866 | ||
1832 | list_add_tail(&dst->list, &stats->pdevs); | 1867 | list_add_tail(&dst->list, &stats->pdevs); |
1833 | } | 1868 | } |
@@ -1856,6 +1891,164 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, | |||
1856 | return 0; | 1891 | return 0; |
1857 | } | 1892 | } |
1858 | 1893 | ||
1894 | static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, | ||
1895 | struct sk_buff *skb, | ||
1896 | struct ath10k_fw_stats *stats) | ||
1897 | { | ||
1898 | const struct wmi_10_2_stats_event *ev = (void *)skb->data; | ||
1899 | u32 num_pdev_stats; | ||
1900 | u32 num_pdev_ext_stats; | ||
1901 | u32 num_vdev_stats; | ||
1902 | u32 num_peer_stats; | ||
1903 | int i; | ||
1904 | |||
1905 | if (!skb_pull(skb, sizeof(*ev))) | ||
1906 | return -EPROTO; | ||
1907 | |||
1908 | num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); | ||
1909 | num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats); | ||
1910 | num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); | ||
1911 | num_peer_stats = __le32_to_cpu(ev->num_peer_stats); | ||
1912 | |||
1913 | for (i = 0; i < num_pdev_stats; i++) { | ||
1914 | const struct wmi_10_2_pdev_stats *src; | ||
1915 | struct ath10k_fw_stats_pdev *dst; | ||
1916 | |||
1917 | src = (void *)skb->data; | ||
1918 | if (!skb_pull(skb, sizeof(*src))) | ||
1919 | return -EPROTO; | ||
1920 | |||
1921 | dst = kzalloc(sizeof(*dst), GFP_ATOMIC); | ||
1922 | if (!dst) | ||
1923 | continue; | ||
1924 | |||
1925 | ath10k_wmi_pull_pdev_stats_base(&src->base, dst); | ||
1926 | ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); | ||
1927 | ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); | ||
1928 | ath10k_wmi_pull_pdev_stats_extra(&src->extra, dst); | ||
1929 | /* FIXME: expose 10.2 specific values */ | ||
1930 | |||
1931 | list_add_tail(&dst->list, &stats->pdevs); | ||
1932 | } | ||
1933 | |||
1934 | for (i = 0; i < num_pdev_ext_stats; i++) { | ||
1935 | const struct wmi_10_2_pdev_ext_stats *src; | ||
1936 | |||
1937 | src = (void *)skb->data; | ||
1938 | if (!skb_pull(skb, sizeof(*src))) | ||
1939 | return -EPROTO; | ||
1940 | |||
1941 | /* FIXME: expose values to userspace | ||
1942 | * | ||
1943 | * Note: Even though this loop seems to do nothing it is | ||
1944 | * required to parse following sub-structures properly. | ||
1945 | */ | ||
1946 | } | ||
1947 | |||
1948 | /* fw doesn't implement vdev stats */ | ||
1949 | |||
1950 | for (i = 0; i < num_peer_stats; i++) { | ||
1951 | const struct wmi_10_2_peer_stats *src; | ||
1952 | struct ath10k_fw_stats_peer *dst; | ||
1953 | |||
1954 | src = (void *)skb->data; | ||
1955 | if (!skb_pull(skb, sizeof(*src))) | ||
1956 | return -EPROTO; | ||
1957 | |||
1958 | dst = kzalloc(sizeof(*dst), GFP_ATOMIC); | ||
1959 | if (!dst) | ||
1960 | continue; | ||
1961 | |||
1962 | ath10k_wmi_pull_peer_stats(&src->old, dst); | ||
1963 | |||
1964 | dst->peer_rx_rate = __le32_to_cpu(src->peer_rx_rate); | ||
1965 | /* FIXME: expose 10.2 specific values */ | ||
1966 | |||
1967 | list_add_tail(&dst->list, &stats->peers); | ||
1968 | } | ||
1969 | |||
1970 | return 0; | ||
1971 | } | ||
1972 | |||
1973 | static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, | ||
1974 | struct sk_buff *skb, | ||
1975 | struct ath10k_fw_stats *stats) | ||
1976 | { | ||
1977 | const struct wmi_10_2_stats_event *ev = (void *)skb->data; | ||
1978 | u32 num_pdev_stats; | ||
1979 | u32 num_pdev_ext_stats; | ||
1980 | u32 num_vdev_stats; | ||
1981 | u32 num_peer_stats; | ||
1982 | int i; | ||
1983 | |||
1984 | if (!skb_pull(skb, sizeof(*ev))) | ||
1985 | return -EPROTO; | ||
1986 | |||
1987 | num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); | ||
1988 | num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats); | ||
1989 | num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); | ||
1990 | num_peer_stats = __le32_to_cpu(ev->num_peer_stats); | ||
1991 | |||
1992 | for (i = 0; i < num_pdev_stats; i++) { | ||
1993 | const struct wmi_10_2_pdev_stats *src; | ||
1994 | struct ath10k_fw_stats_pdev *dst; | ||
1995 | |||
1996 | src = (void *)skb->data; | ||
1997 | if (!skb_pull(skb, sizeof(*src))) | ||
1998 | return -EPROTO; | ||
1999 | |||
2000 | dst = kzalloc(sizeof(*dst), GFP_ATOMIC); | ||
2001 | if (!dst) | ||
2002 | continue; | ||
2003 | |||
2004 | ath10k_wmi_pull_pdev_stats_base(&src->base, dst); | ||
2005 | ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); | ||
2006 | ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); | ||
2007 | ath10k_wmi_pull_pdev_stats_extra(&src->extra, dst); | ||
2008 | /* FIXME: expose 10.2 specific values */ | ||
2009 | |||
2010 | list_add_tail(&dst->list, &stats->pdevs); | ||
2011 | } | ||
2012 | |||
2013 | for (i = 0; i < num_pdev_ext_stats; i++) { | ||
2014 | const struct wmi_10_2_pdev_ext_stats *src; | ||
2015 | |||
2016 | src = (void *)skb->data; | ||
2017 | if (!skb_pull(skb, sizeof(*src))) | ||
2018 | return -EPROTO; | ||
2019 | |||
2020 | /* FIXME: expose values to userspace | ||
2021 | * | ||
2022 | * Note: Even though this loop seems to do nothing it is | ||
2023 | * required to parse following sub-structures properly. | ||
2024 | */ | ||
2025 | } | ||
2026 | |||
2027 | /* fw doesn't implement vdev stats */ | ||
2028 | |||
2029 | for (i = 0; i < num_peer_stats; i++) { | ||
2030 | const struct wmi_10_2_4_peer_stats *src; | ||
2031 | struct ath10k_fw_stats_peer *dst; | ||
2032 | |||
2033 | src = (void *)skb->data; | ||
2034 | if (!skb_pull(skb, sizeof(*src))) | ||
2035 | return -EPROTO; | ||
2036 | |||
2037 | dst = kzalloc(sizeof(*dst), GFP_ATOMIC); | ||
2038 | if (!dst) | ||
2039 | continue; | ||
2040 | |||
2041 | ath10k_wmi_pull_peer_stats(&src->common.old, dst); | ||
2042 | |||
2043 | dst->peer_rx_rate = __le32_to_cpu(src->common.peer_rx_rate); | ||
2044 | /* FIXME: expose 10.2 specific values */ | ||
2045 | |||
2046 | list_add_tail(&dst->list, &stats->peers); | ||
2047 | } | ||
2048 | |||
2049 | return 0; | ||
2050 | } | ||
2051 | |||
1859 | void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb) | 2052 | void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb) |
1860 | { | 2053 | { |
1861 | ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_UPDATE_STATS_EVENTID\n"); | 2054 | ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_UPDATE_STATS_EVENTID\n"); |
@@ -2279,9 +2472,19 @@ void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) | |||
2279 | spin_lock_bh(&ar->data_lock); | 2472 | spin_lock_bh(&ar->data_lock); |
2280 | 2473 | ||
2281 | if (arvif->beacon) { | 2474 | if (arvif->beacon) { |
2282 | if (!arvif->beacon_sent) | 2475 | switch (arvif->beacon_state) { |
2283 | ath10k_warn(ar, "SWBA overrun on vdev %d\n", | 2476 | case ATH10K_BEACON_SENT: |
2477 | break; | ||
2478 | case ATH10K_BEACON_SCHEDULED: | ||
2479 | ath10k_warn(ar, "SWBA overrun on vdev %d, skipped old beacon\n", | ||
2480 | arvif->vdev_id); | ||
2481 | break; | ||
2482 | case ATH10K_BEACON_SENDING: | ||
2483 | ath10k_warn(ar, "SWBA overrun on vdev %d, skipped new beacon\n", | ||
2284 | arvif->vdev_id); | 2484 | arvif->vdev_id); |
2485 | dev_kfree_skb(bcn); | ||
2486 | goto skip; | ||
2487 | } | ||
2285 | 2488 | ||
2286 | ath10k_mac_vif_beacon_free(arvif); | 2489 | ath10k_mac_vif_beacon_free(arvif); |
2287 | } | 2490 | } |
@@ -2309,15 +2512,16 @@ void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) | |||
2309 | } | 2512 | } |
2310 | 2513 | ||
2311 | arvif->beacon = bcn; | 2514 | arvif->beacon = bcn; |
2312 | arvif->beacon_sent = false; | 2515 | arvif->beacon_state = ATH10K_BEACON_SCHEDULED; |
2313 | 2516 | ||
2314 | trace_ath10k_tx_hdr(ar, bcn->data, bcn->len); | 2517 | trace_ath10k_tx_hdr(ar, bcn->data, bcn->len); |
2315 | trace_ath10k_tx_payload(ar, bcn->data, bcn->len); | 2518 | trace_ath10k_tx_payload(ar, bcn->data, bcn->len); |
2316 | 2519 | ||
2317 | ath10k_wmi_tx_beacon_nowait(arvif); | ||
2318 | skip: | 2520 | skip: |
2319 | spin_unlock_bh(&ar->data_lock); | 2521 | spin_unlock_bh(&ar->data_lock); |
2320 | } | 2522 | } |
2523 | |||
2524 | ath10k_wmi_tx_beacons_nowait(ar); | ||
2321 | } | 2525 | } |
2322 | 2526 | ||
2323 | void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb) | 2527 | void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb) |
@@ -3710,7 +3914,7 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar) | |||
3710 | struct wmi_init_cmd_10_2 *cmd; | 3914 | struct wmi_init_cmd_10_2 *cmd; |
3711 | struct sk_buff *buf; | 3915 | struct sk_buff *buf; |
3712 | struct wmi_resource_config_10x config = {}; | 3916 | struct wmi_resource_config_10x config = {}; |
3713 | u32 len, val; | 3917 | u32 len, val, features; |
3714 | 3918 | ||
3715 | config.num_vdevs = __cpu_to_le32(TARGET_10X_NUM_VDEVS); | 3919 | config.num_vdevs = __cpu_to_le32(TARGET_10X_NUM_VDEVS); |
3716 | config.num_peers = __cpu_to_le32(TARGET_10X_NUM_PEERS); | 3920 | config.num_peers = __cpu_to_le32(TARGET_10X_NUM_PEERS); |
@@ -3744,7 +3948,7 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar) | |||
3744 | config.mcast2ucast_mode = __cpu_to_le32(TARGET_10X_MCAST2UCAST_MODE); | 3948 | config.mcast2ucast_mode = __cpu_to_le32(TARGET_10X_MCAST2UCAST_MODE); |
3745 | config.tx_dbg_log_size = __cpu_to_le32(TARGET_10X_TX_DBG_LOG_SIZE); | 3949 | config.tx_dbg_log_size = __cpu_to_le32(TARGET_10X_TX_DBG_LOG_SIZE); |
3746 | config.num_wds_entries = __cpu_to_le32(TARGET_10X_NUM_WDS_ENTRIES); | 3950 | config.num_wds_entries = __cpu_to_le32(TARGET_10X_NUM_WDS_ENTRIES); |
3747 | config.dma_burst_size = __cpu_to_le32(TARGET_10X_DMA_BURST_SIZE); | 3951 | config.dma_burst_size = __cpu_to_le32(TARGET_10_2_DMA_BURST_SIZE); |
3748 | config.mac_aggr_delim = __cpu_to_le32(TARGET_10X_MAC_AGGR_DELIM); | 3952 | config.mac_aggr_delim = __cpu_to_le32(TARGET_10X_MAC_AGGR_DELIM); |
3749 | 3953 | ||
3750 | val = TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK; | 3954 | val = TARGET_10X_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK; |
@@ -3764,6 +3968,9 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar) | |||
3764 | 3968 | ||
3765 | cmd = (struct wmi_init_cmd_10_2 *)buf->data; | 3969 | cmd = (struct wmi_init_cmd_10_2 *)buf->data; |
3766 | 3970 | ||
3971 | features = WMI_10_2_RX_BATCH_MODE; | ||
3972 | cmd->resource_config.feature_mask = __cpu_to_le32(features); | ||
3973 | |||
3767 | memcpy(&cmd->resource_config.common, &config, sizeof(config)); | 3974 | memcpy(&cmd->resource_config.common, &config, sizeof(config)); |
3768 | ath10k_wmi_put_host_mem_chunks(ar, &cmd->mem_chunks); | 3975 | ath10k_wmi_put_host_mem_chunks(ar, &cmd->mem_chunks); |
3769 | 3976 | ||
@@ -4680,12 +4887,12 @@ ath10k_wmi_10_2_op_gen_pdev_get_temperature(struct ath10k *ar) | |||
4680 | 4887 | ||
4681 | /* This function assumes the beacon is already DMA mapped */ | 4888 | /* This function assumes the beacon is already DMA mapped */ |
4682 | static struct sk_buff * | 4889 | static struct sk_buff * |
4683 | ath10k_wmi_op_gen_beacon_dma(struct ath10k_vif *arvif) | 4890 | ath10k_wmi_op_gen_beacon_dma(struct ath10k *ar, u32 vdev_id, const void *bcn, |
4891 | size_t bcn_len, u32 bcn_paddr, bool dtim_zero, | ||
4892 | bool deliver_cab) | ||
4684 | { | 4893 | { |
4685 | struct ath10k *ar = arvif->ar; | ||
4686 | struct wmi_bcn_tx_ref_cmd *cmd; | 4894 | struct wmi_bcn_tx_ref_cmd *cmd; |
4687 | struct sk_buff *skb; | 4895 | struct sk_buff *skb; |
4688 | struct sk_buff *beacon = arvif->beacon; | ||
4689 | struct ieee80211_hdr *hdr; | 4896 | struct ieee80211_hdr *hdr; |
4690 | u16 fc; | 4897 | u16 fc; |
4691 | 4898 | ||
@@ -4693,29 +4900,29 @@ ath10k_wmi_op_gen_beacon_dma(struct ath10k_vif *arvif) | |||
4693 | if (!skb) | 4900 | if (!skb) |
4694 | return ERR_PTR(-ENOMEM); | 4901 | return ERR_PTR(-ENOMEM); |
4695 | 4902 | ||
4696 | hdr = (struct ieee80211_hdr *)beacon->data; | 4903 | hdr = (struct ieee80211_hdr *)bcn; |
4697 | fc = le16_to_cpu(hdr->frame_control); | 4904 | fc = le16_to_cpu(hdr->frame_control); |
4698 | 4905 | ||
4699 | cmd = (struct wmi_bcn_tx_ref_cmd *)skb->data; | 4906 | cmd = (struct wmi_bcn_tx_ref_cmd *)skb->data; |
4700 | cmd->vdev_id = __cpu_to_le32(arvif->vdev_id); | 4907 | cmd->vdev_id = __cpu_to_le32(vdev_id); |
4701 | cmd->data_len = __cpu_to_le32(beacon->len); | 4908 | cmd->data_len = __cpu_to_le32(bcn_len); |
4702 | cmd->data_ptr = __cpu_to_le32(ATH10K_SKB_CB(beacon)->paddr); | 4909 | cmd->data_ptr = __cpu_to_le32(bcn_paddr); |
4703 | cmd->msdu_id = 0; | 4910 | cmd->msdu_id = 0; |
4704 | cmd->frame_control = __cpu_to_le32(fc); | 4911 | cmd->frame_control = __cpu_to_le32(fc); |
4705 | cmd->flags = 0; | 4912 | cmd->flags = 0; |
4706 | cmd->antenna_mask = __cpu_to_le32(WMI_BCN_TX_REF_DEF_ANTENNA); | 4913 | cmd->antenna_mask = __cpu_to_le32(WMI_BCN_TX_REF_DEF_ANTENNA); |
4707 | 4914 | ||
4708 | if (ATH10K_SKB_CB(beacon)->bcn.dtim_zero) | 4915 | if (dtim_zero) |
4709 | cmd->flags |= __cpu_to_le32(WMI_BCN_TX_REF_FLAG_DTIM_ZERO); | 4916 | cmd->flags |= __cpu_to_le32(WMI_BCN_TX_REF_FLAG_DTIM_ZERO); |
4710 | 4917 | ||
4711 | if (ATH10K_SKB_CB(beacon)->bcn.deliver_cab) | 4918 | if (deliver_cab) |
4712 | cmd->flags |= __cpu_to_le32(WMI_BCN_TX_REF_FLAG_DELIVER_CAB); | 4919 | cmd->flags |= __cpu_to_le32(WMI_BCN_TX_REF_FLAG_DELIVER_CAB); |
4713 | 4920 | ||
4714 | return skb; | 4921 | return skb; |
4715 | } | 4922 | } |
4716 | 4923 | ||
4717 | void ath10k_wmi_pdev_set_wmm_param(struct wmi_wmm_params *params, | 4924 | void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params, |
4718 | const struct wmi_wmm_params_arg *arg) | 4925 | const struct wmi_wmm_params_arg *arg) |
4719 | { | 4926 | { |
4720 | params->cwmin = __cpu_to_le32(arg->cwmin); | 4927 | params->cwmin = __cpu_to_le32(arg->cwmin); |
4721 | params->cwmax = __cpu_to_le32(arg->cwmax); | 4928 | params->cwmax = __cpu_to_le32(arg->cwmax); |
@@ -4727,7 +4934,7 @@ void ath10k_wmi_pdev_set_wmm_param(struct wmi_wmm_params *params, | |||
4727 | 4934 | ||
4728 | static struct sk_buff * | 4935 | static struct sk_buff * |
4729 | ath10k_wmi_op_gen_pdev_set_wmm(struct ath10k *ar, | 4936 | ath10k_wmi_op_gen_pdev_set_wmm(struct ath10k *ar, |
4730 | const struct wmi_pdev_set_wmm_params_arg *arg) | 4937 | const struct wmi_wmm_params_all_arg *arg) |
4731 | { | 4938 | { |
4732 | struct wmi_pdev_set_wmm_params *cmd; | 4939 | struct wmi_pdev_set_wmm_params *cmd; |
4733 | struct sk_buff *skb; | 4940 | struct sk_buff *skb; |
@@ -4737,10 +4944,10 @@ ath10k_wmi_op_gen_pdev_set_wmm(struct ath10k *ar, | |||
4737 | return ERR_PTR(-ENOMEM); | 4944 | return ERR_PTR(-ENOMEM); |
4738 | 4945 | ||
4739 | cmd = (struct wmi_pdev_set_wmm_params *)skb->data; | 4946 | cmd = (struct wmi_pdev_set_wmm_params *)skb->data; |
4740 | ath10k_wmi_pdev_set_wmm_param(&cmd->ac_be, &arg->ac_be); | 4947 | ath10k_wmi_set_wmm_param(&cmd->ac_be, &arg->ac_be); |
4741 | ath10k_wmi_pdev_set_wmm_param(&cmd->ac_bk, &arg->ac_bk); | 4948 | ath10k_wmi_set_wmm_param(&cmd->ac_bk, &arg->ac_bk); |
4742 | ath10k_wmi_pdev_set_wmm_param(&cmd->ac_vi, &arg->ac_vi); | 4949 | ath10k_wmi_set_wmm_param(&cmd->ac_vi, &arg->ac_vi); |
4743 | ath10k_wmi_pdev_set_wmm_param(&cmd->ac_vo, &arg->ac_vo); | 4950 | ath10k_wmi_set_wmm_param(&cmd->ac_vo, &arg->ac_vo); |
4744 | 4951 | ||
4745 | ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi pdev set wmm params\n"); | 4952 | ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi pdev set wmm params\n"); |
4746 | return skb; | 4953 | return skb; |
@@ -4784,7 +4991,8 @@ ath10k_wmi_op_gen_force_fw_hang(struct ath10k *ar, | |||
4784 | } | 4991 | } |
4785 | 4992 | ||
4786 | static struct sk_buff * | 4993 | static struct sk_buff * |
4787 | ath10k_wmi_op_gen_dbglog_cfg(struct ath10k *ar, u32 module_enable) | 4994 | ath10k_wmi_op_gen_dbglog_cfg(struct ath10k *ar, u32 module_enable, |
4995 | u32 log_level) | ||
4788 | { | 4996 | { |
4789 | struct wmi_dbglog_cfg_cmd *cmd; | 4997 | struct wmi_dbglog_cfg_cmd *cmd; |
4790 | struct sk_buff *skb; | 4998 | struct sk_buff *skb; |
@@ -4797,7 +5005,7 @@ ath10k_wmi_op_gen_dbglog_cfg(struct ath10k *ar, u32 module_enable) | |||
4797 | cmd = (struct wmi_dbglog_cfg_cmd *)skb->data; | 5005 | cmd = (struct wmi_dbglog_cfg_cmd *)skb->data; |
4798 | 5006 | ||
4799 | if (module_enable) { | 5007 | if (module_enable) { |
4800 | cfg = SM(ATH10K_DBGLOG_LEVEL_VERBOSE, | 5008 | cfg = SM(log_level, |
4801 | ATH10K_DBGLOG_CFG_LOG_LVL); | 5009 | ATH10K_DBGLOG_CFG_LOG_LVL); |
4802 | } else { | 5010 | } else { |
4803 | /* set back defaults, all modules with WARN level */ | 5011 | /* set back defaults, all modules with WARN level */ |
@@ -4877,6 +5085,109 @@ ath10k_wmi_op_gen_pdev_set_quiet_mode(struct ath10k *ar, u32 period, | |||
4877 | return skb; | 5085 | return skb; |
4878 | } | 5086 | } |
4879 | 5087 | ||
5088 | static struct sk_buff * | ||
5089 | ath10k_wmi_op_gen_addba_clear_resp(struct ath10k *ar, u32 vdev_id, | ||
5090 | const u8 *mac) | ||
5091 | { | ||
5092 | struct wmi_addba_clear_resp_cmd *cmd; | ||
5093 | struct sk_buff *skb; | ||
5094 | |||
5095 | if (!mac) | ||
5096 | return ERR_PTR(-EINVAL); | ||
5097 | |||
5098 | skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); | ||
5099 | if (!skb) | ||
5100 | return ERR_PTR(-ENOMEM); | ||
5101 | |||
5102 | cmd = (struct wmi_addba_clear_resp_cmd *)skb->data; | ||
5103 | cmd->vdev_id = __cpu_to_le32(vdev_id); | ||
5104 | ether_addr_copy(cmd->peer_macaddr.addr, mac); | ||
5105 | |||
5106 | ath10k_dbg(ar, ATH10K_DBG_WMI, | ||
5107 | "wmi addba clear resp vdev_id 0x%X mac_addr %pM\n", | ||
5108 | vdev_id, mac); | ||
5109 | return skb; | ||
5110 | } | ||
5111 | |||
5112 | static struct sk_buff * | ||
5113 | ath10k_wmi_op_gen_addba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac, | ||
5114 | u32 tid, u32 buf_size) | ||
5115 | { | ||
5116 | struct wmi_addba_send_cmd *cmd; | ||
5117 | struct sk_buff *skb; | ||
5118 | |||
5119 | if (!mac) | ||
5120 | return ERR_PTR(-EINVAL); | ||
5121 | |||
5122 | skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); | ||
5123 | if (!skb) | ||
5124 | return ERR_PTR(-ENOMEM); | ||
5125 | |||
5126 | cmd = (struct wmi_addba_send_cmd *)skb->data; | ||
5127 | cmd->vdev_id = __cpu_to_le32(vdev_id); | ||
5128 | ether_addr_copy(cmd->peer_macaddr.addr, mac); | ||
5129 | cmd->tid = __cpu_to_le32(tid); | ||
5130 | cmd->buffersize = __cpu_to_le32(buf_size); | ||
5131 | |||
5132 | ath10k_dbg(ar, ATH10K_DBG_WMI, | ||
5133 | "wmi addba send vdev_id 0x%X mac_addr %pM tid %u bufsize %u\n", | ||
5134 | vdev_id, mac, tid, buf_size); | ||
5135 | return skb; | ||
5136 | } | ||
5137 | |||
5138 | static struct sk_buff * | ||
5139 | ath10k_wmi_op_gen_addba_set_resp(struct ath10k *ar, u32 vdev_id, const u8 *mac, | ||
5140 | u32 tid, u32 status) | ||
5141 | { | ||
5142 | struct wmi_addba_setresponse_cmd *cmd; | ||
5143 | struct sk_buff *skb; | ||
5144 | |||
5145 | if (!mac) | ||
5146 | return ERR_PTR(-EINVAL); | ||
5147 | |||
5148 | skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); | ||
5149 | if (!skb) | ||
5150 | return ERR_PTR(-ENOMEM); | ||
5151 | |||
5152 | cmd = (struct wmi_addba_setresponse_cmd *)skb->data; | ||
5153 | cmd->vdev_id = __cpu_to_le32(vdev_id); | ||
5154 | ether_addr_copy(cmd->peer_macaddr.addr, mac); | ||
5155 | cmd->tid = __cpu_to_le32(tid); | ||
5156 | cmd->statuscode = __cpu_to_le32(status); | ||
5157 | |||
5158 | ath10k_dbg(ar, ATH10K_DBG_WMI, | ||
5159 | "wmi addba set resp vdev_id 0x%X mac_addr %pM tid %u status %u\n", | ||
5160 | vdev_id, mac, tid, status); | ||
5161 | return skb; | ||
5162 | } | ||
5163 | |||
5164 | static struct sk_buff * | ||
5165 | ath10k_wmi_op_gen_delba_send(struct ath10k *ar, u32 vdev_id, const u8 *mac, | ||
5166 | u32 tid, u32 initiator, u32 reason) | ||
5167 | { | ||
5168 | struct wmi_delba_send_cmd *cmd; | ||
5169 | struct sk_buff *skb; | ||
5170 | |||
5171 | if (!mac) | ||
5172 | return ERR_PTR(-EINVAL); | ||
5173 | |||
5174 | skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); | ||
5175 | if (!skb) | ||
5176 | return ERR_PTR(-ENOMEM); | ||
5177 | |||
5178 | cmd = (struct wmi_delba_send_cmd *)skb->data; | ||
5179 | cmd->vdev_id = __cpu_to_le32(vdev_id); | ||
5180 | ether_addr_copy(cmd->peer_macaddr.addr, mac); | ||
5181 | cmd->tid = __cpu_to_le32(tid); | ||
5182 | cmd->initiator = __cpu_to_le32(initiator); | ||
5183 | cmd->reasoncode = __cpu_to_le32(reason); | ||
5184 | |||
5185 | ath10k_dbg(ar, ATH10K_DBG_WMI, | ||
5186 | "wmi delba send vdev_id 0x%X mac_addr %pM tid %u initiator %u reason %u\n", | ||
5187 | vdev_id, mac, tid, initiator, reason); | ||
5188 | return skb; | ||
5189 | } | ||
5190 | |||
4880 | static const struct wmi_ops wmi_ops = { | 5191 | static const struct wmi_ops wmi_ops = { |
4881 | .rx = ath10k_wmi_op_rx, | 5192 | .rx = ath10k_wmi_op_rx, |
4882 | .map_svc = wmi_main_svc_map, | 5193 | .map_svc = wmi_main_svc_map, |
@@ -4909,6 +5220,7 @@ static const struct wmi_ops wmi_ops = { | |||
4909 | .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, | 5220 | .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, |
4910 | .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, | 5221 | .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, |
4911 | .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, | 5222 | .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, |
5223 | /* .gen_vdev_wmm_conf not implemented */ | ||
4912 | .gen_peer_create = ath10k_wmi_op_gen_peer_create, | 5224 | .gen_peer_create = ath10k_wmi_op_gen_peer_create, |
4913 | .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, | 5225 | .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, |
4914 | .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, | 5226 | .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, |
@@ -4928,6 +5240,13 @@ static const struct wmi_ops wmi_ops = { | |||
4928 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 5240 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
4929 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 5241 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
4930 | /* .gen_pdev_get_temperature not implemented */ | 5242 | /* .gen_pdev_get_temperature not implemented */ |
5243 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
5244 | .gen_addba_send = ath10k_wmi_op_gen_addba_send, | ||
5245 | .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, | ||
5246 | .gen_delba_send = ath10k_wmi_op_gen_delba_send, | ||
5247 | /* .gen_bcn_tmpl not implemented */ | ||
5248 | /* .gen_prb_tmpl not implemented */ | ||
5249 | /* .gen_p2p_go_bcn_ie not implemented */ | ||
4931 | }; | 5250 | }; |
4932 | 5251 | ||
4933 | static const struct wmi_ops wmi_10_1_ops = { | 5252 | static const struct wmi_ops wmi_10_1_ops = { |
@@ -4965,6 +5284,7 @@ static const struct wmi_ops wmi_10_1_ops = { | |||
4965 | .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, | 5284 | .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, |
4966 | .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, | 5285 | .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, |
4967 | .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, | 5286 | .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, |
5287 | /* .gen_vdev_wmm_conf not implemented */ | ||
4968 | .gen_peer_create = ath10k_wmi_op_gen_peer_create, | 5288 | .gen_peer_create = ath10k_wmi_op_gen_peer_create, |
4969 | .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, | 5289 | .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, |
4970 | .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, | 5290 | .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, |
@@ -4982,10 +5302,18 @@ static const struct wmi_ops wmi_10_1_ops = { | |||
4982 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, | 5302 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, |
4983 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 5303 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
4984 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 5304 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
5305 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
5306 | .gen_addba_send = ath10k_wmi_op_gen_addba_send, | ||
5307 | .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, | ||
5308 | .gen_delba_send = ath10k_wmi_op_gen_delba_send, | ||
5309 | /* .gen_bcn_tmpl not implemented */ | ||
5310 | /* .gen_prb_tmpl not implemented */ | ||
5311 | /* .gen_p2p_go_bcn_ie not implemented */ | ||
4985 | }; | 5312 | }; |
4986 | 5313 | ||
4987 | static const struct wmi_ops wmi_10_2_ops = { | 5314 | static const struct wmi_ops wmi_10_2_ops = { |
4988 | .rx = ath10k_wmi_10_2_op_rx, | 5315 | .rx = ath10k_wmi_10_2_op_rx, |
5316 | .pull_fw_stats = ath10k_wmi_10_2_op_pull_fw_stats, | ||
4989 | .gen_init = ath10k_wmi_10_2_op_gen_init, | 5317 | .gen_init = ath10k_wmi_10_2_op_gen_init, |
4990 | .gen_peer_assoc = ath10k_wmi_10_2_op_gen_peer_assoc, | 5318 | .gen_peer_assoc = ath10k_wmi_10_2_op_gen_peer_assoc, |
4991 | /* .gen_pdev_get_temperature not implemented */ | 5319 | /* .gen_pdev_get_temperature not implemented */ |
@@ -4993,7 +5321,6 @@ static const struct wmi_ops wmi_10_2_ops = { | |||
4993 | /* shared with 10.1 */ | 5321 | /* shared with 10.1 */ |
4994 | .map_svc = wmi_10x_svc_map, | 5322 | .map_svc = wmi_10x_svc_map, |
4995 | .pull_svc_rdy = ath10k_wmi_10x_op_pull_svc_rdy_ev, | 5323 | .pull_svc_rdy = ath10k_wmi_10x_op_pull_svc_rdy_ev, |
4996 | .pull_fw_stats = ath10k_wmi_10x_op_pull_fw_stats, | ||
4997 | .gen_pdev_set_rd = ath10k_wmi_10x_op_gen_pdev_set_rd, | 5324 | .gen_pdev_set_rd = ath10k_wmi_10x_op_gen_pdev_set_rd, |
4998 | .gen_start_scan = ath10k_wmi_10x_op_gen_start_scan, | 5325 | .gen_start_scan = ath10k_wmi_10x_op_gen_start_scan, |
4999 | 5326 | ||
@@ -5020,6 +5347,7 @@ static const struct wmi_ops wmi_10_2_ops = { | |||
5020 | .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, | 5347 | .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, |
5021 | .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, | 5348 | .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, |
5022 | .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, | 5349 | .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, |
5350 | /* .gen_vdev_wmm_conf not implemented */ | ||
5023 | .gen_peer_create = ath10k_wmi_op_gen_peer_create, | 5351 | .gen_peer_create = ath10k_wmi_op_gen_peer_create, |
5024 | .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, | 5352 | .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, |
5025 | .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, | 5353 | .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, |
@@ -5037,10 +5365,15 @@ static const struct wmi_ops wmi_10_2_ops = { | |||
5037 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, | 5365 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, |
5038 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 5366 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
5039 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 5367 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
5368 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
5369 | .gen_addba_send = ath10k_wmi_op_gen_addba_send, | ||
5370 | .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, | ||
5371 | .gen_delba_send = ath10k_wmi_op_gen_delba_send, | ||
5040 | }; | 5372 | }; |
5041 | 5373 | ||
5042 | static const struct wmi_ops wmi_10_2_4_ops = { | 5374 | static const struct wmi_ops wmi_10_2_4_ops = { |
5043 | .rx = ath10k_wmi_10_2_op_rx, | 5375 | .rx = ath10k_wmi_10_2_op_rx, |
5376 | .pull_fw_stats = ath10k_wmi_10_2_4_op_pull_fw_stats, | ||
5044 | .gen_init = ath10k_wmi_10_2_op_gen_init, | 5377 | .gen_init = ath10k_wmi_10_2_op_gen_init, |
5045 | .gen_peer_assoc = ath10k_wmi_10_2_op_gen_peer_assoc, | 5378 | .gen_peer_assoc = ath10k_wmi_10_2_op_gen_peer_assoc, |
5046 | .gen_pdev_get_temperature = ath10k_wmi_10_2_op_gen_pdev_get_temperature, | 5379 | .gen_pdev_get_temperature = ath10k_wmi_10_2_op_gen_pdev_get_temperature, |
@@ -5048,7 +5381,6 @@ static const struct wmi_ops wmi_10_2_4_ops = { | |||
5048 | /* shared with 10.1 */ | 5381 | /* shared with 10.1 */ |
5049 | .map_svc = wmi_10x_svc_map, | 5382 | .map_svc = wmi_10x_svc_map, |
5050 | .pull_svc_rdy = ath10k_wmi_10x_op_pull_svc_rdy_ev, | 5383 | .pull_svc_rdy = ath10k_wmi_10x_op_pull_svc_rdy_ev, |
5051 | .pull_fw_stats = ath10k_wmi_10x_op_pull_fw_stats, | ||
5052 | .gen_pdev_set_rd = ath10k_wmi_10x_op_gen_pdev_set_rd, | 5384 | .gen_pdev_set_rd = ath10k_wmi_10x_op_gen_pdev_set_rd, |
5053 | .gen_start_scan = ath10k_wmi_10x_op_gen_start_scan, | 5385 | .gen_start_scan = ath10k_wmi_10x_op_gen_start_scan, |
5054 | 5386 | ||
@@ -5092,6 +5424,13 @@ static const struct wmi_ops wmi_10_2_4_ops = { | |||
5092 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, | 5424 | .gen_pktlog_enable = ath10k_wmi_op_gen_pktlog_enable, |
5093 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, | 5425 | .gen_pktlog_disable = ath10k_wmi_op_gen_pktlog_disable, |
5094 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, | 5426 | .gen_pdev_set_quiet_mode = ath10k_wmi_op_gen_pdev_set_quiet_mode, |
5427 | .gen_addba_clear_resp = ath10k_wmi_op_gen_addba_clear_resp, | ||
5428 | .gen_addba_send = ath10k_wmi_op_gen_addba_send, | ||
5429 | .gen_addba_set_resp = ath10k_wmi_op_gen_addba_set_resp, | ||
5430 | .gen_delba_send = ath10k_wmi_op_gen_delba_send, | ||
5431 | /* .gen_bcn_tmpl not implemented */ | ||
5432 | /* .gen_prb_tmpl not implemented */ | ||
5433 | /* .gen_p2p_go_bcn_ie not implemented */ | ||
5095 | }; | 5434 | }; |
5096 | 5435 | ||
5097 | int ath10k_wmi_attach(struct ath10k *ar) | 5436 | int ath10k_wmi_attach(struct ath10k *ar) |