0081-wifi-ath11k-remove-unused-function-ath11k_tm_event_w.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. From 86f85575a3f6a20cef1c8bb98e78585fe3a53ccc Mon Sep 17 00:00:00 2001
  2. From: Govindaraj Saminathan <quic_gsaminat@quicinc.com>
  3. Date: Fri, 26 May 2023 12:41:06 +0300
  4. Subject: [PATCH 82/84] wifi: ath11k: remove unused function
  5. ath11k_tm_event_wmi()
  6. The function ath11k_tm_event_wmi() is only defined and it is not used
  7. anywhere. Hence remove the unused.
  8. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
  9. Signed-off-by: Govindaraj Saminathan <quic_gsaminat@quicinc.com>
  10. Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
  11. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  12. Link: https://lore.kernel.org/r/20230517135934.16408-2-quic_rajkbhag@quicinc.com
  13. ---
  14. drivers/net/wireless/ath/ath11k/testmode.c | 64 +---------------------
  15. drivers/net/wireless/ath/ath11k/testmode.h | 8 +--
  16. 2 files changed, 2 insertions(+), 70 deletions(-)
  17. --- a/drivers/net/wireless/ath/ath11k/testmode.c
  18. +++ b/drivers/net/wireless/ath/ath11k/testmode.c
  19. @@ -1,6 +1,7 @@
  20. // SPDX-License-Identifier: BSD-3-Clause-Clear
  21. /*
  22. * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  23. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  24. */
  25. #include "testmode.h"
  26. @@ -20,69 +21,6 @@ static const struct nla_policy ath11k_tm
  27. [ATH11K_TM_ATTR_VERSION_MINOR] = { .type = NLA_U32 },
  28. };
  29. -/* Returns true if callee consumes the skb and the skb should be discarded.
  30. - * Returns false if skb is not used. Does not sleep.
  31. - */
  32. -bool ath11k_tm_event_wmi(struct ath11k *ar, u32 cmd_id, struct sk_buff *skb)
  33. -{
  34. - struct sk_buff *nl_skb;
  35. - bool consumed;
  36. - int ret;
  37. -
  38. - ath11k_dbg(ar->ab, ATH11K_DBG_TESTMODE,
  39. - "testmode event wmi cmd_id %d skb %pK skb->len %d\n",
  40. - cmd_id, skb, skb->len);
  41. -
  42. - ath11k_dbg_dump(ar->ab, ATH11K_DBG_TESTMODE, NULL, "", skb->data, skb->len);
  43. -
  44. - spin_lock_bh(&ar->data_lock);
  45. -
  46. - consumed = true;
  47. -
  48. - nl_skb = cfg80211_testmode_alloc_event_skb(ar->hw->wiphy,
  49. - 2 * sizeof(u32) + skb->len,
  50. - GFP_ATOMIC);
  51. - if (!nl_skb) {
  52. - ath11k_warn(ar->ab,
  53. - "failed to allocate skb for testmode wmi event\n");
  54. - goto out;
  55. - }
  56. -
  57. - ret = nla_put_u32(nl_skb, ATH11K_TM_ATTR_CMD, ATH11K_TM_CMD_WMI);
  58. - if (ret) {
  59. - ath11k_warn(ar->ab,
  60. - "failed to put testmode wmi event cmd attribute: %d\n",
  61. - ret);
  62. - kfree_skb(nl_skb);
  63. - goto out;
  64. - }
  65. -
  66. - ret = nla_put_u32(nl_skb, ATH11K_TM_ATTR_WMI_CMDID, cmd_id);
  67. - if (ret) {
  68. - ath11k_warn(ar->ab,
  69. - "failed to put testmode wmi even cmd_id: %d\n",
  70. - ret);
  71. - kfree_skb(nl_skb);
  72. - goto out;
  73. - }
  74. -
  75. - ret = nla_put(nl_skb, ATH11K_TM_ATTR_DATA, skb->len, skb->data);
  76. - if (ret) {
  77. - ath11k_warn(ar->ab,
  78. - "failed to copy skb to testmode wmi event: %d\n",
  79. - ret);
  80. - kfree_skb(nl_skb);
  81. - goto out;
  82. - }
  83. -
  84. - cfg80211_testmode_event(nl_skb, GFP_ATOMIC);
  85. -
  86. -out:
  87. - spin_unlock_bh(&ar->data_lock);
  88. -
  89. - return consumed;
  90. -}
  91. -
  92. static int ath11k_tm_cmd_get_version(struct ath11k *ar, struct nlattr *tb[])
  93. {
  94. struct sk_buff *skb;
  95. --- a/drivers/net/wireless/ath/ath11k/testmode.h
  96. +++ b/drivers/net/wireless/ath/ath11k/testmode.h
  97. @@ -1,24 +1,18 @@
  98. /* SPDX-License-Identifier: BSD-3-Clause-Clear */
  99. /*
  100. * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  101. + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  102. */
  103. #include "core.h"
  104. #ifdef CPTCFG_NL80211_TESTMODE
  105. -bool ath11k_tm_event_wmi(struct ath11k *ar, u32 cmd_id, struct sk_buff *skb);
  106. int ath11k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
  107. void *data, int len);
  108. #else
  109. -static inline bool ath11k_tm_event_wmi(struct ath11k *ar, u32 cmd_id,
  110. - struct sk_buff *skb)
  111. -{
  112. - return false;
  113. -}
  114. -
  115. static inline int ath11k_tm_cmd(struct ieee80211_hw *hw,
  116. struct ieee80211_vif *vif,
  117. void *data, int len)