Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git

ath.git patches for 5.1. Major changes:

ath10k

* change QMI interface to support the new (and backwards incompatible)
interface from HL3.1 and used in recent HL2.0 branch firmware releases

ath

* add new country codes for US

+604 -73
+62 -13
drivers/net/wireless/ath/ath10k/ce.c
··· 228 228 } 229 229 230 230 static inline void ath10k_ce_src_ring_base_addr_set(struct ath10k *ar, 231 - u32 ce_ctrl_addr, 232 - unsigned int addr) 231 + u32 ce_id, 232 + u64 addr) 233 233 { 234 + struct ath10k_ce *ce = ath10k_ce_priv(ar); 235 + struct ath10k_ce_pipe *ce_state = &ce->ce_states[ce_id]; 236 + u32 ce_ctrl_addr = ath10k_ce_base_address(ar, ce_id); 237 + u32 addr_lo = lower_32_bits(addr); 238 + 234 239 ath10k_ce_write32(ar, ce_ctrl_addr + 235 - ar->hw_ce_regs->sr_base_addr, addr); 240 + ar->hw_ce_regs->sr_base_addr_lo, addr_lo); 241 + 242 + if (ce_state->ops->ce_set_src_ring_base_addr_hi) { 243 + ce_state->ops->ce_set_src_ring_base_addr_hi(ar, ce_ctrl_addr, 244 + addr); 245 + } 246 + } 247 + 248 + static void ath10k_ce_set_src_ring_base_addr_hi(struct ath10k *ar, 249 + u32 ce_ctrl_addr, 250 + u64 addr) 251 + { 252 + u32 addr_hi = upper_32_bits(addr) & CE_DESC_ADDR_HI_MASK; 253 + 254 + ath10k_ce_write32(ar, ce_ctrl_addr + 255 + ar->hw_ce_regs->sr_base_addr_hi, addr_hi); 236 256 } 237 257 238 258 static inline void ath10k_ce_src_ring_size_set(struct ath10k *ar, ··· 333 313 } 334 314 335 315 static inline void ath10k_ce_dest_ring_base_addr_set(struct ath10k *ar, 336 - u32 ce_ctrl_addr, 337 - u32 addr) 316 + u32 ce_id, 317 + u64 addr) 338 318 { 319 + struct ath10k_ce *ce = ath10k_ce_priv(ar); 320 + struct ath10k_ce_pipe *ce_state = &ce->ce_states[ce_id]; 321 + u32 ce_ctrl_addr = ath10k_ce_base_address(ar, ce_id); 322 + u32 addr_lo = lower_32_bits(addr); 323 + 339 324 ath10k_ce_write32(ar, ce_ctrl_addr + 340 - ar->hw_ce_regs->dr_base_addr, addr); 325 + ar->hw_ce_regs->dr_base_addr_lo, addr_lo); 326 + 327 + if (ce_state->ops->ce_set_dest_ring_base_addr_hi) { 328 + ce_state->ops->ce_set_dest_ring_base_addr_hi(ar, ce_ctrl_addr, 329 + addr); 330 + } 331 + } 332 + 333 + static void ath10k_ce_set_dest_ring_base_addr_hi(struct ath10k *ar, 334 + u32 ce_ctrl_addr, 335 + u64 addr) 336 + { 337 + u32 addr_hi = upper_32_bits(addr) & CE_DESC_ADDR_HI_MASK; 338 + u32 reg_value; 339 + 340 + reg_value = ath10k_ce_read32(ar, ce_ctrl_addr + 341 + ar->hw_ce_regs->dr_base_addr_hi); 342 + reg_value &= ~CE_DESC_ADDR_HI_MASK; 343 + reg_value |= addr_hi; 344 + ath10k_ce_write32(ar, ce_ctrl_addr + 345 + ar->hw_ce_regs->dr_base_addr_hi, reg_value); 341 346 } 342 347 343 348 static inline void ath10k_ce_dest_ring_size_set(struct ath10k *ar, ··· 608 563 609 564 addr = (__le32 *)&sdesc.addr; 610 565 611 - flags |= upper_32_bits(buffer) & CE_DESC_FLAGS_GET_MASK; 566 + flags |= upper_32_bits(buffer) & CE_DESC_ADDR_HI_MASK; 612 567 addr[0] = __cpu_to_le32(buffer); 613 568 addr[1] = __cpu_to_le32(flags); 614 569 if (flags & CE_SEND_FLAG_GATHER) ··· 776 731 return -ENOSPC; 777 732 778 733 desc->addr = __cpu_to_le64(paddr); 779 - desc->addr &= __cpu_to_le64(CE_DESC_37BIT_ADDR_MASK); 734 + desc->addr &= __cpu_to_le64(CE_DESC_ADDR_MASK); 780 735 781 736 desc->nbytes = 0; 782 737 ··· 1391 1346 ath10k_ce_src_ring_write_index_get(ar, ctrl_addr); 1392 1347 src_ring->write_index &= src_ring->nentries_mask; 1393 1348 1394 - ath10k_ce_src_ring_base_addr_set(ar, ctrl_addr, 1349 + ath10k_ce_src_ring_base_addr_set(ar, ce_id, 1395 1350 src_ring->base_addr_ce_space); 1396 1351 ath10k_ce_src_ring_size_set(ar, ctrl_addr, nentries); 1397 1352 ath10k_ce_src_ring_dmax_set(ar, ctrl_addr, attr->src_sz_max); ··· 1430 1385 ath10k_ce_dest_ring_write_index_get(ar, ctrl_addr); 1431 1386 dest_ring->write_index &= dest_ring->nentries_mask; 1432 1387 1433 - ath10k_ce_dest_ring_base_addr_set(ar, ctrl_addr, 1388 + ath10k_ce_dest_ring_base_addr_set(ar, ce_id, 1434 1389 dest_ring->base_addr_ce_space); 1435 1390 ath10k_ce_dest_ring_size_set(ar, ctrl_addr, nentries); 1436 1391 ath10k_ce_dest_ring_byte_swap_set(ar, ctrl_addr, 0); ··· 1705 1660 { 1706 1661 u32 ctrl_addr = ath10k_ce_base_address(ar, ce_id); 1707 1662 1708 - ath10k_ce_src_ring_base_addr_set(ar, ctrl_addr, 0); 1663 + ath10k_ce_src_ring_base_addr_set(ar, ce_id, 0); 1709 1664 ath10k_ce_src_ring_size_set(ar, ctrl_addr, 0); 1710 1665 ath10k_ce_src_ring_dmax_set(ar, ctrl_addr, 0); 1711 1666 ath10k_ce_src_ring_highmark_set(ar, ctrl_addr, 0); ··· 1715 1670 { 1716 1671 u32 ctrl_addr = ath10k_ce_base_address(ar, ce_id); 1717 1672 1718 - ath10k_ce_dest_ring_base_addr_set(ar, ctrl_addr, 0); 1673 + ath10k_ce_dest_ring_base_addr_set(ar, ce_id, 0); 1719 1674 ath10k_ce_dest_ring_size_set(ar, ctrl_addr, 0); 1720 1675 ath10k_ce_dest_ring_highmark_set(ar, ctrl_addr, 0); 1721 1676 } ··· 1847 1802 .ce_extract_desc_data = ath10k_ce_extract_desc_data, 1848 1803 .ce_free_pipe = _ath10k_ce_free_pipe, 1849 1804 .ce_send_nolock = _ath10k_ce_send_nolock, 1805 + .ce_set_src_ring_base_addr_hi = NULL, 1806 + .ce_set_dest_ring_base_addr_hi = NULL, 1850 1807 }; 1851 1808 1852 1809 static const struct ath10k_ce_ops ce_64_ops = { ··· 1861 1814 .ce_extract_desc_data = ath10k_ce_extract_desc_data_64, 1862 1815 .ce_free_pipe = _ath10k_ce_free_pipe_64, 1863 1816 .ce_send_nolock = _ath10k_ce_send_nolock_64, 1817 + .ce_set_src_ring_base_addr_hi = ath10k_ce_set_src_ring_base_addr_hi, 1818 + .ce_set_dest_ring_base_addr_hi = ath10k_ce_set_dest_ring_base_addr_hi, 1864 1819 }; 1865 1820 1866 1821 static void ath10k_ce_set_ops(struct ath10k *ar, ··· 1958 1909 lower_32_bits(ce->paddr_rri)); 1959 1910 ath10k_ce_write32(ar, ar->hw_ce_regs->ce_rri_high, 1960 1911 (upper_32_bits(ce->paddr_rri) & 1961 - CE_DESC_FLAGS_GET_MASK)); 1912 + CE_DESC_ADDR_HI_MASK)); 1962 1913 1963 1914 for (i = 0; i < CE_COUNT; i++) { 1964 1915 ctrl1_regs = ar->hw_ce_regs->ctrl1_regs->addr;
+10 -4
drivers/net/wireless/ath/ath10k/ce.h
··· 39 39 #define CE_DESC_FLAGS_BYTE_SWAP (1 << 1) 40 40 #define CE_WCN3990_DESC_FLAGS_GATHER BIT(31) 41 41 42 - #define CE_DESC_FLAGS_GET_MASK GENMASK(4, 0) 43 - #define CE_DESC_37BIT_ADDR_MASK GENMASK_ULL(37, 0) 42 + #define CE_DESC_ADDR_MASK GENMASK_ULL(34, 0) 43 + #define CE_DESC_ADDR_HI_MASK GENMASK(4, 0) 44 44 45 45 /* Following desc flags are used in QCA99X0 */ 46 46 #define CE_DESC_FLAGS_HOST_INT_DIS (1 << 2) ··· 104 104 /* Host address space */ 105 105 void *base_addr_owner_space_unaligned; 106 106 /* CE address space */ 107 - u32 base_addr_ce_space_unaligned; 107 + dma_addr_t base_addr_ce_space_unaligned; 108 108 109 109 /* 110 110 * Actual start of descriptors. ··· 115 115 void *base_addr_owner_space; 116 116 117 117 /* CE address space */ 118 - u32 base_addr_ce_space; 118 + dma_addr_t base_addr_ce_space; 119 119 120 120 char *shadow_base_unaligned; 121 121 struct ce_desc *shadow_base; ··· 334 334 void *per_transfer_context, 335 335 dma_addr_t buffer, u32 nbytes, 336 336 u32 transfer_id, u32 flags); 337 + void (*ce_set_src_ring_base_addr_hi)(struct ath10k *ar, 338 + u32 ce_ctrl_addr, 339 + u64 addr); 340 + void (*ce_set_dest_ring_base_addr_hi)(struct ath10k *ar, 341 + u32 ce_ctrl_addr, 342 + u64 addr); 337 343 }; 338 344 339 345 static inline u32 ath10k_ce_base_address(struct ath10k *ar, unsigned int ce_id)
+11 -1
drivers/net/wireless/ath/ath10k/core.c
··· 2309 2309 ar->max_num_stations = TARGET_TLV_NUM_STATIONS; 2310 2310 ar->max_num_vdevs = TARGET_TLV_NUM_VDEVS; 2311 2311 ar->max_num_tdls_vdevs = TARGET_TLV_NUM_TDLS_VDEVS; 2312 - ar->htt.max_num_pending_tx = TARGET_TLV_NUM_MSDU_DESC; 2312 + if (ar->hif.bus == ATH10K_BUS_SDIO) 2313 + ar->htt.max_num_pending_tx = 2314 + TARGET_TLV_NUM_MSDU_DESC_HL; 2315 + else 2316 + ar->htt.max_num_pending_tx = TARGET_TLV_NUM_MSDU_DESC; 2313 2317 ar->wow.max_num_patterns = TARGET_TLV_NUM_WOW_PATTERNS; 2314 2318 ar->fw_stats_req_mask = WMI_STAT_PDEV | WMI_STAT_VDEV | 2315 2319 WMI_STAT_PEER; ··· 2557 2553 status = ath10k_htc_wait_target(&ar->htc); 2558 2554 if (status) { 2559 2555 ath10k_err(ar, "failed to connect to HTC: %d\n", status); 2556 + goto err_hif_stop; 2557 + } 2558 + 2559 + status = ath10k_hif_swap_mailbox(ar); 2560 + if (status) { 2561 + ath10k_err(ar, "failed to swap mailbox: %d\n", status); 2560 2562 goto err_hif_stop; 2561 2563 } 2562 2564
+9
drivers/net/wireless/ath/ath10k/hif.h
··· 59 59 */ 60 60 void (*stop)(struct ath10k *ar); 61 61 62 + int (*swap_mailbox)(struct ath10k *ar); 63 + 62 64 int (*map_service_to_pipe)(struct ath10k *ar, u16 service_id, 63 65 u8 *ul_pipe, u8 *dl_pipe); 64 66 ··· 139 137 static inline void ath10k_hif_stop(struct ath10k *ar) 140 138 { 141 139 return ar->hif.ops->stop(ar); 140 + } 141 + 142 + static inline int ath10k_hif_swap_mailbox(struct ath10k *ar) 143 + { 144 + if (ar->hif.ops->swap_mailbox) 145 + return ar->hif.ops->swap_mailbox(ar); 146 + return 0; 142 147 } 143 148 144 149 static inline int ath10k_hif_map_service_to_pipe(struct ath10k *ar,
+1 -1
drivers/net/wireless/ath/ath10k/htt.c
··· 268 268 return status; 269 269 } 270 270 271 - status = ath10k_htt_h2t_aggr_cfg_msg(htt, 271 + status = htt->tx_ops->htt_h2t_aggr_cfg_msg(htt, 272 272 htt->max_num_ampdu, 273 273 htt->max_num_amsdu); 274 274 if (status) {
+11
drivers/net/wireless/ath/ath10k/htt.h
··· 357 357 u8 max_num_amsdu_subframes; 358 358 } __packed; 359 359 360 + struct htt_aggr_conf_v2 { 361 + u8 max_num_ampdu_subframes; 362 + /* amsdu_subframes is limited by 0x1F mask */ 363 + u8 max_num_amsdu_subframes; 364 + u8 reserved; 365 + } __packed; 366 + 360 367 #define HTT_MGMT_FRM_HDR_DOWNLOAD_LEN 32 361 368 struct htt_mgmt_tx_desc_qca99x0 { 362 369 __le32 rate; ··· 1657 1650 struct htt_stats_req stats_req; 1658 1651 struct htt_oob_sync_req oob_sync_req; 1659 1652 struct htt_aggr_conf aggr_conf; 1653 + struct htt_aggr_conf_v2 aggr_conf_v2; 1660 1654 struct htt_frag_desc_bank_cfg32 frag_desc_bank_cfg32; 1661 1655 struct htt_frag_desc_bank_cfg64 frag_desc_bank_cfg64; 1662 1656 struct htt_tx_fetch_resp tx_fetch_resp; ··· 1898 1890 struct sk_buff *msdu); 1899 1891 int (*htt_alloc_txbuff)(struct ath10k_htt *htt); 1900 1892 void (*htt_free_txbuff)(struct ath10k_htt *htt); 1893 + int (*htt_h2t_aggr_cfg_msg)(struct ath10k_htt *htt, 1894 + u8 max_subfrms_ampdu, 1895 + u8 max_subfrms_amsdu); 1901 1896 }; 1902 1897 1903 1898 static inline int ath10k_htt_send_rx_ring_cfg(struct ath10k_htt *htt)
+3
drivers/net/wireless/ath/ath10k/htt_rx.c
··· 2975 2975 STATS_OP_FMT(RETRY).rate_table[0][idx] += pstats->retry_bytes; 2976 2976 STATS_OP_FMT(RETRY).rate_table[1][idx] += pstats->retry_pkts; 2977 2977 } 2978 + 2979 + tx_stats->tx_duration += pstats->duration; 2978 2980 } 2979 2981 2980 2982 static void ··· 3143 3141 p_tx_stats->succ_pkts = __le16_to_cpu(tx_stats->succ_pkts); 3144 3142 p_tx_stats->retry_pkts = __le16_to_cpu(tx_stats->retry_pkts); 3145 3143 p_tx_stats->failed_pkts = __le16_to_cpu(tx_stats->failed_pkts); 3144 + p_tx_stats->duration = __le16_to_cpu(tx_stats->tx_duration); 3146 3145 3147 3146 ath10k_update_per_peer_tx_stats(ar, sta, p_tx_stats); 3148 3147 }
+50 -1
drivers/net/wireless/ath/ath10k/htt_tx.c
··· 1035 1035 return 0; 1036 1036 } 1037 1037 1038 + static int ath10k_htt_h2t_aggr_cfg_msg_v2(struct ath10k_htt *htt, 1039 + u8 max_subfrms_ampdu, 1040 + u8 max_subfrms_amsdu) 1041 + { 1042 + struct ath10k *ar = htt->ar; 1043 + struct htt_aggr_conf_v2 *aggr_conf; 1044 + struct sk_buff *skb; 1045 + struct htt_cmd *cmd; 1046 + int len; 1047 + int ret; 1048 + 1049 + /* Firmware defaults are: amsdu = 3 and ampdu = 64 */ 1050 + 1051 + if (max_subfrms_ampdu == 0 || max_subfrms_ampdu > 64) 1052 + return -EINVAL; 1053 + 1054 + if (max_subfrms_amsdu == 0 || max_subfrms_amsdu > 31) 1055 + return -EINVAL; 1056 + 1057 + len = sizeof(cmd->hdr); 1058 + len += sizeof(cmd->aggr_conf_v2); 1059 + 1060 + skb = ath10k_htc_alloc_skb(ar, len); 1061 + if (!skb) 1062 + return -ENOMEM; 1063 + 1064 + skb_put(skb, len); 1065 + cmd = (struct htt_cmd *)skb->data; 1066 + cmd->hdr.msg_type = HTT_H2T_MSG_TYPE_AGGR_CFG; 1067 + 1068 + aggr_conf = &cmd->aggr_conf_v2; 1069 + aggr_conf->max_num_ampdu_subframes = max_subfrms_ampdu; 1070 + aggr_conf->max_num_amsdu_subframes = max_subfrms_amsdu; 1071 + 1072 + ath10k_dbg(ar, ATH10K_DBG_HTT, "htt h2t aggr cfg msg amsdu %d ampdu %d", 1073 + aggr_conf->max_num_amsdu_subframes, 1074 + aggr_conf->max_num_ampdu_subframes); 1075 + 1076 + ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); 1077 + if (ret) { 1078 + dev_kfree_skb_any(skb); 1079 + return ret; 1080 + } 1081 + 1082 + return 0; 1083 + } 1084 + 1038 1085 int ath10k_htt_tx_fetch_resp(struct ath10k *ar, 1039 1086 __le32 token, 1040 1087 __le16 fetch_seq_num, ··· 1545 1498 u16 msdu_id, flags1 = 0; 1546 1499 u16 freq = 0; 1547 1500 dma_addr_t frags_paddr = 0; 1548 - u32 txbuf_paddr; 1501 + dma_addr_t txbuf_paddr; 1549 1502 struct htt_msdu_ext_desc_64 *ext_desc = NULL; 1550 1503 struct htt_msdu_ext_desc_64 *ext_desc_t = NULL; 1551 1504 ··· 1739 1692 .htt_tx = ath10k_htt_tx_32, 1740 1693 .htt_alloc_txbuff = ath10k_htt_tx_alloc_cont_txbuf_32, 1741 1694 .htt_free_txbuff = ath10k_htt_tx_free_cont_txbuf_32, 1695 + .htt_h2t_aggr_cfg_msg = ath10k_htt_h2t_aggr_cfg_msg, 1742 1696 }; 1743 1697 1744 1698 static const struct ath10k_htt_tx_ops htt_tx_ops_64 = { ··· 1750 1702 .htt_tx = ath10k_htt_tx_64, 1751 1703 .htt_alloc_txbuff = ath10k_htt_tx_alloc_cont_txbuf_64, 1752 1704 .htt_free_txbuff = ath10k_htt_tx_free_cont_txbuf_64, 1705 + .htt_h2t_aggr_cfg_msg = ath10k_htt_h2t_aggr_cfg_msg_v2, 1753 1706 }; 1754 1707 1755 1708 static const struct ath10k_htt_tx_ops htt_tx_ops_hl = {
+6 -4
drivers/net/wireless/ath/ath10k/hw.c
··· 318 318 }; 319 319 320 320 const struct ath10k_hw_ce_regs wcn3990_ce_regs = { 321 - .sr_base_addr = 0x00000000, 321 + .sr_base_addr_lo = 0x00000000, 322 + .sr_base_addr_hi = 0x00000004, 322 323 .sr_size_addr = 0x00000008, 323 - .dr_base_addr = 0x0000000c, 324 + .dr_base_addr_lo = 0x0000000c, 325 + .dr_base_addr_hi = 0x00000010, 324 326 .dr_size_addr = 0x00000014, 325 327 .misc_ie_addr = 0x00000034, 326 328 .sr_wr_index_addr = 0x0000003c, ··· 466 464 }; 467 465 468 466 const struct ath10k_hw_ce_regs qcax_ce_regs = { 469 - .sr_base_addr = 0x00000000, 467 + .sr_base_addr_lo = 0x00000000, 470 468 .sr_size_addr = 0x00000004, 471 - .dr_base_addr = 0x00000008, 469 + .dr_base_addr_lo = 0x00000008, 472 470 .dr_size_addr = 0x0000000c, 473 471 .ce_cmd_addr = 0x00000018, 474 472 .misc_ie_addr = 0x00000034,
+5 -2
drivers/net/wireless/ath/ath10k/hw.h
··· 353 353 }; 354 354 355 355 struct ath10k_hw_ce_regs { 356 - u32 sr_base_addr; 356 + u32 sr_base_addr_lo; 357 + u32 sr_base_addr_hi; 357 358 u32 sr_size_addr; 358 - u32 dr_base_addr; 359 + u32 dr_base_addr_lo; 360 + u32 dr_base_addr_hi; 359 361 u32 dr_size_addr; 360 362 u32 ce_cmd_addr; 361 363 u32 misc_ie_addr; ··· 736 734 #define TARGET_TLV_NUM_TDLS_VDEVS 1 737 735 #define TARGET_TLV_NUM_TIDS ((TARGET_TLV_NUM_PEERS) * 2) 738 736 #define TARGET_TLV_NUM_MSDU_DESC (1024 + 32) 737 + #define TARGET_TLV_NUM_MSDU_DESC_HL 64 739 738 #define TARGET_TLV_NUM_WOW_PATTERNS 22 740 739 #define TARGET_TLV_MGMT_NUM_MSDU_DESC (50) 741 740
+4 -3
drivers/net/wireless/ath/ath10k/mac.c
··· 1 1 /* 2 2 * Copyright (c) 2005-2011 Atheros Communications Inc. 3 3 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. 4 - * Copyright (c) 2018, The Linux Foundation. All rights reserved. 4 + * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 5 5 * 6 6 * Permission to use, copy, modify, and/or distribute this software for any 7 7 * purpose with or without fee is hereby granted, provided that the above ··· 3863 3863 ath10k_warn(ar, "failed to transmit management frame by ref via WMI: %d\n", 3864 3864 ret); 3865 3865 dma_unmap_single(ar->dev, paddr, skb->len, 3866 - DMA_FROM_DEVICE); 3866 + DMA_TO_DEVICE); 3867 3867 ieee80211_free_txskb(ar->hw, skb); 3868 3868 } 3869 3869 } else { ··· 4549 4549 ht_cap.cap |= stbc; 4550 4550 } 4551 4551 4552 - if (ar->ht_cap_info & WMI_HT_CAP_LDPC) 4552 + if (ar->ht_cap_info & WMI_HT_CAP_LDPC || (ar->ht_cap_info & 4553 + WMI_HT_CAP_RX_LDPC && (ar->ht_cap_info & WMI_HT_CAP_TX_LDPC))) 4553 4554 ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING; 4554 4555 4555 4556 if (ar->ht_cap_info & WMI_HT_CAP_L_SIG_TXOP_PROT)
+1 -1
drivers/net/wireless/ath/ath10k/pci.c
··· 3553 3553 case QCA9377_1_0_DEVICE_ID: 3554 3554 hw_rev = ATH10K_HW_QCA9377; 3555 3555 pci_ps = true; 3556 - pci_soft_reset = NULL; 3556 + pci_soft_reset = ath10k_pci_warm_reset; 3557 3557 pci_hard_reset = ath10k_pci_qca6174_chip_reset; 3558 3558 targ_cpu_to_ce_addr = ath10k_pci_qca6174_targ_cpu_to_ce_addr; 3559 3559 break;
+227 -2
drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.c
··· 1763 1763 daemon_support_valid), 1764 1764 }, 1765 1765 { 1766 - .data_type = QMI_UNSIGNED_1_BYTE, 1766 + .data_type = QMI_UNSIGNED_4_BYTE, 1767 1767 .elem_len = 1, 1768 - .elem_size = sizeof(u8), 1768 + .elem_size = sizeof(u32), 1769 1769 .array_type = NO_ARRAY, 1770 1770 .tlv_type = 0x10, 1771 1771 .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1772 1772 daemon_support), 1773 + }, 1774 + { 1775 + .data_type = QMI_OPT_FLAG, 1776 + .elem_len = 1, 1777 + .elem_size = sizeof(u8), 1778 + .array_type = NO_ARRAY, 1779 + .tlv_type = 0x11, 1780 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1781 + wake_msi_valid), 1782 + }, 1783 + { 1784 + .data_type = QMI_UNSIGNED_4_BYTE, 1785 + .elem_len = 1, 1786 + .elem_size = sizeof(u32), 1787 + .array_type = NO_ARRAY, 1788 + .tlv_type = 0x11, 1789 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1790 + wake_msi), 1791 + }, 1792 + { 1793 + .data_type = QMI_OPT_FLAG, 1794 + .elem_len = 1, 1795 + .elem_size = sizeof(u8), 1796 + .array_type = NO_ARRAY, 1797 + .tlv_type = 0x12, 1798 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1799 + gpios_valid), 1800 + }, 1801 + { 1802 + .data_type = QMI_DATA_LEN, 1803 + .elem_len = 1, 1804 + .elem_size = sizeof(u32), 1805 + .array_type = NO_ARRAY, 1806 + .tlv_type = 0x12, 1807 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1808 + gpios_len), 1809 + }, 1810 + { 1811 + .data_type = QMI_UNSIGNED_4_BYTE, 1812 + .elem_len = QMI_WLFW_MAX_NUM_GPIO_V01, 1813 + .elem_size = sizeof(u32), 1814 + .array_type = VAR_LEN_ARRAY, 1815 + .tlv_type = 0x12, 1816 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1817 + gpios), 1818 + }, 1819 + { 1820 + .data_type = QMI_OPT_FLAG, 1821 + .elem_len = 1, 1822 + .elem_size = sizeof(u8), 1823 + .array_type = NO_ARRAY, 1824 + .tlv_type = 0x13, 1825 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1826 + nm_modem_valid), 1827 + }, 1828 + { 1829 + .data_type = QMI_UNSIGNED_1_BYTE, 1830 + .elem_len = 1, 1831 + .elem_size = sizeof(u8), 1832 + .array_type = NO_ARRAY, 1833 + .tlv_type = 0x13, 1834 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1835 + nm_modem), 1836 + }, 1837 + { 1838 + .data_type = QMI_OPT_FLAG, 1839 + .elem_len = 1, 1840 + .elem_size = sizeof(u8), 1841 + .array_type = NO_ARRAY, 1842 + .tlv_type = 0x14, 1843 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1844 + bdf_support_valid), 1845 + }, 1846 + { 1847 + .data_type = QMI_UNSIGNED_1_BYTE, 1848 + .elem_len = 1, 1849 + .elem_size = sizeof(u8), 1850 + .array_type = NO_ARRAY, 1851 + .tlv_type = 0x14, 1852 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1853 + bdf_support), 1854 + }, 1855 + { 1856 + .data_type = QMI_OPT_FLAG, 1857 + .elem_len = 1, 1858 + .elem_size = sizeof(u8), 1859 + .array_type = NO_ARRAY, 1860 + .tlv_type = 0x15, 1861 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1862 + bdf_cache_support_valid), 1863 + }, 1864 + { 1865 + .data_type = QMI_UNSIGNED_1_BYTE, 1866 + .elem_len = 1, 1867 + .elem_size = sizeof(u8), 1868 + .array_type = NO_ARRAY, 1869 + .tlv_type = 0x15, 1870 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1871 + bdf_cache_support), 1872 + }, 1873 + { 1874 + .data_type = QMI_OPT_FLAG, 1875 + .elem_len = 1, 1876 + .elem_size = sizeof(u8), 1877 + .array_type = NO_ARRAY, 1878 + .tlv_type = 0x16, 1879 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1880 + m3_support_valid), 1881 + }, 1882 + { 1883 + .data_type = QMI_UNSIGNED_1_BYTE, 1884 + .elem_len = 1, 1885 + .elem_size = sizeof(u8), 1886 + .array_type = NO_ARRAY, 1887 + .tlv_type = 0x16, 1888 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1889 + m3_support), 1890 + }, 1891 + { 1892 + .data_type = QMI_OPT_FLAG, 1893 + .elem_len = 1, 1894 + .elem_size = sizeof(u8), 1895 + .array_type = NO_ARRAY, 1896 + .tlv_type = 0x17, 1897 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1898 + m3_cache_support_valid), 1899 + }, 1900 + { 1901 + .data_type = QMI_UNSIGNED_1_BYTE, 1902 + .elem_len = 1, 1903 + .elem_size = sizeof(u8), 1904 + .array_type = NO_ARRAY, 1905 + .tlv_type = 0x17, 1906 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1907 + m3_cache_support), 1908 + }, 1909 + { 1910 + .data_type = QMI_OPT_FLAG, 1911 + .elem_len = 1, 1912 + .elem_size = sizeof(u8), 1913 + .array_type = NO_ARRAY, 1914 + .tlv_type = 0x18, 1915 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1916 + cal_filesys_support_valid), 1917 + }, 1918 + { 1919 + .data_type = QMI_UNSIGNED_1_BYTE, 1920 + .elem_len = 1, 1921 + .elem_size = sizeof(u8), 1922 + .array_type = NO_ARRAY, 1923 + .tlv_type = 0x18, 1924 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1925 + cal_filesys_support), 1926 + }, 1927 + { 1928 + .data_type = QMI_OPT_FLAG, 1929 + .elem_len = 1, 1930 + .elem_size = sizeof(u8), 1931 + .array_type = NO_ARRAY, 1932 + .tlv_type = 0x19, 1933 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1934 + cal_cache_support_valid), 1935 + }, 1936 + { 1937 + .data_type = QMI_UNSIGNED_1_BYTE, 1938 + .elem_len = 1, 1939 + .elem_size = sizeof(u8), 1940 + .array_type = NO_ARRAY, 1941 + .tlv_type = 0x19, 1942 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1943 + cal_cache_support), 1944 + }, 1945 + { 1946 + .data_type = QMI_OPT_FLAG, 1947 + .elem_len = 1, 1948 + .elem_size = sizeof(u8), 1949 + .array_type = NO_ARRAY, 1950 + .tlv_type = 0x1A, 1951 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1952 + cal_done_valid), 1953 + }, 1954 + { 1955 + .data_type = QMI_UNSIGNED_1_BYTE, 1956 + .elem_len = 1, 1957 + .elem_size = sizeof(u8), 1958 + .array_type = NO_ARRAY, 1959 + .tlv_type = 0x1A, 1960 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1961 + cal_done), 1962 + }, 1963 + { 1964 + .data_type = QMI_OPT_FLAG, 1965 + .elem_len = 1, 1966 + .elem_size = sizeof(u8), 1967 + .array_type = NO_ARRAY, 1968 + .tlv_type = 0x1B, 1969 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1970 + mem_bucket_valid), 1971 + }, 1972 + { 1973 + .data_type = QMI_UNSIGNED_4_BYTE, 1974 + .elem_len = 1, 1975 + .elem_size = sizeof(u32), 1976 + .array_type = NO_ARRAY, 1977 + .tlv_type = 0x1B, 1978 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1979 + mem_bucket), 1980 + }, 1981 + { 1982 + .data_type = QMI_OPT_FLAG, 1983 + .elem_len = 1, 1984 + .elem_size = sizeof(u8), 1985 + .array_type = NO_ARRAY, 1986 + .tlv_type = 0x1C, 1987 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1988 + mem_cfg_mode_valid), 1989 + }, 1990 + { 1991 + .data_type = QMI_UNSIGNED_1_BYTE, 1992 + .elem_len = 1, 1993 + .elem_size = sizeof(u8), 1994 + .array_type = NO_ARRAY, 1995 + .tlv_type = 0x1C, 1996 + .offset = offsetof(struct wlfw_host_cap_req_msg_v01, 1997 + mem_cfg_mode), 1773 1998 }, 1774 1999 {} 1775 2000 };
+28 -2
drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.h
··· 553 553 #define WLFW_MAC_ADDR_RESP_MSG_V01_MAX_MSG_LEN 7 554 554 extern struct qmi_elem_info wlfw_mac_addr_resp_msg_v01_ei[]; 555 555 556 + #define QMI_WLFW_MAX_NUM_GPIO_V01 32 556 557 struct wlfw_host_cap_req_msg_v01 { 557 558 u8 daemon_support_valid; 558 - u8 daemon_support; 559 + u32 daemon_support; 560 + u8 wake_msi_valid; 561 + u32 wake_msi; 562 + u8 gpios_valid; 563 + u32 gpios_len; 564 + u32 gpios[QMI_WLFW_MAX_NUM_GPIO_V01]; 565 + u8 nm_modem_valid; 566 + u8 nm_modem; 567 + u8 bdf_support_valid; 568 + u8 bdf_support; 569 + u8 bdf_cache_support_valid; 570 + u8 bdf_cache_support; 571 + u8 m3_support_valid; 572 + u8 m3_support; 573 + u8 m3_cache_support_valid; 574 + u8 m3_cache_support; 575 + u8 cal_filesys_support_valid; 576 + u8 cal_filesys_support; 577 + u8 cal_cache_support_valid; 578 + u8 cal_cache_support; 579 + u8 cal_done_valid; 580 + u8 cal_done; 581 + u8 mem_bucket_valid; 582 + u32 mem_bucket; 583 + u8 mem_cfg_mode_valid; 584 + u8 mem_cfg_mode; 559 585 }; 560 586 561 - #define WLFW_HOST_CAP_REQ_MSG_V01_MAX_MSG_LEN 4 587 + #define WLFW_HOST_CAP_REQ_MSG_V01_MAX_MSG_LEN 189 562 588 extern struct qmi_elem_info wlfw_host_cap_req_msg_v01_ei[]; 563 589 564 590 struct wlfw_host_cap_resp_msg_v01 {
+27 -16
drivers/net/wireless/ath/ath10k/sdio.c
··· 1615 1615 return 0; 1616 1616 } 1617 1617 1618 + static int ath10k_sdio_hif_swap_mailbox(struct ath10k *ar) 1619 + { 1620 + struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); 1621 + u32 addr, val; 1622 + int ret = 0; 1623 + 1624 + addr = host_interest_item_address(HI_ITEM(hi_acs_flags)); 1625 + 1626 + ret = ath10k_sdio_hif_diag_read32(ar, addr, &val); 1627 + if (ret) { 1628 + ath10k_warn(ar, "unable to read hi_acs_flags : %d\n", ret); 1629 + return ret; 1630 + } 1631 + 1632 + if (val & HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK) { 1633 + ath10k_dbg(ar, ATH10K_DBG_SDIO, 1634 + "sdio mailbox swap service enabled\n"); 1635 + ar_sdio->swap_mbox = true; 1636 + } 1637 + return 0; 1638 + } 1639 + 1618 1640 /* HIF start/stop */ 1619 1641 1620 1642 static int ath10k_sdio_hif_start(struct ath10k *ar) 1621 1643 { 1622 1644 struct ath10k_sdio *ar_sdio = ath10k_sdio_priv(ar); 1623 - u32 addr, val; 1624 1645 int ret; 1625 1646 1626 1647 /* Sleep 20 ms before HIF interrupts are disabled. ··· 1674 1653 ret = ath10k_sdio_hif_enable_intrs(ar); 1675 1654 if (ret) 1676 1655 ath10k_warn(ar, "failed to enable sdio interrupts: %d\n", ret); 1677 - 1678 - addr = host_interest_item_address(HI_ITEM(hi_acs_flags)); 1679 - 1680 - ret = ath10k_sdio_hif_diag_read32(ar, addr, &val); 1681 - if (ret) { 1682 - ath10k_warn(ar, "unable to read hi_acs_flags address: %d\n", ret); 1683 - return ret; 1684 - } 1685 - 1686 - if (val & HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_FW_ACK) { 1687 - ath10k_dbg(ar, ATH10K_DBG_SDIO, 1688 - "sdio mailbox swap service enabled\n"); 1689 - ar_sdio->swap_mbox = true; 1690 - } 1691 1656 1692 1657 /* Enable sleep and then disable it again */ 1693 1658 ret = ath10k_sdio_hif_set_mbox_sleep(ar, true); ··· 1905 1898 .exchange_bmi_msg = ath10k_sdio_bmi_exchange_msg, 1906 1899 .start = ath10k_sdio_hif_start, 1907 1900 .stop = ath10k_sdio_hif_stop, 1901 + .swap_mailbox = ath10k_sdio_hif_swap_mailbox, 1908 1902 .map_service_to_pipe = ath10k_sdio_hif_map_service_to_pipe, 1909 1903 .get_default_pipe = ath10k_sdio_hif_get_default_pipe, 1910 1904 .send_complete_check = ath10k_sdio_hif_send_complete_check, ··· 2096 2088 .id_table = ath10k_sdio_devices, 2097 2089 .probe = ath10k_sdio_probe, 2098 2090 .remove = ath10k_sdio_remove, 2099 - .drv.pm = ATH10K_SDIO_PM_OPS, 2091 + .drv = { 2092 + .owner = THIS_MODULE, 2093 + .pm = ATH10K_SDIO_PM_OPS, 2094 + }, 2100 2095 }; 2101 2096 2102 2097 static int __init ath10k_sdio_init(void)
+11 -4
drivers/net/wireless/ath/ath10k/snoc.c
··· 66 66 67 67 static const struct ath10k_snoc_drv_priv drv_priv = { 68 68 .hw_rev = ATH10K_HW_WCN3990, 69 - .dma_mask = DMA_BIT_MASK(37), 69 + .dma_mask = DMA_BIT_MASK(35), 70 70 .msa_size = 0x100000, 71 71 }; 72 72 ··· 875 875 { 876 876 struct ath10k_ce_pipe *ce_pipe; 877 877 struct ath10k_ce_ring *ce_ring; 878 - struct ath10k_snoc *ar_snoc; 879 878 struct sk_buff *skb; 880 879 struct ath10k *ar; 881 880 int i; 882 881 883 882 ar = snoc_pipe->hif_ce_state; 884 - ar_snoc = ath10k_snoc_priv(ar); 885 883 ce_pipe = snoc_pipe->ce_hdl; 886 884 ce_ring = ce_pipe->src_ring; 887 885 ··· 998 1000 999 1001 static void ath10k_snoc_wlan_disable(struct ath10k *ar) 1000 1002 { 1001 - if (!test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags)) 1003 + struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); 1004 + 1005 + /* If both ATH10K_FLAG_CRASH_FLUSH and ATH10K_SNOC_FLAG_RECOVERY 1006 + * flags are not set, it means that the driver has restarted 1007 + * due to a crash inject via debugfs. In this case, the driver 1008 + * needs to restart the firmware and hence send qmi wlan disable, 1009 + * during the driver restart sequence. 1010 + */ 1011 + if (!test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags) || 1012 + !test_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags)) 1002 1013 ath10k_qmi_wlan_disable(ar); 1003 1014 } 1004 1015
+3
drivers/net/wireless/ath/ath10k/spectral.c
··· 494 494 495 495 buf_file = debugfs_create_file(filename, mode, parent, buf, 496 496 &relay_file_operations); 497 + if (IS_ERR(buf_file)) 498 + return NULL; 499 + 497 500 *is_global = 1; 498 501 return buf_file; 499 502 }
+13
drivers/net/wireless/ath/ath10k/wmi-ops.h
··· 33 33 struct wmi_mgmt_rx_ev_arg *arg); 34 34 int (*pull_mgmt_tx_compl)(struct ath10k *ar, struct sk_buff *skb, 35 35 struct wmi_tlv_mgmt_tx_compl_ev_arg *arg); 36 + int (*pull_mgmt_tx_bundle_compl)( 37 + struct ath10k *ar, struct sk_buff *skb, 38 + struct wmi_tlv_mgmt_tx_bundle_compl_ev_arg *arg); 36 39 int (*pull_ch_info)(struct ath10k *ar, struct sk_buff *skb, 37 40 struct wmi_ch_info_ev_arg *arg); 38 41 int (*pull_vdev_start)(struct ath10k *ar, struct sk_buff *skb, ··· 280 277 return -EOPNOTSUPP; 281 278 282 279 return ar->wmi.ops->pull_mgmt_tx_compl(ar, skb, arg); 280 + } 281 + 282 + static inline int 283 + ath10k_wmi_pull_mgmt_tx_bundle_compl(struct ath10k *ar, struct sk_buff *skb, 284 + struct wmi_tlv_mgmt_tx_bundle_compl_ev_arg *arg) 285 + { 286 + if (!ar->wmi.ops->pull_mgmt_tx_bundle_compl) 287 + return -EOPNOTSUPP; 288 + 289 + return ar->wmi.ops->pull_mgmt_tx_bundle_compl(ar, skb, arg); 283 290 } 284 291 285 292 static inline int
+65 -2
drivers/net/wireless/ath/ath10k/wmi-tlv.c
··· 620 620 case WMI_TLV_MGMT_TX_COMPLETION_EVENTID: 621 621 ath10k_wmi_event_mgmt_tx_compl(ar, skb); 622 622 break; 623 + case WMI_TLV_MGMT_TX_BUNDLE_COMPLETION_EVENTID: 624 + ath10k_wmi_event_mgmt_tx_bundle_compl(ar, skb); 625 + break; 623 626 default: 624 627 ath10k_dbg(ar, ATH10K_DBG_WMI, "Unknown eventid: %d\n", id); 625 628 break; ··· 686 683 arg->pdev_id = ev->pdev_id; 687 684 688 685 kfree(tb); 686 + return 0; 687 + } 688 + 689 + struct wmi_tlv_tx_bundle_compl_parse { 690 + const __le32 *num_reports; 691 + const __le32 *desc_ids; 692 + const __le32 *status; 693 + bool desc_ids_done; 694 + bool status_done; 695 + }; 696 + 697 + static int 698 + ath10k_wmi_tlv_mgmt_tx_bundle_compl_parse(struct ath10k *ar, u16 tag, u16 len, 699 + const void *ptr, void *data) 700 + { 701 + struct wmi_tlv_tx_bundle_compl_parse *bundle_tx_compl = data; 702 + 703 + switch (tag) { 704 + case WMI_TLV_TAG_STRUCT_MGMT_TX_COMPL_BUNDLE_EVENT: 705 + bundle_tx_compl->num_reports = ptr; 706 + break; 707 + case WMI_TLV_TAG_ARRAY_UINT32: 708 + if (!bundle_tx_compl->desc_ids_done) { 709 + bundle_tx_compl->desc_ids_done = true; 710 + bundle_tx_compl->desc_ids = ptr; 711 + } else if (!bundle_tx_compl->status_done) { 712 + bundle_tx_compl->status_done = true; 713 + bundle_tx_compl->status = ptr; 714 + } 715 + break; 716 + default: 717 + break; 718 + } 719 + return 0; 720 + } 721 + 722 + static int ath10k_wmi_tlv_op_pull_mgmt_tx_bundle_compl_ev( 723 + struct ath10k *ar, struct sk_buff *skb, 724 + struct wmi_tlv_mgmt_tx_bundle_compl_ev_arg *arg) 725 + { 726 + struct wmi_tlv_tx_bundle_compl_parse bundle_tx_compl = { }; 727 + int ret; 728 + 729 + ret = ath10k_wmi_tlv_iter(ar, skb->data, skb->len, 730 + ath10k_wmi_tlv_mgmt_tx_bundle_compl_parse, 731 + &bundle_tx_compl); 732 + if (ret) { 733 + ath10k_warn(ar, "failed to parse tlv: %d\n", ret); 734 + return ret; 735 + } 736 + 737 + if (!bundle_tx_compl.num_reports || !bundle_tx_compl.desc_ids || 738 + !bundle_tx_compl.status) 739 + return -EPROTO; 740 + 741 + arg->num_reports = *bundle_tx_compl.num_reports; 742 + arg->desc_ids = bundle_tx_compl.desc_ids; 743 + arg->status = bundle_tx_compl.status; 744 + 689 745 return 0; 690 746 } 691 747 ··· 1673 1611 cfg->rx_skip_defrag_timeout_dup_detection_check = __cpu_to_le32(0); 1674 1612 cfg->vow_config = __cpu_to_le32(0); 1675 1613 cfg->gtk_offload_max_vdev = __cpu_to_le32(2); 1676 - cfg->num_msdu_desc = __cpu_to_le32(TARGET_TLV_NUM_MSDU_DESC); 1614 + cfg->num_msdu_desc = __cpu_to_le32(ar->htt.max_num_pending_tx); 1677 1615 cfg->max_frag_entries = __cpu_to_le32(2); 1678 1616 cfg->num_tdls_vdevs = __cpu_to_le32(TARGET_TLV_NUM_TDLS_VDEVS); 1679 1617 cfg->num_tdls_conn_table_entries = __cpu_to_le32(0x20); ··· 1688 1626 cfg->num_ocb_vdevs = __cpu_to_le32(0); 1689 1627 cfg->num_ocb_channels = __cpu_to_le32(0); 1690 1628 cfg->num_ocb_schedules = __cpu_to_le32(0); 1691 - cfg->host_capab = __cpu_to_le32(0); 1629 + cfg->host_capab = __cpu_to_le32(WMI_TLV_FLAG_MGMT_BUNDLE_TX_COMPL); 1692 1630 1693 1631 ath10k_wmi_put_host_mem_chunks(ar, chunks); 1694 1632 ··· 4155 4093 .pull_scan = ath10k_wmi_tlv_op_pull_scan_ev, 4156 4094 .pull_mgmt_rx = ath10k_wmi_tlv_op_pull_mgmt_rx_ev, 4157 4095 .pull_mgmt_tx_compl = ath10k_wmi_tlv_op_pull_mgmt_tx_compl_ev, 4096 + .pull_mgmt_tx_bundle_compl = ath10k_wmi_tlv_op_pull_mgmt_tx_bundle_compl_ev, 4158 4097 .pull_ch_info = ath10k_wmi_tlv_op_pull_ch_info_ev, 4159 4098 .pull_vdev_start = ath10k_wmi_tlv_op_pull_vdev_start_ev, 4160 4099 .pull_peer_kick = ath10k_wmi_tlv_op_pull_peer_kick_ev,
+3
drivers/net/wireless/ath/ath10k/wmi-tlv.h
··· 321 321 WMI_TLV_OFFLOAD_BCN_TX_STATUS_EVENTID, 322 322 WMI_TLV_OFFLOAD_PROB_RESP_TX_STATUS_EVENTID, 323 323 WMI_TLV_MGMT_TX_COMPLETION_EVENTID, 324 + WMI_TLV_MGMT_TX_BUNDLE_COMPLETION_EVENTID, 324 325 WMI_TLV_TX_DELBA_COMPLETE_EVENTID = WMI_TLV_EV(WMI_TLV_GRP_BA_NEG), 325 326 WMI_TLV_TX_ADDBA_COMPLETE_EVENTID, 326 327 WMI_TLV_BA_RSP_SSN_EVENTID, ··· 1592 1591 u32 cycle_count; 1593 1592 u32 mac_clk_mhz; 1594 1593 }; 1594 + 1595 + #define WMI_TLV_FLAG_MGMT_BUNDLE_TX_COMPL BIT(9) 1595 1596 1596 1597 struct wmi_tlv_mgmt_tx_compl_ev { 1597 1598 __le32 desc_id;
+25 -2
drivers/net/wireless/ath/ath10k/wmi.c
··· 1 1 /* 2 2 * Copyright (c) 2005-2011 Atheros Communications Inc. 3 3 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. 4 - * Copyright (c) 2018, The Linux Foundation. All rights reserved. 4 + * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. 5 5 * 6 6 * Permission to use, copy, modify, and/or distribute this software for any 7 7 * purpose with or without fee is hereby granted, provided that the above ··· 2346 2346 2347 2347 msdu = pkt_addr->vaddr; 2348 2348 dma_unmap_single(ar->dev, pkt_addr->paddr, 2349 - msdu->len, DMA_FROM_DEVICE); 2349 + msdu->len, DMA_TO_DEVICE); 2350 2350 info = IEEE80211_SKB_CB(msdu); 2351 2351 2352 2352 if (status) ··· 2379 2379 __le32_to_cpu(arg.status)); 2380 2380 2381 2381 ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi tlv evnt mgmt tx completion\n"); 2382 + 2383 + return 0; 2384 + } 2385 + 2386 + int ath10k_wmi_event_mgmt_tx_bundle_compl(struct ath10k *ar, struct sk_buff *skb) 2387 + { 2388 + struct wmi_tlv_mgmt_tx_bundle_compl_ev_arg arg; 2389 + u32 num_reports; 2390 + int i, ret; 2391 + 2392 + ret = ath10k_wmi_pull_mgmt_tx_bundle_compl(ar, skb, &arg); 2393 + if (ret) { 2394 + ath10k_warn(ar, "failed to parse bundle mgmt compl event: %d\n", ret); 2395 + return ret; 2396 + } 2397 + 2398 + num_reports = __le32_to_cpu(arg.num_reports); 2399 + 2400 + for (i = 0; i < num_reports; i++) 2401 + wmi_process_mgmt_tx_comp(ar, __le32_to_cpu(arg.desc_ids[i]), 2402 + __le32_to_cpu(arg.status[i])); 2403 + 2404 + ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi tlv event bundle mgmt tx completion\n"); 2382 2405 2383 2406 return 0; 2384 2407 }
+9
drivers/net/wireless/ath/ath10k/wmi.h
··· 2075 2075 #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ 2076 2076 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 2077 2077 #define WMI_HT_CAP_HT40_SGI 0x0800 2078 + #define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */ 2079 + #define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */ 2078 2080 2079 2081 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \ 2080 2082 WMI_HT_CAP_HT20_SGI | \ ··· 6690 6688 __le32 pdev_id; 6691 6689 }; 6692 6690 6691 + struct wmi_tlv_mgmt_tx_bundle_compl_ev_arg { 6692 + __le32 num_reports; 6693 + const __le32 *desc_ids; 6694 + const __le32 *status; 6695 + }; 6696 + 6693 6697 struct wmi_mgmt_rx_ev_arg { 6694 6698 __le32 channel; 6695 6699 __le32 snr; ··· 7252 7244 int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb); 7253 7245 int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb); 7254 7246 int ath10k_wmi_event_mgmt_tx_compl(struct ath10k *ar, struct sk_buff *skb); 7247 + int ath10k_wmi_event_mgmt_tx_bundle_compl(struct ath10k *ar, struct sk_buff *skb); 7255 7248 void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb); 7256 7249 void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb); 7257 7250 int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
+1 -3
drivers/net/wireless/ath/ath6kl/wmi.c
··· 776 776 cmd->info.params.roam_rssi_floor = DEF_LRSSI_ROAM_FLOOR; 777 777 cmd->roam_ctrl = WMI_SET_LRSSI_SCAN_PARAMS; 778 778 779 - ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID, 779 + return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID, 780 780 NO_SYNC_WMIFLAG); 781 - 782 - return 0; 783 781 } 784 782 785 783 int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid)
+6 -6
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
··· 3457 3457 if (!((pBase->txrxMask >> i) & 1)) 3458 3458 continue; 3459 3459 3460 - len += snprintf(buf + len, size - len, "Chain %d\n", i); 3460 + len += scnprintf(buf + len, size - len, "Chain %d\n", i); 3461 3461 3462 - len += snprintf(buf + len, size - len, 3462 + len += scnprintf(buf + len, size - len, 3463 3463 "Freq\t ref\tvolt\ttemp\tnf_cal\tnf_pow\trx_temp\n"); 3464 3464 3465 3465 for (j = 0; j < cal_pier_nr; j++) { ··· 3471 3471 freq = 4800 + eep->calFreqPier5G[j] * 5; 3472 3472 } 3473 3473 3474 - len += snprintf(buf + len, size - len, 3474 + len += scnprintf(buf + len, size - len, 3475 3475 "%d\t", freq); 3476 3476 3477 - len += snprintf(buf + len, size - len, 3477 + len += scnprintf(buf + len, size - len, 3478 3478 "%d\t%d\t%d\t%d\t%d\t%d\n", 3479 3479 cal_pier->refPower, 3480 3480 cal_pier->voltMeas, ··· 3505 3505 len += scnprintf(buf + len, size - len, "Calibration data\n"); 3506 3506 len = ar9003_dump_cal_data(ah, buf, len, size, true); 3507 3507 3508 - len += snprintf(buf + len, size - len, 3508 + len += scnprintf(buf + len, size - len, 3509 3509 "%20s :\n", "5GHz modal Header"); 3510 3510 len = ar9003_dump_modal_eeprom(buf, len, size, 3511 3511 &eep->modalHeader5G); 3512 3512 3513 - len += snprintf(buf + len, size - len, "Calibration data\n"); 3513 + len += scnprintf(buf + len, size - len, "Calibration data\n"); 3514 3514 len = ar9003_dump_cal_data(ah, buf, len, size, false); 3515 3515 3516 3516 goto out;
+3
drivers/net/wireless/ath/ath9k/common-spectral.c
··· 1039 1039 1040 1040 buf_file = debugfs_create_file(filename, mode, parent, buf, 1041 1041 &relay_file_operations); 1042 + if (IS_ERR(buf_file)) 1043 + return NULL; 1044 + 1042 1045 *is_global = 1; 1043 1046 return buf_file; 1044 1047 }
+3 -3
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
··· 574 574 { 575 575 struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; 576 576 577 - spin_lock_bh(&priv->tx.tx_lock); 577 + spin_lock(&priv->tx.tx_lock); 578 578 if (priv->tx.flags & ATH9K_HTC_OP_TX_DRAIN) { 579 - spin_unlock_bh(&priv->tx.tx_lock); 579 + spin_unlock(&priv->tx.tx_lock); 580 580 return; 581 581 } 582 - spin_unlock_bh(&priv->tx.tx_lock); 582 + spin_unlock(&priv->tx.tx_lock); 583 583 584 584 ath9k_htc_tx_drainq(priv, &priv->tx.tx_failed); 585 585 }
+3 -3
drivers/net/wireless/ath/ath9k/init.c
··· 636 636 ret = ath9k_eeprom_request(sc, eeprom_name); 637 637 if (ret) 638 638 return ret; 639 + 640 + ah->ah_flags &= ~AH_USE_EEPROM; 641 + ah->ah_flags |= AH_NO_EEP_SWAP; 639 642 } 640 643 641 644 mac = of_get_mac_address(np); 642 645 if (mac) 643 646 ether_addr_copy(common->macaddr, mac); 644 - 645 - ah->ah_flags &= ~AH_USE_EEPROM; 646 - ah->ah_flags |= AH_NO_EEP_SWAP; 647 647 648 648 return 0; 649 649 }
+2
drivers/net/wireless/ath/regd.h
··· 185 185 CTRY_UKRAINE = 804, 186 186 CTRY_UNITED_KINGDOM = 826, 187 187 CTRY_UNITED_STATES = 840, 188 + CTRY_UNITED_STATES2 = 841, 188 189 CTRY_UNITED_STATES_FCC49 = 842, 190 + CTRY_UNITED_STATES3 = 843, 189 191 CTRY_URUGUAY = 858, 190 192 CTRY_UZBEKISTAN = 860, 191 193 CTRY_VENEZUELA = 862,
+2
drivers/net/wireless/ath/regd_common.h
··· 483 483 {CTRY_UAE, NULL1_WORLD, "AE"}, 484 484 {CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"}, 485 485 {CTRY_UNITED_STATES, FCC3_FCCA, "US"}, 486 + {CTRY_UNITED_STATES2, FCC3_FCCA, "US"}, 487 + {CTRY_UNITED_STATES3, FCC3_FCCA, "US"}, 486 488 /* This "PS" is for US public safety actually... to support this we 487 489 * would need to assign new special alpha2 to CRDA db as with the world 488 490 * regdomain and use another alpha2 */