forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/net/wireless/marvell/mwifiex/uap_txrx.c
....@@ -1,10 +1,10 @@
11 /*
2
- * Marvell Wireless LAN device driver: AP TX and RX data handling
2
+ * NXP Wireless LAN device driver: AP TX and RX data handling
33 *
4
- * Copyright (C) 2012-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.,
....@@ -71,11 +71,10 @@
7171 */
7272 static void mwifiex_uap_cleanup_tx_queues(struct mwifiex_private *priv)
7373 {
74
- unsigned long flags;
7574 struct list_head *ra_list;
7675 int i;
7776
78
- spin_lock_irqsave(&priv->wmm.ra_list_spinlock, flags);
77
+ spin_lock_bh(&priv->wmm.ra_list_spinlock);
7978
8079 for (i = 0; i < MAX_NUM_TID; i++, priv->del_list_idx++) {
8180 if (priv->del_list_idx == MAX_NUM_TID)
....@@ -87,7 +86,7 @@
8786 }
8887 }
8988
90
- spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, flags);
89
+ spin_unlock_bh(&priv->wmm.ra_list_spinlock);
9190 }
9291
9392
....@@ -351,11 +350,7 @@
351350 skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE);
352351
353352 /* Forward multicast/broadcast packet to upper layer*/
354
- if (in_interrupt())
355
- netif_rx(skb);
356
- else
357
- netif_rx_ni(skb);
358
-
353
+ netif_rx_any_context(skb);
359354 return 0;
360355 }
361356
....@@ -378,7 +373,6 @@
378373 struct rx_packet_hdr *rx_pkt_hdr;
379374 u16 rx_pkt_type;
380375 u8 ta[ETH_ALEN], pkt_type;
381
- unsigned long flags;
382376 struct mwifiex_sta_node *node;
383377
384378 uap_rx_pd = (struct uap_rxpd *)(skb->data);
....@@ -413,12 +407,12 @@
413407
414408
415409 if (rx_pkt_type != PKT_TYPE_BAR && uap_rx_pd->priority < MAX_NUM_TID) {
416
- spin_lock_irqsave(&priv->sta_list_spinlock, flags);
410
+ spin_lock_bh(&priv->sta_list_spinlock);
417411 node = mwifiex_get_sta_entry(priv, ta);
418412 if (node)
419413 node->rx_seq[uap_rx_pd->priority] =
420414 le16_to_cpu(uap_rx_pd->seq_num);
421
- spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
415
+ spin_unlock_bh(&priv->sta_list_spinlock);
422416 }
423417
424418 if (!priv->ap_11n_enabled ||