diff options
author | Golan Ben Ami <golan.ben.ami@intel.com> | 2018-02-05 12:54:36 +0200 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-08-02 10:50:05 +0300 |
commit | 18ead597daa17a557249cf4b2f494361d836ed52 (patch) | |
tree | 3c8841d637f2bda1e7ba2ff7497495f026021b60 /drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | |
parent | 0307c839613e17b052c53e2c80a6c76fd1cd0320 (diff) | |
download | linux-18ead597daa17a557249cf4b2f494361d836ed52.tar.gz linux-18ead597daa17a557249cf4b2f494361d836ed52.tar.bz2 linux-18ead597daa17a557249cf4b2f494361d836ed52.zip |
iwlwifi: support new rx_mpdu_desc api
22560 devices use a new rx_mpdu_desc api.
Update the code to use the new api.
Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/api/rx.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/api/rx.h | 179 |
1 files changed, 133 insertions, 46 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h index 0daa09c94b0f..565343f7e61f 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/rx.h @@ -377,78 +377,94 @@ enum iwl_rx_he_phy { }; /** - * struct iwl_rx_mpdu_desc - RX MPDU descriptor + * struct iwl_rx_mpdu_desc_v1 - RX MPDU descriptor */ -struct iwl_rx_mpdu_desc { - /* DW2 */ - /** - * @mpdu_len: MPDU length - */ - __le16 mpdu_len; - /** - * @mac_flags1: &enum iwl_rx_mpdu_mac_flags1 - */ - u8 mac_flags1; - /** - * @mac_flags2: &enum iwl_rx_mpdu_mac_flags2 - */ - u8 mac_flags2; - /* DW3 */ +struct iwl_rx_mpdu_desc_v1 { + /* DW7 - carries rss_hash only when rpa_en == 1 */ /** - * @amsdu_info: &enum iwl_rx_mpdu_amsdu_info + * @rss_hash: RSS hash value */ - u8 amsdu_info; + __le32 rss_hash; + /* DW8 - carries filter_match only when rpa_en == 1 */ /** - * @phy_info: &enum iwl_rx_mpdu_phy_info + * @filter_match: filter match value */ - __le16 phy_info; + __le32 filter_match; + /* DW9 */ /** - * @mac_phy_idx: MAC/PHY index + * @rate_n_flags: RX rate/flags encoding */ - u8 mac_phy_idx; - /* DW4 - carries csum data only when rpa_en == 1 */ + __le32 rate_n_flags; + /* DW10 */ /** - * @raw_csum: raw checksum (alledgedly unreliable) + * @energy_a: energy chain A */ - __le16 raw_csum; + u8 energy_a; /** - * @l3l4_flags: &enum iwl_rx_l3l4_flags + * @energy_b: energy chain B */ - __le16 l3l4_flags; - /* DW5 */ + u8 energy_b; /** - * @status: &enum iwl_rx_mpdu_status + * @channel: channel number */ - __le16 status; + u8 channel; /** - * @hash_filter: hash filter value + * @mac_context: MAC context mask */ - u8 hash_filter; + u8 mac_context; + /* DW11 */ /** - * @sta_id_flags: &enum iwl_rx_mpdu_sta_id_flags + * @gp2_on_air_rise: GP2 timer value on air rise (INA) */ - u8 sta_id_flags; - /* DW6 */ + __le32 gp2_on_air_rise; + /* DW12 & DW13 */ + union { + /** + * @tsf_on_air_rise: + * TSF value on air rise (INA), only valid if + * %IWL_RX_MPDU_PHY_TSF_OVERLOAD isn't set + */ + __le64 tsf_on_air_rise; + /** + * @he_phy_data: + * HE PHY data, see &enum iwl_rx_he_phy, valid + * only if %IWL_RX_MPDU_PHY_TSF_OVERLOAD is set + */ + __le64 he_phy_data; + }; +} __packed; + +/** + * struct iwl_rx_mpdu_desc_v3 - RX MPDU descriptor + */ +struct iwl_rx_mpdu_desc_v3 { + /* DW7 - carries filter_match only when rpa_en == 1 */ /** - * @reorder_data: &enum iwl_rx_mpdu_reorder_data + * @filter_match: filter match value */ - __le32 reorder_data; - /* DW7 - carries rss_hash only when rpa_en == 1 */ + __le32 filter_match; + /* DW8 - carries rss_hash only when rpa_en == 1 */ /** * @rss_hash: RSS hash value */ __le32 rss_hash; - /* DW8 - carries filter_match only when rpa_en == 1 */ + /* DW9 */ /** - * @filter_match: filter match value + * @partial_hash: 31:0 ip/tcp header hash + * w/o some fields (such as IP SRC addr) */ - __le32 filter_match; - /* DW9 */ + __le32 partial_hash; + /* DW10 */ + /** + * @raw_xsum: raw xsum value + */ + __le32 raw_xsum; + /* DW11 */ /** * @rate_n_flags: RX rate/flags encoding */ __le32 rate_n_flags; - /* DW10 */ + /* DW12 */ /** * @energy_a: energy chain A */ @@ -465,12 +481,12 @@ struct iwl_rx_mpdu_desc { * @mac_context: MAC context mask */ u8 mac_context; - /* DW11 */ + /* DW13 */ /** * @gp2_on_air_rise: GP2 timer value on air rise (INA) */ __le32 gp2_on_air_rise; - /* DW12 & DW13 */ + /* DW14 & DW15 */ union { /** * @tsf_on_air_rise: @@ -485,7 +501,78 @@ struct iwl_rx_mpdu_desc { */ __le64 he_phy_data; }; -} __packed; + /* DW16 & DW17 */ + /** + * @reserved: reserved + */ + __le32 reserved[2]; +} __packed; /* RX_MPDU_RES_START_API_S_VER_3 */ + +/** + * struct iwl_rx_mpdu_desc - RX MPDU descriptor + */ +struct iwl_rx_mpdu_desc { + /* DW2 */ + /** + * @mpdu_len: MPDU length + */ + __le16 mpdu_len; + /** + * @mac_flags1: &enum iwl_rx_mpdu_mac_flags1 + */ + u8 mac_flags1; + /** + * @mac_flags2: &enum iwl_rx_mpdu_mac_flags2 + */ + u8 mac_flags2; + /* DW3 */ + /** + * @amsdu_info: &enum iwl_rx_mpdu_amsdu_info + */ + u8 amsdu_info; + /** + * @phy_info: &enum iwl_rx_mpdu_phy_info + */ + __le16 phy_info; + /** + * @mac_phy_idx: MAC/PHY index + */ + u8 mac_phy_idx; + /* DW4 - carries csum data only when rpa_en == 1 */ + /** + * @raw_csum: raw checksum (alledgedly unreliable) + */ + __le16 raw_csum; + /** + * @l3l4_flags: &enum iwl_rx_l3l4_flags + */ + __le16 l3l4_flags; + /* DW5 */ + /** + * @status: &enum iwl_rx_mpdu_status + */ + __le16 status; + /** + * @hash_filter: hash filter value + */ + u8 hash_filter; + /** + * @sta_id_flags: &enum iwl_rx_mpdu_sta_id_flags + */ + u8 sta_id_flags; + /* DW6 */ + /** + * @reorder_data: &enum iwl_rx_mpdu_reorder_data + */ + __le32 reorder_data; + + union { + struct iwl_rx_mpdu_desc_v1 v1; + struct iwl_rx_mpdu_desc_v3 v3; + }; +} __packed; /* RX_MPDU_RES_START_API_S_VER_3 */ + +#define IWL_RX_DESC_SIZE_V1 offsetofend(struct iwl_rx_mpdu_desc, v1) struct iwl_frame_release { u8 baid; |