hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/wireless/marvell/mwifiex/sta_event.c
....@@ -1,10 +1,10 @@
11 /*
2
- * Marvell Wireless LAN device driver: station event handling
2
+ * NXP Wireless LAN device driver: station event handling
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.,
....@@ -27,9 +27,9 @@
2727
2828 #define MWIFIEX_IBSS_CONNECT_EVT_FIX_SIZE 12
2929
30
-static int mwifiex_check_ibss_peer_capabilties(struct mwifiex_private *priv,
31
- struct mwifiex_sta_node *sta_ptr,
32
- struct sk_buff *event)
30
+static int mwifiex_check_ibss_peer_capabilities(struct mwifiex_private *priv,
31
+ struct mwifiex_sta_node *sta_ptr,
32
+ struct sk_buff *event)
3333 {
3434 int evt_len, ele_len;
3535 u8 *curr;
....@@ -42,7 +42,7 @@
4242 evt_len = event->len;
4343 curr = event->data;
4444
45
- mwifiex_dbg_dump(priv->adapter, EVT_D, "ibss peer capabilties:",
45
+ mwifiex_dbg_dump(priv->adapter, EVT_D, "ibss peer capabilities:",
4646 event->data, event->len);
4747
4848 skb_push(event, MWIFIEX_IBSS_CONNECT_EVT_FIX_SIZE);
....@@ -345,7 +345,6 @@
345345 {
346346 struct mwifiex_tx_pause_tlv *tp;
347347 struct mwifiex_sta_node *sta_ptr;
348
- unsigned long flags;
349348
350349 tp = (void *)tlv;
351350 mwifiex_dbg(priv->adapter, EVENT,
....@@ -361,14 +360,16 @@
361360 } else if (is_multicast_ether_addr(tp->peermac)) {
362361 mwifiex_update_ralist_tx_pause(priv, tp->peermac, tp->tx_pause);
363362 } else {
364
- spin_lock_irqsave(&priv->sta_list_spinlock, flags);
363
+ spin_lock_bh(&priv->sta_list_spinlock);
365364 sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac);
366365 if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) {
367366 sta_ptr->tx_pause = tp->tx_pause;
367
+ spin_unlock_bh(&priv->sta_list_spinlock);
368368 mwifiex_update_ralist_tx_pause(priv, tp->peermac,
369369 tp->tx_pause);
370
+ } else {
371
+ spin_unlock_bh(&priv->sta_list_spinlock);
370372 }
371
- spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
372373 }
373374 }
374375
....@@ -378,7 +379,6 @@
378379 struct mwifiex_tx_pause_tlv *tp;
379380 struct mwifiex_sta_node *sta_ptr;
380381 int status;
381
- unsigned long flags;
382382
383383 tp = (void *)tlv;
384384 mwifiex_dbg(priv->adapter, EVENT,
....@@ -397,15 +397,17 @@
397397
398398 status = mwifiex_get_tdls_link_status(priv, tp->peermac);
399399 if (mwifiex_is_tdls_link_setup(status)) {
400
- spin_lock_irqsave(&priv->sta_list_spinlock, flags);
400
+ spin_lock_bh(&priv->sta_list_spinlock);
401401 sta_ptr = mwifiex_get_sta_entry(priv, tp->peermac);
402402 if (sta_ptr && sta_ptr->tx_pause != tp->tx_pause) {
403403 sta_ptr->tx_pause = tp->tx_pause;
404
+ spin_unlock_bh(&priv->sta_list_spinlock);
404405 mwifiex_update_ralist_tx_pause(priv,
405406 tp->peermac,
406407 tp->tx_pause);
408
+ } else {
409
+ spin_unlock_bh(&priv->sta_list_spinlock);
407410 }
408
- spin_unlock_irqrestore(&priv->sta_list_spinlock, flags);
409411 }
410412 }
411413 }
....@@ -937,8 +939,8 @@
937939 ibss_sta_addr);
938940 sta_ptr = mwifiex_add_sta_entry(priv, ibss_sta_addr);
939941 if (sta_ptr && adapter->adhoc_11n_enabled) {
940
- mwifiex_check_ibss_peer_capabilties(priv, sta_ptr,
941
- adapter->event_skb);
942
+ mwifiex_check_ibss_peer_capabilities(priv, sta_ptr,
943
+ adapter->event_skb);
942944 if (sta_ptr->is_11n_enabled)
943945 for (i = 0; i < MAX_NUM_TID; i++)
944946 sta_ptr->ampdu_sta[i] =
....@@ -1059,6 +1061,9 @@
10591061 break;
10601062 case EVENT_BT_COEX_WLAN_PARA_CHANGE:
10611063 dev_dbg(adapter->dev, "EVENT: BT coex wlan param update\n");
1064
+ if (adapter->ignore_btcoex_events)
1065
+ break;
1066
+
10621067 mwifiex_bt_coex_wlan_param_update_event(priv,
10631068 adapter->event_skb);
10641069 break;