Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three trivial overlapping conflicts. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -207,7 +207,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
|
||||
#define IWL_DEVICE_AX210 \
|
||||
IWL_DEVICE_AX200_COMMON, \
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210, \
|
||||
.base_params = &iwl_22000_base_params, \
|
||||
.base_params = &iwl_22560_base_params, \
|
||||
.csr = &iwl_csr_v1, \
|
||||
.min_txq_size = 128, \
|
||||
.gp2_reg_addr = 0xd02c68, \
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
|
||||
* Copyright(c) 2018 Intel Corporation
|
||||
* Copyright(c) 2018 - 2019 Intel Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
@@ -136,6 +136,7 @@ const struct iwl_cfg iwl5350_agn_cfg = {
|
||||
.ht_params = &iwl5000_ht_params,
|
||||
.led_mode = IWL_LED_BLINK,
|
||||
.internal_wimax_coex = true,
|
||||
.csr = &iwl_csr_v1,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_5150 \
|
||||
|
@@ -93,7 +93,7 @@ struct iwl_ucode_header {
|
||||
} u;
|
||||
};
|
||||
|
||||
#define IWL_UCODE_INI_TLV_GROUP BIT(24)
|
||||
#define IWL_UCODE_INI_TLV_GROUP 0x1000000
|
||||
|
||||
/*
|
||||
* new TLV uCode file layout
|
||||
@@ -148,11 +148,14 @@ enum iwl_ucode_tlv_type {
|
||||
IWL_UCODE_TLV_UMAC_DEBUG_ADDRS = 54,
|
||||
IWL_UCODE_TLV_LMAC_DEBUG_ADDRS = 55,
|
||||
IWL_UCODE_TLV_FW_RECOVERY_INFO = 57,
|
||||
IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION = IWL_UCODE_INI_TLV_GROUP | 0x1,
|
||||
IWL_UCODE_TLV_TYPE_HCMD = IWL_UCODE_INI_TLV_GROUP | 0x2,
|
||||
IWL_UCODE_TLV_TYPE_REGIONS = IWL_UCODE_INI_TLV_GROUP | 0x3,
|
||||
IWL_UCODE_TLV_TYPE_TRIGGERS = IWL_UCODE_INI_TLV_GROUP | 0x4,
|
||||
IWL_UCODE_TLV_TYPE_DEBUG_FLOW = IWL_UCODE_INI_TLV_GROUP | 0x5,
|
||||
|
||||
IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION = IWL_UCODE_INI_TLV_GROUP + 0x1,
|
||||
IWL_UCODE_TLV_DEBUG_BASE = IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION,
|
||||
IWL_UCODE_TLV_TYPE_HCMD = IWL_UCODE_INI_TLV_GROUP + 0x2,
|
||||
IWL_UCODE_TLV_TYPE_REGIONS = IWL_UCODE_INI_TLV_GROUP + 0x3,
|
||||
IWL_UCODE_TLV_TYPE_TRIGGERS = IWL_UCODE_INI_TLV_GROUP + 0x4,
|
||||
IWL_UCODE_TLV_TYPE_DEBUG_FLOW = IWL_UCODE_INI_TLV_GROUP + 0x5,
|
||||
IWL_UCODE_TLV_DEBUG_MAX = IWL_UCODE_TLV_TYPE_DEBUG_FLOW,
|
||||
|
||||
/* TLVs 0x1000-0x2000 are for internal driver usage */
|
||||
IWL_UCODE_TLV_FW_DBG_DUMP_LST = 0x1000,
|
||||
|
@@ -129,7 +129,8 @@ void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data,
|
||||
len -= ALIGN(tlv_len, 4);
|
||||
data += sizeof(*tlv) + ALIGN(tlv_len, 4);
|
||||
|
||||
if (!(tlv_type & IWL_UCODE_INI_TLV_GROUP))
|
||||
if (tlv_type < IWL_UCODE_TLV_DEBUG_BASE ||
|
||||
tlv_type > IWL_UCODE_TLV_DEBUG_MAX)
|
||||
continue;
|
||||
|
||||
hdr = (void *)&tlv->data[0];
|
||||
|
@@ -773,6 +773,11 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
return;
|
||||
|
||||
mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir);
|
||||
if (IS_ERR_OR_NULL(mvmvif->dbgfs_dir)) {
|
||||
IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n",
|
||||
dbgfs_dir);
|
||||
return;
|
||||
}
|
||||
|
||||
if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM &&
|
||||
((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) ||
|
||||
|
@@ -1121,7 +1121,9 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
||||
ret = iwl_mvm_load_rt_fw(mvm);
|
||||
if (ret) {
|
||||
IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret);
|
||||
iwl_fw_dbg_error_collect(&mvm->fwrt, FW_DBG_TRIGGER_DRIVER);
|
||||
if (ret != -ERFKILL)
|
||||
iwl_fw_dbg_error_collect(&mvm->fwrt,
|
||||
FW_DBG_TRIGGER_DRIVER);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@@ -834,7 +834,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
mutex_lock(&mvm->mutex);
|
||||
iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE);
|
||||
err = iwl_run_init_mvm_ucode(mvm, true);
|
||||
if (err)
|
||||
if (err && err != -ERFKILL)
|
||||
iwl_fw_dbg_error_collect(&mvm->fwrt, FW_DBG_TRIGGER_DRIVER);
|
||||
if (!iwlmvm_mod_params.init_dbg || !err)
|
||||
iwl_mvm_stop_device(mvm);
|
||||
|
@@ -169,9 +169,9 @@ static inline int iwl_mvm_check_pn(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
}
|
||||
|
||||
/* iwl_mvm_create_skb Adds the rxb to a new skb */
|
||||
static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,
|
||||
u16 len, u8 crypt_len,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
static int iwl_mvm_create_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
|
||||
struct ieee80211_hdr *hdr, u16 len, u8 crypt_len,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
{
|
||||
struct iwl_rx_packet *pkt = rxb_addr(rxb);
|
||||
struct iwl_rx_mpdu_desc *desc = (void *)pkt->data;
|
||||
@@ -204,6 +204,20 @@ static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,
|
||||
* present before copying packet data.
|
||||
*/
|
||||
hdrlen += crypt_len;
|
||||
|
||||
if (WARN_ONCE(headlen < hdrlen,
|
||||
"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n",
|
||||
hdrlen, len, crypt_len)) {
|
||||
/*
|
||||
* We warn and trace because we want to be able to see
|
||||
* it in trace-cmd as well.
|
||||
*/
|
||||
IWL_DEBUG_RX(mvm,
|
||||
"invalid packet lengths (hdrlen=%d, len=%d, crypt_len=%d)\n",
|
||||
hdrlen, len, crypt_len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
skb_put_data(skb, hdr, hdrlen);
|
||||
skb_put_data(skb, (u8 *)hdr + hdrlen + pad_len, headlen - hdrlen);
|
||||
|
||||
@@ -216,6 +230,8 @@ static void iwl_mvm_create_skb(struct sk_buff *skb, struct ieee80211_hdr *hdr,
|
||||
skb_add_rx_frag(skb, 0, rxb_steal_page(rxb), offset,
|
||||
fraglen, rxb->truesize);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void iwl_mvm_add_rtap_sniffer_config(struct iwl_mvm *mvm,
|
||||
@@ -1671,7 +1687,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
|
||||
rx_status->boottime_ns = ktime_get_boot_ns();
|
||||
}
|
||||
|
||||
iwl_mvm_create_skb(skb, hdr, len, crypt_len, rxb);
|
||||
if (iwl_mvm_create_skb(mvm, skb, hdr, len, crypt_len, rxb)) {
|
||||
kfree_skb(skb);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!iwl_mvm_reorder(mvm, napi, queue, sta, skb, desc))
|
||||
iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue,
|
||||
sta, csi);
|
||||
|
@@ -3654,20 +3654,27 @@ out_no_pci:
|
||||
|
||||
void iwl_trans_pcie_sync_nmi(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
unsigned long timeout = jiffies + IWL_TRANS_NMI_TIMEOUT;
|
||||
u32 inta_addr, sw_err_bit;
|
||||
|
||||
if (trans_pcie->msix_enabled) {
|
||||
inta_addr = CSR_MSIX_HW_INT_CAUSES_AD;
|
||||
sw_err_bit = MSIX_HW_INT_CAUSES_REG_SW_ERR;
|
||||
} else {
|
||||
inta_addr = CSR_INT;
|
||||
sw_err_bit = CSR_INT_BIT_SW_ERR;
|
||||
}
|
||||
|
||||
iwl_disable_interrupts(trans);
|
||||
iwl_force_nmi(trans);
|
||||
while (time_after(timeout, jiffies)) {
|
||||
u32 inta_hw = iwl_read32(trans,
|
||||
CSR_MSIX_HW_INT_CAUSES_AD);
|
||||
u32 inta_hw = iwl_read32(trans, inta_addr);
|
||||
|
||||
/* Error detected by uCode */
|
||||
if (inta_hw & MSIX_HW_INT_CAUSES_REG_SW_ERR) {
|
||||
if (inta_hw & sw_err_bit) {
|
||||
/* Clear causes register */
|
||||
iwl_write32(trans, CSR_MSIX_HW_INT_CAUSES_AD,
|
||||
inta_hw &
|
||||
MSIX_HW_INT_CAUSES_REG_SW_ERR);
|
||||
iwl_write32(trans, inta_addr, inta_hw & sw_err_bit);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user