forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/marvell/mwifiex/11n_aggr.c
....@@ -1,10 +1,10 @@
11 /*
2
- * Marvell Wireless LAN device driver: 802.11n Aggregation
2
+ * NXP Wireless LAN device driver: 802.11n Aggregation
33 *
4
- * Copyright (C) 2011-2014, Marvell International Ltd.
4
+ * Copyright 2011-2020 NXP
55 *
6
- * This software file (the "File") is distributed by Marvell International
7
- * Ltd. under the terms of the GNU General Public License Version 2, June 1991
6
+ * This software file (the "File") is distributed by NXP
7
+ * under the terms of the GNU General Public License Version 2, June 1991
88 * (the "License"). You may use, redistribute and/or modify this File in
99 * accordance with the terms and conditions of the License, a copy of which
1010 * is available by writing to the Free Software Foundation, Inc.,
....@@ -155,7 +155,7 @@
155155 int
156156 mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
157157 struct mwifiex_ra_list_tbl *pra_list,
158
- int ptrindex, unsigned long ra_list_flags)
158
+ int ptrindex)
159159 __releases(&priv->wmm.ra_list_spinlock)
160160 {
161161 struct mwifiex_adapter *adapter = priv->adapter;
....@@ -168,8 +168,7 @@
168168
169169 skb_src = skb_peek(&pra_list->skb_head);
170170 if (!skb_src) {
171
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
172
- ra_list_flags);
171
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
173172 return 0;
174173 }
175174
....@@ -177,8 +176,7 @@
177176 skb_aggr = mwifiex_alloc_dma_align_buf(adapter->tx_buf_size,
178177 GFP_ATOMIC);
179178 if (!skb_aggr) {
180
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
181
- ra_list_flags);
179
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
182180 return -1;
183181 }
184182
....@@ -208,17 +206,15 @@
208206 pra_list->total_pkt_count--;
209207 atomic_dec(&priv->wmm.tx_pkts_queued);
210208 aggr_num++;
211
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
212
- ra_list_flags);
209
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
213210 mwifiex_11n_form_amsdu_pkt(skb_aggr, skb_src, &pad);
214211
215212 mwifiex_write_data_complete(adapter, skb_src, 0, 0);
216213
217
- spin_lock_irqsave(&priv->wmm.ra_list_spinlock, ra_list_flags);
214
+ spin_lock_bh(&priv->wmm.ra_list_spinlock);
218215
219216 if (!mwifiex_is_ralist_valid(priv, pra_list, ptrindex)) {
220
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
221
- ra_list_flags);
217
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
222218 return -1;
223219 }
224220
....@@ -232,7 +228,7 @@
232228
233229 } while (skb_src);
234230
235
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, ra_list_flags);
231
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
236232
237233 /* Last AMSDU packet does not need padding */
238234 skb_trim(skb_aggr, skb_aggr->len - pad);
....@@ -265,10 +261,9 @@
265261 }
266262 switch (ret) {
267263 case -EBUSY:
268
- spin_lock_irqsave(&priv->wmm.ra_list_spinlock, ra_list_flags);
264
+ spin_lock_bh(&priv->wmm.ra_list_spinlock);
269265 if (!mwifiex_is_ralist_valid(priv, pra_list, ptrindex)) {
270
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
271
- ra_list_flags);
266
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
272267 mwifiex_write_data_complete(adapter, skb_aggr, 1, -1);
273268 return -1;
274269 }
....@@ -286,8 +281,7 @@
286281 atomic_inc(&priv->wmm.tx_pkts_queued);
287282
288283 tx_info_aggr->flags |= MWIFIEX_BUF_FLAG_REQUEUED_PKT;
289
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
290
- ra_list_flags);
284
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
291285 mwifiex_dbg(adapter, ERROR, "data: -EBUSY is returned\n");
292286 break;
293287 case -1: