|
|
deb259 |
From 90c061a4ac143f50225054e38f8a715e499312b7 Mon Sep 17 00:00:00 2001
|
|
|
deb259 |
From: Eugene Syromiatnikov <esyr@redhat.com>
|
|
|
deb259 |
Date: Fri, 6 Sep 2019 01:13:04 +0200
|
|
|
deb259 |
Subject: [PATCH 40/43] Revert "iwlwifi: support new rx_mpdu_desc api"
|
|
|
deb259 |
|
|
|
deb259 |
This reverts commit 18ead597daa17a557249cf4b2f494361d836ed52.
|
|
|
deb259 |
---
|
|
|
deb259 |
drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 179 ++++++-----------------
|
|
|
deb259 |
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 8 +-
|
|
|
deb259 |
drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 +-
|
|
|
deb259 |
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 95 +++---------
|
|
|
deb259 |
4 files changed, 71 insertions(+), 217 deletions(-)
|
|
|
deb259 |
|
|
|
deb259 |
Index: src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h
|
|
|
deb259 |
===================================================================
|
|
|
deb259 |
--- src.orig/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h 2019-09-06 01:25:46.216282878 +0200
|
|
|
deb259 |
+++ src/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h 2019-09-06 01:25:47.252269663 +0200
|
|
|
deb259 |
@@ -375,94 +375,78 @@
|
|
|
deb259 |
};
|
|
|
deb259 |
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * struct iwl_rx_mpdu_desc_v1 - RX MPDU descriptor
|
|
|
deb259 |
+ * struct iwl_rx_mpdu_desc - RX MPDU descriptor
|
|
|
deb259 |
*/
|
|
|
deb259 |
-struct iwl_rx_mpdu_desc_v1 {
|
|
|
deb259 |
- /* DW7 - carries rss_hash only when rpa_en == 1 */
|
|
|
deb259 |
+struct iwl_rx_mpdu_desc {
|
|
|
deb259 |
+ /* DW2 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @rss_hash: RSS hash value
|
|
|
deb259 |
+ * @mpdu_len: MPDU length
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 rss_hash;
|
|
|
deb259 |
- /* DW8 - carries filter_match only when rpa_en == 1 */
|
|
|
deb259 |
+ __le16 mpdu_len;
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @filter_match: filter match value
|
|
|
deb259 |
+ * @mac_flags1: &enum iwl_rx_mpdu_mac_flags1
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 filter_match;
|
|
|
deb259 |
- /* DW9 */
|
|
|
deb259 |
+ u8 mac_flags1;
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @rate_n_flags: RX rate/flags encoding
|
|
|
deb259 |
+ * @mac_flags2: &enum iwl_rx_mpdu_mac_flags2
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 rate_n_flags;
|
|
|
deb259 |
- /* DW10 */
|
|
|
deb259 |
+ u8 mac_flags2;
|
|
|
deb259 |
+ /* DW3 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @energy_a: energy chain A
|
|
|
deb259 |
+ * @amsdu_info: &enum iwl_rx_mpdu_amsdu_info
|
|
|
deb259 |
*/
|
|
|
deb259 |
- u8 energy_a;
|
|
|
deb259 |
+ u8 amsdu_info;
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @energy_b: energy chain B
|
|
|
deb259 |
+ * @phy_info: &enum iwl_rx_mpdu_phy_info
|
|
|
deb259 |
*/
|
|
|
deb259 |
- u8 energy_b;
|
|
|
deb259 |
+ __le16 phy_info;
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @channel: channel number
|
|
|
deb259 |
+ * @mac_phy_idx: MAC/PHY index
|
|
|
deb259 |
*/
|
|
|
deb259 |
- u8 channel;
|
|
|
deb259 |
+ u8 mac_phy_idx;
|
|
|
deb259 |
+ /* DW4 - carries csum data only when rpa_en == 1 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @mac_context: MAC context mask
|
|
|
deb259 |
+ * @raw_csum: raw checksum (alledgedly unreliable)
|
|
|
deb259 |
*/
|
|
|
deb259 |
- u8 mac_context;
|
|
|
deb259 |
- /* DW11 */
|
|
|
deb259 |
+ __le16 raw_csum;
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @gp2_on_air_rise: GP2 timer value on air rise (INA)
|
|
|
deb259 |
+ * @l3l4_flags: &enum iwl_rx_l3l4_flags
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 gp2_on_air_rise;
|
|
|
deb259 |
- /* DW12 & DW13 */
|
|
|
deb259 |
- union {
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @tsf_on_air_rise:
|
|
|
deb259 |
- * TSF value on air rise (INA), only valid if
|
|
|
deb259 |
- * %IWL_RX_MPDU_PHY_TSF_OVERLOAD isn't set
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le64 tsf_on_air_rise;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @he_phy_data:
|
|
|
deb259 |
- * HE PHY data, see &enum iwl_rx_he_phy, valid
|
|
|
deb259 |
- * only if %IWL_RX_MPDU_PHY_TSF_OVERLOAD is set
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le64 he_phy_data;
|
|
|
deb259 |
- };
|
|
|
deb259 |
-} __packed;
|
|
|
deb259 |
-
|
|
|
deb259 |
-/**
|
|
|
deb259 |
- * struct iwl_rx_mpdu_desc_v3 - RX MPDU descriptor
|
|
|
deb259 |
- */
|
|
|
deb259 |
-struct iwl_rx_mpdu_desc_v3 {
|
|
|
deb259 |
- /* DW7 - carries filter_match only when rpa_en == 1 */
|
|
|
deb259 |
+ __le16 l3l4_flags;
|
|
|
deb259 |
+ /* DW5 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @filter_match: filter match value
|
|
|
deb259 |
+ * @status: &enum iwl_rx_mpdu_status
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 filter_match;
|
|
|
deb259 |
- /* DW8 - carries rss_hash only when rpa_en == 1 */
|
|
|
deb259 |
+ __le16 status;
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @rss_hash: RSS hash value
|
|
|
deb259 |
+ * @hash_filter: hash filter value
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 rss_hash;
|
|
|
deb259 |
- /* DW9 */
|
|
|
deb259 |
+ u8 hash_filter;
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @partial_hash: 31:0 ip/tcp header hash
|
|
|
deb259 |
- * w/o some fields (such as IP SRC addr)
|
|
|
deb259 |
+ * @sta_id_flags: &enum iwl_rx_mpdu_sta_id_flags
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 partial_hash;
|
|
|
deb259 |
- /* DW10 */
|
|
|
deb259 |
+ u8 sta_id_flags;
|
|
|
deb259 |
+ /* DW6 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
- * @raw_xsum: raw xsum value
|
|
|
deb259 |
+ * @reorder_data: &enum iwl_rx_mpdu_reorder_data
|
|
|
deb259 |
*/
|
|
|
deb259 |
- __le32 raw_xsum;
|
|
|
deb259 |
- /* DW11 */
|
|
|
deb259 |
+ __le32 reorder_data;
|
|
|
deb259 |
+ /* DW7 - carries rss_hash only when rpa_en == 1 */
|
|
|
deb259 |
+ /**
|
|
|
deb259 |
+ * @rss_hash: RSS hash value
|
|
|
deb259 |
+ */
|
|
|
deb259 |
+ __le32 rss_hash;
|
|
|
deb259 |
+ /* DW8 - carries filter_match only when rpa_en == 1 */
|
|
|
deb259 |
+ /**
|
|
|
deb259 |
+ * @filter_match: filter match value
|
|
|
deb259 |
+ */
|
|
|
deb259 |
+ __le32 filter_match;
|
|
|
deb259 |
+ /* DW9 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
* @rate_n_flags: RX rate/flags encoding
|
|
|
deb259 |
*/
|
|
|
deb259 |
__le32 rate_n_flags;
|
|
|
deb259 |
- /* DW12 */
|
|
|
deb259 |
+ /* DW10 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
* @energy_a: energy chain A
|
|
|
deb259 |
*/
|
|
|
deb259 |
@@ -479,12 +463,12 @@
|
|
|
deb259 |
* @mac_context: MAC context mask
|
|
|
deb259 |
*/
|
|
|
deb259 |
u8 mac_context;
|
|
|
deb259 |
- /* DW13 */
|
|
|
deb259 |
+ /* DW11 */
|
|
|
deb259 |
/**
|
|
|
deb259 |
* @gp2_on_air_rise: GP2 timer value on air rise (INA)
|
|
|
deb259 |
*/
|
|
|
deb259 |
__le32 gp2_on_air_rise;
|
|
|
deb259 |
- /* DW14 & DW15 */
|
|
|
deb259 |
+ /* DW12 & DW13 */
|
|
|
deb259 |
union {
|
|
|
deb259 |
/**
|
|
|
deb259 |
* @tsf_on_air_rise:
|
|
|
deb259 |
@@ -499,78 +483,7 @@
|
|
|
deb259 |
*/
|
|
|
deb259 |
__le64 he_phy_data;
|
|
|
deb259 |
};
|
|
|
deb259 |
- /* DW16 & DW17 */
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @reserved: reserved
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le32 reserved[2];
|
|
|
deb259 |
-} __packed; /* RX_MPDU_RES_START_API_S_VER_3 */
|
|
|
deb259 |
-
|
|
|
deb259 |
-/**
|
|
|
deb259 |
- * struct iwl_rx_mpdu_desc - RX MPDU descriptor
|
|
|
deb259 |
- */
|
|
|
deb259 |
-struct iwl_rx_mpdu_desc {
|
|
|
deb259 |
- /* DW2 */
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @mpdu_len: MPDU length
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le16 mpdu_len;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @mac_flags1: &enum iwl_rx_mpdu_mac_flags1
|
|
|
deb259 |
- */
|
|
|
deb259 |
- u8 mac_flags1;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @mac_flags2: &enum iwl_rx_mpdu_mac_flags2
|
|
|
deb259 |
- */
|
|
|
deb259 |
- u8 mac_flags2;
|
|
|
deb259 |
- /* DW3 */
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @amsdu_info: &enum iwl_rx_mpdu_amsdu_info
|
|
|
deb259 |
- */
|
|
|
deb259 |
- u8 amsdu_info;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @phy_info: &enum iwl_rx_mpdu_phy_info
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le16 phy_info;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @mac_phy_idx: MAC/PHY index
|
|
|
deb259 |
- */
|
|
|
deb259 |
- u8 mac_phy_idx;
|
|
|
deb259 |
- /* DW4 - carries csum data only when rpa_en == 1 */
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @raw_csum: raw checksum (alledgedly unreliable)
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le16 raw_csum;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @l3l4_flags: &enum iwl_rx_l3l4_flags
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le16 l3l4_flags;
|
|
|
deb259 |
- /* DW5 */
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @status: &enum iwl_rx_mpdu_status
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le16 status;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @hash_filter: hash filter value
|
|
|
deb259 |
- */
|
|
|
deb259 |
- u8 hash_filter;
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @sta_id_flags: &enum iwl_rx_mpdu_sta_id_flags
|
|
|
deb259 |
- */
|
|
|
deb259 |
- u8 sta_id_flags;
|
|
|
deb259 |
- /* DW6 */
|
|
|
deb259 |
- /**
|
|
|
deb259 |
- * @reorder_data: &enum iwl_rx_mpdu_reorder_data
|
|
|
deb259 |
- */
|
|
|
deb259 |
- __le32 reorder_data;
|
|
|
deb259 |
-
|
|
|
deb259 |
- union {
|
|
|
deb259 |
- struct iwl_rx_mpdu_desc_v1 v1;
|
|
|
deb259 |
- struct iwl_rx_mpdu_desc_v3 v3;
|
|
|
deb259 |
- };
|
|
|
deb259 |
-} __packed; /* RX_MPDU_RES_START_API_S_VER_3 */
|
|
|
deb259 |
-
|
|
|
deb259 |
-#define IWL_RX_DESC_SIZE_V1 offsetofend(struct iwl_rx_mpdu_desc, v1)
|
|
|
deb259 |
+} __packed;
|
|
|
deb259 |
|
|
|
deb259 |
#define RX_NO_DATA_CHAIN_A_POS 0
|
|
|
deb259 |
#define RX_NO_DATA_CHAIN_A_MSK (0xff << RX_NO_DATA_CHAIN_A_POS)
|
|
|
deb259 |
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
|
|
|
deb259 |
===================================================================
|
|
|
deb259 |
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c 2019-06-27 14:54:04.133678337 +0200
|
|
|
deb259 |
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c 2019-09-06 01:25:47.253269650 +0200
|
|
|
deb259 |
@@ -1141,10 +1141,6 @@
|
|
|
deb259 |
struct iwl_rx_mpdu_desc *desc;
|
|
|
deb259 |
int bin_len = count / 2;
|
|
|
deb259 |
int ret = -EINVAL;
|
|
|
deb259 |
- size_t mpdu_cmd_hdr_size =
|
|
|
deb259 |
- (mvm->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) ?
|
|
|
deb259 |
- sizeof(struct iwl_rx_mpdu_desc) :
|
|
|
deb259 |
- IWL_RX_DESC_SIZE_V1;
|
|
|
deb259 |
|
|
|
deb259 |
if (!iwl_mvm_firmware_running(mvm))
|
|
|
deb259 |
return -EIO;
|
|
|
deb259 |
@@ -1163,7 +1159,7 @@
|
|
|
deb259 |
goto out;
|
|
|
deb259 |
|
|
|
deb259 |
/* avoid invalid memory access */
|
|
|
deb259 |
- if (bin_len < sizeof(*pkt) + mpdu_cmd_hdr_size)
|
|
|
deb259 |
+ if (bin_len < sizeof(*pkt) + sizeof(*desc))
|
|
|
deb259 |
goto out;
|
|
|
deb259 |
|
|
|
deb259 |
/* check this is RX packet */
|
|
|
deb259 |
@@ -1174,7 +1170,7 @@
|
|
|
deb259 |
/* check the length in metadata matches actual received length */
|
|
|
deb259 |
desc = (void *)pkt->data;
|
|
|
deb259 |
if (le16_to_cpu(desc->mpdu_len) !=
|
|
|
deb259 |
- (bin_len - mpdu_cmd_hdr_size - sizeof(*pkt)))
|
|
|
deb259 |
+ (bin_len - sizeof(*desc) - sizeof(*pkt)))
|
|
|
deb259 |
goto out;
|
|
|
deb259 |
|
|
|
deb259 |
local_bh_disable();
|
|
|
deb259 |
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
|
|
|
deb259 |
===================================================================
|
|
|
deb259 |
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/ops.c 2019-09-06 01:25:41.666340915 +0200
|
|
|
deb259 |
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/ops.c 2019-09-06 01:25:47.253269650 +0200
|
|
|
deb259 |
@@ -663,11 +663,7 @@
|
|
|
deb259 |
|
|
|
deb259 |
if (iwl_mvm_has_new_rx_api(mvm)) {
|
|
|
deb259 |
op_mode->ops = &iwl_mvm_ops_mq;
|
|
|
deb259 |
- trans->rx_mpdu_cmd_hdr_size =
|
|
|
deb259 |
- (trans->cfg->device_family >=
|
|
|
deb259 |
- IWL_DEVICE_FAMILY_22560) ?
|
|
|
deb259 |
- sizeof(struct iwl_rx_mpdu_desc) :
|
|
|
deb259 |
- IWL_RX_DESC_SIZE_V1;
|
|
|
deb259 |
+ trans->rx_mpdu_cmd_hdr_size = sizeof(struct iwl_rx_mpdu_desc);
|
|
|
deb259 |
} else {
|
|
|
deb259 |
op_mode->ops = &iwl_mvm_ops;
|
|
|
deb259 |
trans->rx_mpdu_cmd_hdr_size =
|
|
|
deb259 |
Index: src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
|
|
|
deb259 |
===================================================================
|
|
|
deb259 |
--- src.orig/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c 2019-09-06 01:25:47.083271819 +0200
|
|
|
deb259 |
+++ src/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c 2019-09-06 01:25:47.254269638 +0200
|
|
|
deb259 |
@@ -253,14 +253,15 @@
|
|
|
deb259 |
}
|
|
|
deb259 |
|
|
|
deb259 |
static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
|
|
|
deb259 |
- struct ieee80211_rx_status *rx_status,
|
|
|
deb259 |
- u32 rate_n_flags, int energy_a,
|
|
|
deb259 |
- int energy_b)
|
|
|
deb259 |
+ struct iwl_rx_mpdu_desc *desc,
|
|
|
deb259 |
+ struct ieee80211_rx_status *rx_status)
|
|
|
deb259 |
{
|
|
|
deb259 |
- int max_energy;
|
|
|
deb259 |
- u32 rate_flags = rate_n_flags;
|
|
|
deb259 |
+ int energy_a, energy_b, max_energy;
|
|
|
deb259 |
+ u32 rate_flags = le32_to_cpu(desc->rate_n_flags);
|
|
|
deb259 |
|
|
|
deb259 |
+ energy_a = desc->energy_a;
|
|
|
deb259 |
energy_a = energy_a ? -energy_a : S8_MIN;
|
|
|
deb259 |
+ energy_b = desc->energy_b;
|
|
|
deb259 |
energy_b = energy_b ? -energy_b : S8_MIN;
|
|
|
deb259 |
max_energy = max(energy_a, energy_b);
|
|
|
deb259 |
|
|
|
deb259 |
@@ -412,8 +413,7 @@
|
|
|
deb259 |
tid = IWL_MAX_TID_COUNT;
|
|
|
deb259 |
|
|
|
deb259 |
/* If this wasn't a part of an A-MSDU the sub-frame index will be 0 */
|
|
|
deb259 |
- sub_frame_idx = desc->amsdu_info &
|
|
|
deb259 |
- IWL_RX_MPDU_AMSDU_SUBFRAME_IDX_MASK;
|
|
|
deb259 |
+ sub_frame_idx = desc->amsdu_info & IWL_RX_MPDU_AMSDU_SUBFRAME_IDX_MASK;
|
|
|
deb259 |
|
|
|
deb259 |
if (unlikely(ieee80211_has_retry(hdr->frame_control) &&
|
|
|
deb259 |
dup_data->last_seq[tid] == hdr->seq_ctrl &&
|
|
|
deb259 |
@@ -909,42 +909,24 @@
|
|
|
deb259 |
struct ieee80211_rx_status *rx_status;
|
|
|
deb259 |
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
|
|
deb259 |
struct iwl_rx_mpdu_desc *desc = (void *)pkt->data;
|
|
|
deb259 |
- struct ieee80211_hdr *hdr;
|
|
|
deb259 |
+ struct ieee80211_hdr *hdr = (void *)(pkt->data + sizeof(*desc));
|
|
|
deb259 |
u32 len = le16_to_cpu(desc->mpdu_len);
|
|
|
deb259 |
- u32 rate_n_flags, gp2_on_air_rise;
|
|
|
deb259 |
+ u32 rate_n_flags = le32_to_cpu(desc->rate_n_flags);
|
|
|
deb259 |
u16 phy_info = le16_to_cpu(desc->phy_info);
|
|
|
deb259 |
struct ieee80211_sta *sta = NULL;
|
|
|
deb259 |
struct sk_buff *skb;
|
|
|
deb259 |
- u8 crypt_len = 0, channel, energy_a, energy_b;
|
|
|
deb259 |
+ u8 crypt_len = 0;
|
|
|
deb259 |
struct ieee80211_radiotap_he *he = NULL;
|
|
|
deb259 |
struct ieee80211_radiotap_he_mu *he_mu = NULL;
|
|
|
deb259 |
u32 he_type = 0xffffffff;
|
|
|
deb259 |
/* this is invalid e.g. because puncture type doesn't allow 0b11 */
|
|
|
deb259 |
#define HE_PHY_DATA_INVAL ((u64)-1)
|
|
|
deb259 |
u64 he_phy_data = HE_PHY_DATA_INVAL;
|
|
|
deb259 |
- size_t desc_size;
|
|
|
deb259 |
bool csi = false;
|
|
|
deb259 |
|
|
|
deb259 |
if (unlikely(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)))
|
|
|
deb259 |
return;
|
|
|
deb259 |
|
|
|
deb259 |
- if (mvm->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560) {
|
|
|
deb259 |
- rate_n_flags = le32_to_cpu(desc->v3.rate_n_flags);
|
|
|
deb259 |
- channel = desc->v3.channel;
|
|
|
deb259 |
- gp2_on_air_rise = le32_to_cpu(desc->v3.gp2_on_air_rise);
|
|
|
deb259 |
- energy_a = desc->v3.energy_a;
|
|
|
deb259 |
- energy_b = desc->v3.energy_b;
|
|
|
deb259 |
- desc_size = sizeof(*desc);
|
|
|
deb259 |
- } else {
|
|
|
deb259 |
- rate_n_flags = le32_to_cpu(desc->v1.rate_n_flags);
|
|
|
deb259 |
- channel = desc->v1.channel;
|
|
|
deb259 |
- gp2_on_air_rise = le32_to_cpu(desc->v1.gp2_on_air_rise);
|
|
|
deb259 |
- energy_a = desc->v1.energy_a;
|
|
|
deb259 |
- energy_b = desc->v1.energy_b;
|
|
|
deb259 |
- desc_size = IWL_RX_DESC_SIZE_V1;
|
|
|
deb259 |
- }
|
|
|
deb259 |
-
|
|
|
deb259 |
- hdr = (void *)(pkt->data + desc_size);
|
|
|
deb259 |
/* Dont use dev_alloc_skb(), we'll have enough headroom once
|
|
|
deb259 |
* ieee80211_hdr pulled.
|
|
|
deb259 |
*/
|
|
|
deb259 |
@@ -991,11 +973,8 @@
|
|
|
deb259 |
he_type = rate_n_flags & RATE_MCS_HE_TYPE_MSK;
|
|
|
deb259 |
|
|
|
deb259 |
if (phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD) {
|
|
|
deb259 |
- if (mvm->trans->cfg->device_family >=
|
|
|
deb259 |
- IWL_DEVICE_FAMILY_22560)
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v3.he_phy_data);
|
|
|
deb259 |
- else
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v1.he_phy_data);
|
|
|
deb259 |
+ he_phy_data =
|
|
|
deb259 |
+ le64_to_cpu(desc->he_phy_data);
|
|
|
deb259 |
|
|
|
deb259 |
if (he_type == RATE_MCS_HE_TYPE_MU) {
|
|
|
deb259 |
he_mu = skb_put_data(skb, &mu_known,
|
|
|
deb259 |
@@ -1009,8 +988,6 @@
|
|
|
deb259 |
__skb_pull(skb, radiotap_len);
|
|
|
deb259 |
}
|
|
|
deb259 |
|
|
|
deb259 |
- rx_status = IEEE80211_SKB_RXCB(skb);
|
|
|
deb259 |
-
|
|
|
deb259 |
if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, phy_info, desc,
|
|
|
deb259 |
le32_to_cpu(pkt->len_n_flags), queue,
|
|
|
deb259 |
&crypt_len)) {
|
|
|
deb259 |
@@ -1034,28 +1011,14 @@
|
|
|
deb259 |
rx_status->enc_flags |= RX_ENC_FLAG_SHORTPRE;
|
|
|
deb259 |
|
|
|
deb259 |
if (likely(!(phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD))) {
|
|
|
deb259 |
- u64 tsf_on_air_rise;
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (mvm->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
|
|
deb259 |
- tsf_on_air_rise = le64_to_cpu(desc->v3.tsf_on_air_rise);
|
|
|
deb259 |
- else
|
|
|
deb259 |
- tsf_on_air_rise = le64_to_cpu(desc->v1.tsf_on_air_rise);
|
|
|
deb259 |
-
|
|
|
deb259 |
- rx_status->mactime = tsf_on_air_rise;
|
|
|
deb259 |
+ rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise);
|
|
|
deb259 |
/* TSF as indicated by the firmware is at INA time */
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_MACTIME_PLCP_START;
|
|
|
deb259 |
} else if (he_type == RATE_MCS_HE_TYPE_SU) {
|
|
|
deb259 |
- u64 he_phy_data;
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (mvm->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v3.he_phy_data);
|
|
|
deb259 |
- else
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v1.he_phy_data);
|
|
|
deb259 |
-
|
|
|
deb259 |
he->data1 |=
|
|
|
deb259 |
cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA1_UL_DL_KNOWN);
|
|
|
deb259 |
if (FIELD_GET(IWL_RX_HE_PHY_UPLINK,
|
|
|
deb259 |
- he_phy_data))
|
|
|
deb259 |
+ le64_to_cpu(desc->he_phy_data)))
|
|
|
deb259 |
he->data3 |=
|
|
|
deb259 |
cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA3_UL_DL);
|
|
|
deb259 |
|
|
|
deb259 |
@@ -1066,7 +1029,7 @@
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_AMPDU_DETAILS;
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_AMPDU_EOF_BIT_KNOWN;
|
|
|
deb259 |
if (FIELD_GET(IWL_RX_HE_PHY_DELIM_EOF,
|
|
|
deb259 |
- he_phy_data))
|
|
|
deb259 |
+ le64_to_cpu(desc->he_phy_data)))
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_AMPDU_EOF_BIT;
|
|
|
deb259 |
}
|
|
|
deb259 |
} else if (he_mu && he_phy_data != HE_PHY_DATA_INVAL) {
|
|
|
deb259 |
@@ -1091,23 +1054,16 @@
|
|
|
deb259 |
he_phy_data),
|
|
|
deb259 |
IEEE80211_RADIOTAP_HE_MU_FLAGS2_PUNC_FROM_SIG_A_BW);
|
|
|
deb259 |
}
|
|
|
deb259 |
- rx_status->device_timestamp = gp2_on_air_rise;
|
|
|
deb259 |
- rx_status->band = channel > 14 ? NL80211_BAND_5GHZ :
|
|
|
deb259 |
- NL80211_BAND_2GHZ;
|
|
|
deb259 |
- rx_status->freq = ieee80211_channel_to_frequency(channel,
|
|
|
deb259 |
+ rx_status->device_timestamp = le32_to_cpu(desc->gp2_on_air_rise);
|
|
|
deb259 |
+ rx_status->band = desc->channel > 14 ? NL80211_BAND_5GHZ :
|
|
|
deb259 |
+ NL80211_BAND_2GHZ;
|
|
|
deb259 |
+ rx_status->freq = ieee80211_channel_to_frequency(desc->channel,
|
|
|
deb259 |
rx_status->band);
|
|
|
deb259 |
- iwl_mvm_get_signal_strength(mvm, rx_status, rate_n_flags, energy_a,
|
|
|
deb259 |
- energy_b);
|
|
|
deb259 |
+ iwl_mvm_get_signal_strength(mvm, desc, rx_status);
|
|
|
deb259 |
|
|
|
deb259 |
/* update aggregation data for monitor sake on default queue */
|
|
|
deb259 |
if (!queue && (phy_info & IWL_RX_MPDU_PHY_AMPDU)) {
|
|
|
deb259 |
bool toggle_bit = phy_info & IWL_RX_MPDU_PHY_AMPDU_TOGGLE;
|
|
|
deb259 |
- u64 he_phy_data;
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (mvm->trans->cfg->device_family >= IWL_DEVICE_FAMILY_22560)
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v3.he_phy_data);
|
|
|
deb259 |
- else
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v1.he_phy_data);
|
|
|
deb259 |
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_AMPDU_DETAILS;
|
|
|
deb259 |
/*
|
|
|
deb259 |
@@ -1125,7 +1081,7 @@
|
|
|
deb259 |
he_type == RATE_MCS_HE_TYPE_MU) {
|
|
|
deb259 |
rx_status->flag |= RX_FLAG_AMPDU_EOF_BIT_KNOWN;
|
|
|
deb259 |
if (FIELD_GET(IWL_RX_HE_PHY_DELIM_EOF,
|
|
|
deb259 |
- he_phy_data))
|
|
|
deb259 |
+ le64_to_cpu(desc->he_phy_data)))
|
|
|
deb259 |
rx_status->flag |=
|
|
|
deb259 |
RX_FLAG_AMPDU_EOF_BIT;
|
|
|
deb259 |
}
|
|
|
deb259 |
@@ -1425,19 +1381,12 @@
|
|
|
deb259 |
break;
|
|
|
deb259 |
case RATE_MCS_HE_TYPE_MU: {
|
|
|
deb259 |
u16 val;
|
|
|
deb259 |
- u64 he_phy_data;
|
|
|
deb259 |
-
|
|
|
deb259 |
- if (mvm->trans->cfg->device_family >=
|
|
|
deb259 |
- IWL_DEVICE_FAMILY_22560)
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v3.he_phy_data);
|
|
|
deb259 |
- else
|
|
|
deb259 |
- he_phy_data = le64_to_cpu(desc->v1.he_phy_data);
|
|
|
deb259 |
|
|
|
deb259 |
if (he_phy_data == HE_PHY_DATA_INVAL)
|
|
|
deb259 |
break;
|
|
|
deb259 |
|
|
|
deb259 |
val = FIELD_GET(IWL_RX_HE_PHY_HE_LTF_NUM_MASK,
|
|
|
deb259 |
- he_phy_data);
|
|
|
deb259 |
+ le64_to_cpu(desc->he_phy_data));
|
|
|
deb259 |
|
|
|
deb259 |
he->data2 |=
|
|
|
deb259 |
cpu_to_le16(IEEE80211_RADIOTAP_HE_DATA2_NUM_LTF_SYMS_KNOWN);
|