mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 18:37:58 -04:00
Merge tag 'iwlwifi-next-for-kalle-2019-11-20' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
Patches intended for v5.5 * Fix a merge damage that causes issues with high-throuput on AX200+; * Support TX/RX antennas reporting; * Small fix in DVM's BT link-quality code; * Bump supported FW API version to 52; * Yet another scan FW API update; * Some clean-ups;
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
#include "iwl-prph.h"
|
||||
|
||||
/* Highest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MAX 51
|
||||
#define IWL_22000_UCODE_API_MAX 52
|
||||
|
||||
/* Lowest firmware API version supported */
|
||||
#define IWL_22000_UCODE_API_MIN 39
|
||||
|
||||
@@ -171,6 +171,9 @@ void iwl_leds_init(struct iwl_priv *priv)
|
||||
|
||||
priv->led.name = kasprintf(GFP_KERNEL, "%s-led",
|
||||
wiphy_name(priv->hw->wiphy));
|
||||
if (!priv->led.name)
|
||||
return;
|
||||
|
||||
priv->led.brightness_set = iwl_led_brightness_set;
|
||||
priv->led.blink_set = iwl_led_blink_set;
|
||||
priv->led.max_brightness = 1;
|
||||
|
||||
@@ -851,7 +851,7 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
|
||||
* Is there a need to switch between
|
||||
* full concurrency and 3-wire?
|
||||
*/
|
||||
if (priv->bt_ci_compliance && priv->bt_ant_couple_ok)
|
||||
if (priv->bt_ci_compliance)
|
||||
full_concurrent = true;
|
||||
else
|
||||
full_concurrent = false;
|
||||
|
||||
@@ -664,6 +664,9 @@ enum iwl_umac_scan_general_flags2 {
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID: matching on multiple SSIDs
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE: all the channels scanned
|
||||
* as passive
|
||||
* @IWL_UMAC_SCAN_GEN_FLAGS_V2_TRIGGER_UHB_SCAN: at the end of 2.4GHz and
|
||||
* 5.2Ghz bands scan, trigger scan on 6GHz band to discover
|
||||
* the reported collocated APs
|
||||
*/
|
||||
enum iwl_umac_scan_general_flags_v2 {
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC = BIT(0),
|
||||
@@ -678,6 +681,7 @@ enum iwl_umac_scan_general_flags_v2 {
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_NTF_START = BIT(9),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID = BIT(10),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE = BIT(11),
|
||||
IWL_UMAC_SCAN_GEN_FLAGS_V2_TRIGGER_UHB_SCAN = BIT(12),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -893,7 +897,27 @@ struct iwl_scan_probe_params_v3 {
|
||||
struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
|
||||
__le32 short_ssid[SCAN_SHORT_SSID_MAX_SIZE];
|
||||
u8 bssid_array[ETH_ALEN][SCAN_BSSID_MAX_SIZE];
|
||||
} __packed;
|
||||
} __packed; /* SCAN_PROBE_PARAMS_API_S_VER_3 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_probe_params_v4
|
||||
* @preq: scan probe request params
|
||||
* @short_ssid_num: number of valid short SSIDs in short ssid array
|
||||
* @bssid_num: number of valid bssid in bssids array
|
||||
* @reserved: reserved
|
||||
* @direct_scan: list of ssids
|
||||
* @short_ssid: array of short ssids
|
||||
* @bssid_array: array of bssids
|
||||
*/
|
||||
struct iwl_scan_probe_params_v4 {
|
||||
struct iwl_scan_probe_req preq;
|
||||
u8 short_ssid_num;
|
||||
u8 bssid_num;
|
||||
__le16 reserved;
|
||||
struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
|
||||
__le32 short_ssid[SCAN_SHORT_SSID_MAX_SIZE];
|
||||
u8 bssid_array[ETH_ALEN][SCAN_BSSID_MAX_SIZE];
|
||||
} __packed; /* SCAN_PROBE_PARAMS_API_S_VER_4 */
|
||||
|
||||
#define SCAN_MAX_NUM_CHANS_V3 67
|
||||
|
||||
@@ -932,8 +956,8 @@ struct iwl_scan_channel_params_v4 {
|
||||
u8 reserved;
|
||||
struct iwl_scan_channel_cfg_umac channel_config[SCAN_MAX_NUM_CHANS_V3];
|
||||
u8 adwell_ch_override_bitmap[16];
|
||||
} __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_4 */
|
||||
|
||||
} __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_4 also
|
||||
SCAN_CHANNEL_PARAMS_API_S_VER_5 */
|
||||
/**
|
||||
* struct iwl_scan_general_params_v10
|
||||
* @flags: &enum iwl_umac_scan_flags
|
||||
@@ -1014,6 +1038,20 @@ struct iwl_scan_req_params_v12 {
|
||||
struct iwl_scan_probe_params_v3 probe_params;
|
||||
} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_12 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_params_v13
|
||||
* @general_params: &struct iwl_scan_general_params_v10
|
||||
* @channel_params: &struct iwl_scan_channel_params_v4
|
||||
* @periodic_params: &struct iwl_scan_periodic_parms_v1
|
||||
* @probe_params: &struct iwl_scan_probe_params_v4
|
||||
*/
|
||||
struct iwl_scan_req_params_v13 {
|
||||
struct iwl_scan_general_params_v10 general_params;
|
||||
struct iwl_scan_channel_params_v4 channel_params;
|
||||
struct iwl_scan_periodic_parms_v1 periodic_params;
|
||||
struct iwl_scan_probe_params_v4 probe_params;
|
||||
} __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_13 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_umac_v11
|
||||
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
|
||||
@@ -1038,6 +1076,18 @@ struct iwl_scan_req_umac_v12 {
|
||||
struct iwl_scan_req_params_v12 scan_params;
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_12 */
|
||||
|
||||
/**
|
||||
* struct iwl_scan_req_umac_v13
|
||||
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
|
||||
* @ooc_priority: out of channel priority - &enum iwl_scan_priority
|
||||
* @scan_params: scan parameters
|
||||
*/
|
||||
struct iwl_scan_req_umac_v13 {
|
||||
__le32 uid;
|
||||
__le32 ooc_priority;
|
||||
struct iwl_scan_req_params_v13 scan_params;
|
||||
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_13 */
|
||||
|
||||
/**
|
||||
* struct iwl_umac_scan_abort
|
||||
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
|
||||
|
||||
@@ -409,7 +409,6 @@ struct iwl_fw_mon_regs {
|
||||
* @mac_addr_from_csr: read HW address from CSR registers
|
||||
* @features: hw features, any combination of feature_whitelist
|
||||
* @pwr_tx_backoffs: translation table between power limits and backoffs
|
||||
* @max_rx_agg_size: max RX aggregation size of the ADDBA request/response
|
||||
* @max_tx_agg_size: max TX aggregation size of the ADDBA request/response
|
||||
* @max_ht_ampdu_factor: the exponent of the max length of A-MPDU that the
|
||||
* station can receive in HT
|
||||
@@ -481,7 +480,6 @@ struct iwl_cfg {
|
||||
u8 valid_rx_ant;
|
||||
u8 non_shared_ant;
|
||||
u8 nvm_hw_section_num;
|
||||
u8 max_rx_agg_size;
|
||||
u8 max_tx_agg_size;
|
||||
u8 max_ht_ampdu_exponent;
|
||||
u8 max_vht_ampdu_exponent;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2015 Intel Deutschland GmbH
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
* Copyright(c) 2018 - 2019 Intel Corporation
|
||||
*
|
||||
* Contact Information:
|
||||
* Intel Linux Wireless <linuxwifi@intel.com>
|
||||
@@ -21,16 +21,18 @@
|
||||
|
||||
TRACE_EVENT(iwlwifi_dev_tx_tb,
|
||||
TP_PROTO(const struct device *dev, struct sk_buff *skb,
|
||||
u8 *data_src, size_t data_len),
|
||||
TP_ARGS(dev, skb, data_src, data_len),
|
||||
u8 *data_src, dma_addr_t phys, size_t data_len),
|
||||
TP_ARGS(dev, skb, data_src, phys, data_len),
|
||||
TP_STRUCT__entry(
|
||||
DEV_ENTRY
|
||||
__field(u64, phys)
|
||||
|
||||
__dynamic_array(u8, data,
|
||||
iwl_trace_data(skb) ? data_len : 0)
|
||||
),
|
||||
TP_fast_assign(
|
||||
DEV_ASSIGN;
|
||||
__entry->phys = phys;
|
||||
if (iwl_trace_data(skb))
|
||||
memcpy(__get_dynamic_array(data), data_src, data_len);
|
||||
),
|
||||
|
||||
@@ -129,6 +129,9 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm)
|
||||
|
||||
mvm->led.name = kasprintf(GFP_KERNEL, "%s-led",
|
||||
wiphy_name(mvm->hw->wiphy));
|
||||
if (!mvm->led.name)
|
||||
return -ENOMEM;
|
||||
|
||||
mvm->led.brightness_set = iwl_led_brightness_set;
|
||||
mvm->led.max_brightness = 1;
|
||||
|
||||
|
||||
@@ -355,6 +355,15 @@ static const struct wiphy_iftype_ext_capab he_iftypes_ext_capa[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static int
|
||||
iwl_mvm_op_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
|
||||
{
|
||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||
*tx_ant = iwl_mvm_get_valid_tx_ant(mvm);
|
||||
*rx_ant = iwl_mvm_get_valid_rx_ant(mvm);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
{
|
||||
struct ieee80211_hw *hw = mvm->hw;
|
||||
@@ -734,6 +743,9 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
wiphy_ext_feature_set(hw->wiphy,
|
||||
NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER);
|
||||
|
||||
hw->wiphy->available_antennas_tx = iwl_mvm_get_valid_tx_ant(mvm);
|
||||
hw->wiphy->available_antennas_rx = iwl_mvm_get_valid_rx_ant(mvm);
|
||||
|
||||
ret = ieee80211_register_hw(mvm->hw);
|
||||
if (ret) {
|
||||
iwl_mvm_leds_exit(mvm);
|
||||
@@ -5028,6 +5040,7 @@ const struct ieee80211_ops iwl_mvm_hw_ops = {
|
||||
.tx = iwl_mvm_mac_tx,
|
||||
.wake_tx_queue = iwl_mvm_mac_wake_tx_queue,
|
||||
.ampdu_action = iwl_mvm_mac_ampdu_action,
|
||||
.get_antenna = iwl_mvm_op_get_antenna,
|
||||
.start = iwl_mvm_mac_start,
|
||||
.reconfig_complete = iwl_mvm_mac_reconfig_complete,
|
||||
.stop = iwl_mvm_mac_stop,
|
||||
|
||||
@@ -664,10 +664,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
if (!hw)
|
||||
return NULL;
|
||||
|
||||
if (cfg->max_rx_agg_size)
|
||||
hw->max_rx_aggregation_subframes = cfg->max_rx_agg_size;
|
||||
else
|
||||
hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
|
||||
hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
|
||||
|
||||
if (cfg->max_tx_agg_size)
|
||||
hw->max_tx_aggregation_subframes = cfg->max_tx_agg_size;
|
||||
|
||||
@@ -370,8 +370,6 @@ static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm,
|
||||
if (dtimper >= 10)
|
||||
return;
|
||||
|
||||
/* TODO: check that multicast wake lock is off */
|
||||
|
||||
if (host_awake) {
|
||||
if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_LP)
|
||||
return;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* in the file called COPYING.
|
||||
*
|
||||
* Contact Information:
|
||||
* Intel Linux Wireless <ilw@linux.intel.com>
|
||||
* Intel Linux Wireless <linuxwifi@intel.com>
|
||||
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||
*
|
||||
* BSD LICENSE
|
||||
|
||||
@@ -1897,6 +1897,15 @@ iwl_mvm_scan_umac_fill_probe_p_v3(struct iwl_mvm_scan_params *params,
|
||||
iwl_scan_build_ssids(params, pp->direct_scan, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_fill_probe_p_v4(struct iwl_mvm_scan_params *params,
|
||||
struct iwl_scan_probe_params_v4 *pp,
|
||||
u32 *bitmap_ssid)
|
||||
{
|
||||
pp->preq = params->preq;
|
||||
iwl_scan_build_ssids(params, pp->direct_scan, bitmap_ssid);
|
||||
}
|
||||
|
||||
static void
|
||||
iwl_mvm_scan_umac_fill_ch_p_v3(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
@@ -1915,14 +1924,17 @@ static void
|
||||
iwl_mvm_scan_umac_fill_ch_p_v4(struct iwl_mvm *mvm,
|
||||
struct iwl_mvm_scan_params *params,
|
||||
struct ieee80211_vif *vif,
|
||||
struct iwl_scan_channel_params_v4 *cp)
|
||||
struct iwl_scan_channel_params_v4 *cp,
|
||||
u32 channel_cfg_flags)
|
||||
{
|
||||
cp->flags = iwl_mvm_scan_umac_chan_flags_v2(mvm, params, vif);
|
||||
cp->count = params->n_channels;
|
||||
cp->num_of_aps_override = IWL_SCAN_ADWELL_DEFAULT_N_APS_OVERRIDE;
|
||||
|
||||
iwl_mvm_umac_scan_cfg_channels_v4(mvm, params->channels, cp,
|
||||
params->n_channels, 0, vif->type);
|
||||
params->n_channels,
|
||||
channel_cfg_flags,
|
||||
vif->type);
|
||||
}
|
||||
|
||||
static int iwl_mvm_scan_umac_v11(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
@@ -1984,7 +1996,41 @@ static int iwl_mvm_scan_umac_v12(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
iwl_mvm_scan_umac_fill_probe_p_v3(params, &scan_p->probe_params);
|
||||
iwl_mvm_scan_umac_fill_ch_p_v4(mvm, params, vif,
|
||||
&scan_p->channel_params);
|
||||
&scan_p->channel_params, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl_mvm_scan_umac_v13(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
struct iwl_mvm_scan_params *params, int type,
|
||||
int uid)
|
||||
{
|
||||
struct iwl_scan_req_umac_v13 *cmd = mvm->scan_cmd;
|
||||
struct iwl_scan_req_params_v13 *scan_p = &cmd->scan_params;
|
||||
int ret;
|
||||
u16 gen_flags;
|
||||
u32 bitmap_ssid = 0;
|
||||
|
||||
mvm->scan_uid_status[uid] = type;
|
||||
|
||||
cmd->ooc_priority = cpu_to_le32(iwl_mvm_scan_umac_ooc_priority(params));
|
||||
cmd->uid = cpu_to_le32(uid);
|
||||
|
||||
gen_flags = iwl_mvm_scan_umac_flags_v2(mvm, params, vif, type);
|
||||
iwl_mvm_scan_umac_fill_general_p_v10(mvm, params, vif,
|
||||
&scan_p->general_params,
|
||||
gen_flags);
|
||||
|
||||
ret = iwl_mvm_fill_scan_sched_params(params,
|
||||
scan_p->periodic_params.schedule,
|
||||
&scan_p->periodic_params.delay);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
iwl_mvm_scan_umac_fill_probe_p_v4(params, &scan_p->probe_params,
|
||||
&bitmap_ssid);
|
||||
iwl_mvm_scan_umac_fill_ch_p_v4(mvm, params, vif,
|
||||
&scan_p->channel_params, bitmap_ssid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2104,6 +2150,7 @@ struct iwl_scan_umac_handler {
|
||||
|
||||
static const struct iwl_scan_umac_handler iwl_scan_umac_handlers[] = {
|
||||
/* set the newest version first to shorten the list traverse time */
|
||||
IWL_SCAN_UMAC_HANDLER(13),
|
||||
IWL_SCAN_UMAC_HANDLER(12),
|
||||
IWL_SCAN_UMAC_HANDLER(11),
|
||||
};
|
||||
@@ -2462,6 +2509,7 @@ static int iwl_mvm_scan_stop_wait(struct iwl_mvm *mvm, int type)
|
||||
static int iwl_scan_req_umac_get_size(u8 scan_ver)
|
||||
{
|
||||
switch (scan_ver) {
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(13);
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(12);
|
||||
IWL_SCAN_REQ_UMAC_HANDLE_SIZE(11);
|
||||
}
|
||||
|
||||
@@ -646,7 +646,6 @@ void iwl_trans_pcie_free(struct iwl_trans *trans);
|
||||
/*****************************************************
|
||||
* RX
|
||||
******************************************************/
|
||||
int _iwl_pcie_rx_init(struct iwl_trans *trans);
|
||||
int iwl_pcie_rx_init(struct iwl_trans *trans);
|
||||
int iwl_pcie_gen2_rx_init(struct iwl_trans *trans);
|
||||
irqreturn_t iwl_pcie_msix_isr(int irq, void *data);
|
||||
@@ -660,7 +659,6 @@ void iwl_pcie_rx_init_rxb_lists(struct iwl_rxq *rxq);
|
||||
int iwl_pcie_dummy_napi_poll(struct napi_struct *napi, int budget);
|
||||
void iwl_pcie_rxq_alloc_rbs(struct iwl_trans *trans, gfp_t priority,
|
||||
struct iwl_rxq *rxq);
|
||||
int iwl_pcie_rx_alloc(struct iwl_trans *trans);
|
||||
|
||||
/*****************************************************
|
||||
* ICT - interrupt handling
|
||||
|
||||
@@ -322,7 +322,7 @@ static void iwl_pcie_rxmq_restock(struct iwl_trans *trans,
|
||||
WARN_ON(rxb->page_dma & DMA_BIT_MASK(12));
|
||||
/* Point to Rx buffer via next RBD in circular buffer */
|
||||
iwl_pcie_restock_bd(trans, rxq, rxb);
|
||||
rxq->write = (rxq->write + 1) & MQ_RX_TABLE_MASK;
|
||||
rxq->write = (rxq->write + 1) & (rxq->queue_size - 1);
|
||||
rxq->free_count--;
|
||||
}
|
||||
spin_unlock(&rxq->lock);
|
||||
@@ -793,7 +793,7 @@ static int iwl_pcie_alloc_rxq_dma(struct iwl_trans *trans,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
int iwl_pcie_rx_alloc(struct iwl_trans *trans)
|
||||
static int iwl_pcie_rx_alloc(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
struct iwl_rb_allocator *rba = &trans_pcie->rba;
|
||||
@@ -1024,7 +1024,7 @@ int iwl_pcie_dummy_napi_poll(struct napi_struct *napi, int budget)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _iwl_pcie_rx_init(struct iwl_trans *trans)
|
||||
static int _iwl_pcie_rx_init(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
struct iwl_rxq *def_rxq;
|
||||
|
||||
@@ -333,7 +333,8 @@ static int iwl_pcie_gen2_build_amsdu(struct iwl_trans *trans,
|
||||
goto out_err;
|
||||
}
|
||||
iwl_pcie_gen2_set_tb(trans, tfd, tb_phys, tb_len);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, start_hdr, tb_len);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, start_hdr,
|
||||
tb_phys, tb_len);
|
||||
/* add this subframe's headers' length to the tx_cmd */
|
||||
le16_add_cpu(&tx_cmd->len, hdr_page->pos - subf_hdrs_start);
|
||||
|
||||
@@ -351,7 +352,7 @@ static int iwl_pcie_gen2_build_amsdu(struct iwl_trans *trans,
|
||||
}
|
||||
iwl_pcie_gen2_set_tb(trans, tfd, tb_phys, tb_len);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, tso.data,
|
||||
tb_len);
|
||||
tb_phys, tb_len);
|
||||
|
||||
data_left -= tb_len;
|
||||
tso_build_data(skb, &tso, tb_len);
|
||||
@@ -441,9 +442,8 @@ static int iwl_pcie_gen2_tx_add_frags(struct iwl_trans *trans,
|
||||
return -ENOMEM;
|
||||
tb_idx = iwl_pcie_gen2_set_tb(trans, tfd, tb_phys,
|
||||
skb_frag_size(frag));
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb,
|
||||
skb_frag_address(frag),
|
||||
skb_frag_size(frag));
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, skb_frag_address(frag),
|
||||
tb_phys, skb_frag_size(frag));
|
||||
if (tb_idx < 0)
|
||||
return tb_idx;
|
||||
|
||||
@@ -468,6 +468,7 @@ iwl_tfh_tfd *iwl_pcie_gen2_build_tx(struct iwl_trans *trans,
|
||||
dma_addr_t tb_phys;
|
||||
int len, tb1_len, tb2_len;
|
||||
void *tb1_addr;
|
||||
struct sk_buff *frag;
|
||||
|
||||
tb_phys = iwl_pcie_get_first_tb_dma(txq, idx);
|
||||
|
||||
@@ -508,14 +509,25 @@ iwl_tfh_tfd *iwl_pcie_gen2_build_tx(struct iwl_trans *trans,
|
||||
if (unlikely(dma_mapping_error(trans->dev, tb_phys)))
|
||||
goto out_err;
|
||||
iwl_pcie_gen2_set_tb(trans, tfd, tb_phys, tb2_len);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb,
|
||||
skb->data + hdr_len,
|
||||
tb2_len);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, skb->data + hdr_len,
|
||||
tb_phys, tb2_len);
|
||||
}
|
||||
|
||||
if (iwl_pcie_gen2_tx_add_frags(trans, skb, tfd, out_meta))
|
||||
goto out_err;
|
||||
|
||||
skb_walk_frags(skb, frag) {
|
||||
tb_phys = dma_map_single(trans->dev, frag->data,
|
||||
skb_headlen(frag), DMA_TO_DEVICE);
|
||||
if (unlikely(dma_mapping_error(trans->dev, tb_phys)))
|
||||
goto out_err;
|
||||
iwl_pcie_gen2_set_tb(trans, tfd, tb_phys, skb_headlen(frag));
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, frag->data,
|
||||
tb_phys, skb_headlen(frag));
|
||||
if (iwl_pcie_gen2_tx_add_frags(trans, frag, tfd, out_meta))
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
return tfd;
|
||||
|
||||
out_err:
|
||||
|
||||
@@ -2019,9 +2019,8 @@ static int iwl_fill_data_tbs(struct iwl_trans *trans, struct sk_buff *skb,
|
||||
head_tb_len, DMA_TO_DEVICE);
|
||||
if (unlikely(dma_mapping_error(trans->dev, tb_phys)))
|
||||
return -EINVAL;
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb,
|
||||
skb->data + hdr_len,
|
||||
head_tb_len);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, skb->data + hdr_len,
|
||||
tb_phys, head_tb_len);
|
||||
iwl_pcie_txq_build_tfd(trans, txq, tb_phys, head_tb_len, false);
|
||||
}
|
||||
|
||||
@@ -2039,9 +2038,8 @@ static int iwl_fill_data_tbs(struct iwl_trans *trans, struct sk_buff *skb,
|
||||
|
||||
if (unlikely(dma_mapping_error(trans->dev, tb_phys)))
|
||||
return -EINVAL;
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb,
|
||||
skb_frag_address(frag),
|
||||
skb_frag_size(frag));
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, skb_frag_address(frag),
|
||||
tb_phys, skb_frag_size(frag));
|
||||
tb_idx = iwl_pcie_txq_build_tfd(trans, txq, tb_phys,
|
||||
skb_frag_size(frag), false);
|
||||
if (tb_idx < 0)
|
||||
@@ -2222,7 +2220,7 @@ static int iwl_fill_data_tbs_amsdu(struct iwl_trans *trans, struct sk_buff *skb,
|
||||
iwl_pcie_txq_build_tfd(trans, txq, hdr_tb_phys,
|
||||
hdr_tb_len, false);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, start_hdr,
|
||||
hdr_tb_len);
|
||||
hdr_tb_phys, hdr_tb_len);
|
||||
/* add this subframe's headers' length to the tx_cmd */
|
||||
le16_add_cpu(&tx_cmd->len, hdr_page->pos - subf_hdrs_start);
|
||||
|
||||
@@ -2248,7 +2246,7 @@ static int iwl_fill_data_tbs_amsdu(struct iwl_trans *trans, struct sk_buff *skb,
|
||||
iwl_pcie_txq_build_tfd(trans, txq, tb_phys,
|
||||
size, false);
|
||||
trace_iwlwifi_dev_tx_tb(trans->dev, skb, tso.data,
|
||||
size);
|
||||
tb_phys, size);
|
||||
|
||||
data_left -= size;
|
||||
tso_build_data(skb, &tso, size);
|
||||
|
||||
Reference in New Issue
Block a user