tx.c (e752ab11dcb48353727ea26eefd740155e028865) | tx.c (c7eca79def44f1faf024d8442044287bef749818) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2/* 3 * Copyright (C) 2012-2014, 2018-2022 Intel Corporation 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 */ 7#include <linux/ieee80211.h> 8#include <linux/etherdevice.h> 9#include <linux/tcp.h> 10#include <net/ip.h> 11#include <net/ipv6.h> 12 13#include "iwl-trans.h" 14#include "iwl-eeprom-parse.h" 15#include "mvm.h" 16#include "sta.h" | 1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2/* 3 * Copyright (C) 2012-2014, 2018-2022 Intel Corporation 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 */ 7#include <linux/ieee80211.h> 8#include <linux/etherdevice.h> 9#include <linux/tcp.h> 10#include <net/ip.h> 11#include <net/ipv6.h> 12 13#include "iwl-trans.h" 14#include "iwl-eeprom-parse.h" 15#include "mvm.h" 16#include "sta.h" |
17#include "time-sync.h" |
|
17 18static void 19iwl_mvm_bar_check_trigger(struct iwl_mvm *mvm, const u8 *addr, 20 u16 tid, u16 ssn) 21{ 22 struct iwl_fw_dbg_trigger_tlv *trig; 23 struct iwl_fw_dbg_trigger_ba *ba_trig; 24 --- 1366 unchanged lines hidden (view full) --- 1391 1392 if (rate_n_flags & RATE_MCS_SGI_MSK) 1393 r->flags |= IEEE80211_TX_RC_SHORT_GI; 1394 if (format == RATE_MCS_HT_MSK) { 1395 r->flags |= IEEE80211_TX_RC_MCS; 1396 r->idx = rate; 1397 } else if (format == RATE_MCS_VHT_MSK) { 1398 ieee80211_rate_set_vht(r, rate, | 18 19static void 20iwl_mvm_bar_check_trigger(struct iwl_mvm *mvm, const u8 *addr, 21 u16 tid, u16 ssn) 22{ 23 struct iwl_fw_dbg_trigger_tlv *trig; 24 struct iwl_fw_dbg_trigger_ba *ba_trig; 25 --- 1366 unchanged lines hidden (view full) --- 1392 1393 if (rate_n_flags & RATE_MCS_SGI_MSK) 1394 r->flags |= IEEE80211_TX_RC_SHORT_GI; 1395 if (format == RATE_MCS_HT_MSK) { 1396 r->flags |= IEEE80211_TX_RC_MCS; 1397 r->idx = rate; 1398 } else if (format == RATE_MCS_VHT_MSK) { 1399 ieee80211_rate_set_vht(r, rate, |
1399 ((rate_n_flags & RATE_MCS_NSS_MSK) >> 1400 RATE_MCS_NSS_POS) + 1); | 1400 FIELD_GET(RATE_MCS_NSS_MSK, 1401 rate_n_flags) + 1); |
1401 r->flags |= IEEE80211_TX_RC_VHT_MCS; 1402 } else if (format == RATE_MCS_HE_MSK) { 1403 /* mac80211 cannot do this without ieee80211_tx_status_ext() 1404 * but it only matters for radiotap */ 1405 r->idx = 0; 1406 } else { 1407 r->idx = iwl_mvm_legacy_hw_idx_to_mac80211_idx(rate_n_flags, 1408 band); --- 14 unchanged lines hidden (view full) --- 1423 if (rate_n_flags & RATE_MCS_SGI_MSK_V1) 1424 r->flags |= IEEE80211_TX_RC_SHORT_GI; 1425 if (rate_n_flags & RATE_MCS_HT_MSK_V1) { 1426 r->flags |= IEEE80211_TX_RC_MCS; 1427 r->idx = rate_n_flags & RATE_HT_MCS_INDEX_MSK_V1; 1428 } else if (rate_n_flags & RATE_MCS_VHT_MSK_V1) { 1429 ieee80211_rate_set_vht( 1430 r, rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK, | 1402 r->flags |= IEEE80211_TX_RC_VHT_MCS; 1403 } else if (format == RATE_MCS_HE_MSK) { 1404 /* mac80211 cannot do this without ieee80211_tx_status_ext() 1405 * but it only matters for radiotap */ 1406 r->idx = 0; 1407 } else { 1408 r->idx = iwl_mvm_legacy_hw_idx_to_mac80211_idx(rate_n_flags, 1409 band); --- 14 unchanged lines hidden (view full) --- 1424 if (rate_n_flags & RATE_MCS_SGI_MSK_V1) 1425 r->flags |= IEEE80211_TX_RC_SHORT_GI; 1426 if (rate_n_flags & RATE_MCS_HT_MSK_V1) { 1427 r->flags |= IEEE80211_TX_RC_MCS; 1428 r->idx = rate_n_flags & RATE_HT_MCS_INDEX_MSK_V1; 1429 } else if (rate_n_flags & RATE_MCS_VHT_MSK_V1) { 1430 ieee80211_rate_set_vht( 1431 r, rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK, |
1431 ((rate_n_flags & RATE_VHT_MCS_NSS_MSK) >> 1432 RATE_VHT_MCS_NSS_POS) + 1); | 1432 FIELD_GET(RATE_MCS_NSS_MSK, rate_n_flags) + 1); |
1433 r->flags |= IEEE80211_TX_RC_VHT_MCS; 1434 } else { 1435 r->idx = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags, 1436 band); 1437 } 1438} 1439 1440/* --- 198 unchanged lines hidden (view full) --- 1639 */ 1640 info->status.tx_time = 1641 le16_to_cpu(tx_resp->wireless_media_time); 1642 BUILD_BUG_ON(ARRAY_SIZE(info->status.status_driver_data) < 1); 1643 lq_color = TX_RES_RATE_TABLE_COL_GET(tx_resp->tlc_info); 1644 info->status.status_driver_data[0] = 1645 RS_DRV_DATA_PACK(lq_color, tx_resp->reduced_tpc); 1646 | 1433 r->flags |= IEEE80211_TX_RC_VHT_MCS; 1434 } else { 1435 r->idx = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags, 1436 band); 1437 } 1438} 1439 1440/* --- 198 unchanged lines hidden (view full) --- 1639 */ 1640 info->status.tx_time = 1641 le16_to_cpu(tx_resp->wireless_media_time); 1642 BUILD_BUG_ON(ARRAY_SIZE(info->status.status_driver_data) < 1); 1643 lq_color = TX_RES_RATE_TABLE_COL_GET(tx_resp->tlc_info); 1644 info->status.status_driver_data[0] = 1645 RS_DRV_DATA_PACK(lq_color, tx_resp->reduced_tpc); 1646 |
1647 ieee80211_tx_status(mvm->hw, skb); | 1647 if (likely(!iwl_mvm_time_sync_frame(mvm, skb, hdr->addr1))) 1648 ieee80211_tx_status(mvm->hw, skb); |
1648 } 1649 1650 /* This is an aggregation queue or might become one, so we use 1651 * the ssn since: ssn = wifi seq_num % 256. 1652 * The seq_ctl is the sequence control of the packet to which 1653 * this Tx response relates. But if there is a hole in the 1654 * bitmap of the BA we received, this Tx response may allow to 1655 * reclaim the hole and all the subsequent packets that were --- 590 unchanged lines hidden --- | 1649 } 1650 1651 /* This is an aggregation queue or might become one, so we use 1652 * the ssn since: ssn = wifi seq_num % 256. 1653 * The seq_ctl is the sequence control of the packet to which 1654 * this Tx response relates. But if there is a hole in the 1655 * bitmap of the BA we received, this Tx response may allow to 1656 * reclaim the hole and all the subsequent packets that were --- 590 unchanged lines hidden --- |