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