forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/net/wireless/marvell/mwifiex/sta_rx.c
....@@ -1,10 +1,10 @@
11 /*
2
- * Marvell Wireless LAN device driver: station RX data handling
2
+ * NXP Wireless LAN device driver: station RX data 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.,
....@@ -152,14 +152,17 @@
152152 mwifiex_process_tdls_action_frame(priv, offset, rx_pkt_len);
153153 }
154154
155
- priv->rxpd_rate = local_rx_pd->rx_rate;
156
-
157
- priv->rxpd_htinfo = local_rx_pd->ht_info;
155
+ /* Only stash RX bitrate for unicast packets. */
156
+ if (likely(!is_multicast_ether_addr(rx_pkt_hdr->eth803_hdr.h_dest))) {
157
+ priv->rxpd_rate = local_rx_pd->rx_rate;
158
+ priv->rxpd_htinfo = local_rx_pd->ht_info;
159
+ }
158160
159161 if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA ||
160162 GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) {
161
- adj_rx_rate = mwifiex_adjust_data_rate(priv, priv->rxpd_rate,
162
- priv->rxpd_htinfo);
163
+ adj_rx_rate = mwifiex_adjust_data_rate(priv,
164
+ local_rx_pd->rx_rate,
165
+ local_rx_pd->ht_info);
163166 mwifiex_hist_data_add(priv, adj_rx_rate, local_rx_pd->snr,
164167 local_rx_pd->nf);
165168 }
....@@ -247,7 +250,8 @@
247250 local_rx_pd->nf);
248251 }
249252 } else {
250
- if (rx_pkt_type != PKT_TYPE_BAR)
253
+ if (rx_pkt_type != PKT_TYPE_BAR &&
254
+ local_rx_pd->priority < MAX_NUM_TID)
251255 priv->rx_seq[local_rx_pd->priority] = seq_num;
252256 memcpy(ta, priv->curr_bss_params.bss_descriptor.mac_address,
253257 ETH_ALEN);