Skip to content

Commit ea98667

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Out of bounds access in xfrm IPSEC policy unlink, from Yue Haibing. 2) Missing length check for esp4 UDP encap, from Sabrina Dubroca. 3) Fix byte order of RX STBC access in mac80211, from Johannes Berg. 4) Inifnite loop in bpftool map create, from Alban Crequy. 5) Register mark fix in ebpf verifier after pkt/null checks, from Paul Chaignon. 6) Properly use rcu_dereference_sk_user_data in L2TP code, from Eric Dumazet. 7) Buffer overrun in marvell phy driver, from Andrew Lunn. 8) Several crash and statistics handling fixes to bnxt_en driver, from Michael Chan and Vasundhara Volam. 9) Several fixes to the TLS layer from Jakub Kicinski (copying negative amounts of data in reencrypt, reencrypt frag copying, blind nskb->sk NULL deref, etc). 10) Several UDP GRO fixes, from Paolo Abeni and Eric Dumazet. 11) PID/UID checks on ipv6 flow labels are inverted, from Willem de Bruijn. 12) Use after free in l2tp, from Eric Dumazet. 13) IPV6 route destroy races, also from Eric Dumazet. 14) SCTP state machine can erroneously run recursively, fix from Xin Long. 15) Adjust AF_PACKET msg_name length checks, add padding bytes if necessary. From Willem de Bruijn. 16) Preserve skb_iif, so that forwarded packets have consistent values even if fragmentation is involved. From Shmulik Ladkani. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits) udp: fix GRO packet of death ipv6: A few fixes on dereferencing rt->from rds: ib: force endiannes annotation selftests: fib_rule_tests: print the result and return 1 if any tests failed ipv4: ip_do_fragment: Preserve skb_iif during fragmentation net/tls: avoid NULL pointer deref on nskb->sk in fallback selftests: fib_rule_tests: Fix icmp proto with ipv6 packet: validate msg_namelen in send directly packet: in recvmsg msg_name return at least sizeof sockaddr_ll sctp: avoid running the sctp state machine recursively stmmac: pci: Fix typo in IOT2000 comment Documentation: fix netdev-FAQ.rst markup warning ipv6: fix races in ip6_dst_destroy() l2ip: fix possible use-after-free appletalk: Set error code if register_snap_client failed net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc rxrpc: Fix net namespace cleanup ipv6/flowlabel: wait rcu grace period before put_pid() vrf: Use orig netdev to count Ip6InNoRoutes and a fresh route lookup when sending dest unreach tcp: add sanity tests in tcp_add_backlog() ...
2 parents 5ce3307 + 4dd2b82 commit ea98667

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+544
-289
lines changed

Documentation/networking/ip-sysctl.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,7 @@ tag - INTEGER
13371337
Default value is 0.
13381338

13391339
xfrm4_gc_thresh - INTEGER
1340+
(Obsolete since linux-4.14)
13401341
The threshold at which we will start garbage collecting for IPv4
13411342
destination cache entries. At twice this value the system will
13421343
refuse new allocations.
@@ -1920,6 +1921,7 @@ echo_ignore_all - BOOLEAN
19201921
Default: 0
19211922

19221923
xfrm6_gc_thresh - INTEGER
1924+
(Obsolete since linux-4.14)
19231925
The threshold at which we will start garbage collecting for IPv6
19241926
destination cache entries. At twice this value the system will
19251927
refuse new allocations.

Documentation/networking/netdev-FAQ.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ version that should be applied. If there is any doubt, the maintainer
132132
will reply and ask what should be done.
133133

134134
Q: I made changes to only a few patches in a patch series should I resend only those changed?
135-
--------------------------------------------------------------------------------------------
135+
---------------------------------------------------------------------------------------------
136136
A: No, please resend the entire patch series and make sure you do number your
137137
patches such that it is clear this is the latest and greatest set of patches
138138
that can be applied.

arch/mips/net/ebpf_jit.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,9 @@ enum which_ebpf_reg {
186186
* separate frame pointer, so BPF_REG_10 relative accesses are
187187
* adjusted to be $sp relative.
188188
*/
189-
int ebpf_to_mips_reg(struct jit_ctx *ctx, const struct bpf_insn *insn,
190-
enum which_ebpf_reg w)
189+
static int ebpf_to_mips_reg(struct jit_ctx *ctx,
190+
const struct bpf_insn *insn,
191+
enum which_ebpf_reg w)
191192
{
192193
int ebpf_reg = (w == src_reg || w == src_reg_no_fp) ?
193194
insn->src_reg : insn->dst_reg;

drivers/net/dsa/bcm_sf2_cfp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,9 @@ static int bcm_sf2_cfp_rule_set(struct dsa_switch *ds, int port,
886886
fs->m_ext.data[1]))
887887
return -EINVAL;
888888

889+
if (fs->location != RX_CLS_LOC_ANY && fs->location >= CFP_NUM_RULES)
890+
return -EINVAL;
891+
889892
if (fs->location != RX_CLS_LOC_ANY &&
890893
test_bit(fs->location, priv->cfp.used))
891894
return -EBUSY;
@@ -974,6 +977,9 @@ static int bcm_sf2_cfp_rule_del(struct bcm_sf2_priv *priv, int port, u32 loc)
974977
struct cfp_rule *rule;
975978
int ret;
976979

980+
if (loc >= CFP_NUM_RULES)
981+
return -EINVAL;
982+
977983
/* Refuse deleting unused rules, and those that are not unique since
978984
* that could leave IPv6 rules with one of the chained rule in the
979985
* table.

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
16251625
netdev_warn(bp->dev, "RX buffer error %x\n", rx_err);
16261626
bnxt_sched_reset(bp, rxr);
16271627
}
1628-
goto next_rx;
1628+
goto next_rx_no_len;
16291629
}
16301630

16311631
len = le32_to_cpu(rxcmp->rx_cmp_len_flags_type) >> RX_CMP_LEN_SHIFT;
@@ -1706,12 +1706,13 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
17061706
rc = 1;
17071707

17081708
next_rx:
1709-
rxr->rx_prod = NEXT_RX(prod);
1710-
rxr->rx_next_cons = NEXT_RX(cons);
1711-
17121709
cpr->rx_packets += 1;
17131710
cpr->rx_bytes += len;
17141711

1712+
next_rx_no_len:
1713+
rxr->rx_prod = NEXT_RX(prod);
1714+
rxr->rx_next_cons = NEXT_RX(cons);
1715+
17151716
next_rx_no_prod_no_len:
17161717
*raw_cons = tmp_raw_cons;
17171718

@@ -5135,10 +5136,10 @@ static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path)
51355136
for (i = 0; i < bp->tx_nr_rings; i++) {
51365137
struct bnxt_tx_ring_info *txr = &bp->tx_ring[i];
51375138
struct bnxt_ring_struct *ring = &txr->tx_ring_struct;
5138-
u32 cmpl_ring_id;
51395139

5140-
cmpl_ring_id = bnxt_cp_ring_for_tx(bp, txr);
51415140
if (ring->fw_ring_id != INVALID_HW_RING_ID) {
5141+
u32 cmpl_ring_id = bnxt_cp_ring_for_tx(bp, txr);
5142+
51425143
hwrm_ring_free_send_msg(bp, ring,
51435144
RING_FREE_REQ_RING_TYPE_TX,
51445145
close_path ? cmpl_ring_id :
@@ -5151,10 +5152,10 @@ static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path)
51515152
struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i];
51525153
struct bnxt_ring_struct *ring = &rxr->rx_ring_struct;
51535154
u32 grp_idx = rxr->bnapi->index;
5154-
u32 cmpl_ring_id;
51555155

5156-
cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
51575156
if (ring->fw_ring_id != INVALID_HW_RING_ID) {
5157+
u32 cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
5158+
51585159
hwrm_ring_free_send_msg(bp, ring,
51595160
RING_FREE_REQ_RING_TYPE_RX,
51605161
close_path ? cmpl_ring_id :
@@ -5173,10 +5174,10 @@ static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path)
51735174
struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i];
51745175
struct bnxt_ring_struct *ring = &rxr->rx_agg_ring_struct;
51755176
u32 grp_idx = rxr->bnapi->index;
5176-
u32 cmpl_ring_id;
51775177

5178-
cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
51795178
if (ring->fw_ring_id != INVALID_HW_RING_ID) {
5179+
u32 cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
5180+
51805181
hwrm_ring_free_send_msg(bp, ring, type,
51815182
close_path ? cmpl_ring_id :
51825183
INVALID_HW_RING_ID);
@@ -5315,17 +5316,16 @@ __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req,
53155316
req->num_tx_rings = cpu_to_le16(tx_rings);
53165317
if (BNXT_NEW_RM(bp)) {
53175318
enables |= rx_rings ? FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS : 0;
5319+
enables |= stats ? FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
53185320
if (bp->flags & BNXT_FLAG_CHIP_P5) {
53195321
enables |= cp_rings ? FUNC_CFG_REQ_ENABLES_NUM_MSIX : 0;
53205322
enables |= tx_rings + ring_grps ?
5321-
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5322-
FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5323+
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53235324
enables |= rx_rings ?
53245325
FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
53255326
} else {
53265327
enables |= cp_rings ?
5327-
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5328-
FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5328+
FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53295329
enables |= ring_grps ?
53305330
FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS |
53315331
FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
@@ -5365,14 +5365,13 @@ __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp,
53655365
enables |= tx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_TX_RINGS : 0;
53665366
enables |= rx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_RX_RINGS |
53675367
FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
5368+
enables |= stats ? FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
53685369
if (bp->flags & BNXT_FLAG_CHIP_P5) {
53695370
enables |= tx_rings + ring_grps ?
5370-
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5371-
FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5371+
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53725372
} else {
53735373
enables |= cp_rings ?
5374-
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
5375-
FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
5374+
FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
53765375
enables |= ring_grps ?
53775376
FUNC_VF_CFG_REQ_ENABLES_NUM_HW_RING_GRPS : 0;
53785377
}
@@ -6753,6 +6752,7 @@ static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp)
67536752
struct hwrm_queue_pri2cos_qcfg_input req2 = {0};
67546753
struct hwrm_port_qstats_ext_input req = {0};
67556754
struct bnxt_pf_info *pf = &bp->pf;
6755+
u32 tx_stat_size;
67566756
int rc;
67576757

67586758
if (!(bp->flags & BNXT_FLAG_PORT_STATS_EXT))
@@ -6762,13 +6762,16 @@ static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp)
67626762
req.port_id = cpu_to_le16(pf->port_id);
67636763
req.rx_stat_size = cpu_to_le16(sizeof(struct rx_port_stats_ext));
67646764
req.rx_stat_host_addr = cpu_to_le64(bp->hw_rx_port_stats_ext_map);
6765-
req.tx_stat_size = cpu_to_le16(sizeof(struct tx_port_stats_ext));
6765+
tx_stat_size = bp->hw_tx_port_stats_ext ?
6766+
sizeof(*bp->hw_tx_port_stats_ext) : 0;
6767+
req.tx_stat_size = cpu_to_le16(tx_stat_size);
67666768
req.tx_stat_host_addr = cpu_to_le64(bp->hw_tx_port_stats_ext_map);
67676769
mutex_lock(&bp->hwrm_cmd_lock);
67686770
rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
67696771
if (!rc) {
67706772
bp->fw_rx_stats_ext_size = le16_to_cpu(resp->rx_stat_size) / 8;
6771-
bp->fw_tx_stats_ext_size = le16_to_cpu(resp->tx_stat_size) / 8;
6773+
bp->fw_tx_stats_ext_size = tx_stat_size ?
6774+
le16_to_cpu(resp->tx_stat_size) / 8 : 0;
67726775
} else {
67736776
bp->fw_rx_stats_ext_size = 0;
67746777
bp->fw_tx_stats_ext_size = 0;
@@ -8961,8 +8964,15 @@ static int bnxt_cfg_rx_mode(struct bnxt *bp)
89618964

89628965
skip_uc:
89638966
rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0);
8967+
if (rc && vnic->mc_list_count) {
8968+
netdev_info(bp->dev, "Failed setting MC filters rc: %d, turning on ALL_MCAST mode\n",
8969+
rc);
8970+
vnic->rx_mask |= CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST;
8971+
vnic->mc_list_count = 0;
8972+
rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0);
8973+
}
89648974
if (rc)
8965-
netdev_err(bp->dev, "HWRM cfa l2 rx mask failure rc: %x\n",
8975+
netdev_err(bp->dev, "HWRM cfa l2 rx mask failure rc: %d\n",
89668976
rc);
89678977

89688978
return rc;
@@ -10685,6 +10695,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1068510695
bnxt_clear_int_mode(bp);
1068610696

1068710697
init_err_pci_clean:
10698+
bnxt_free_hwrm_short_cmd_req(bp);
1068810699
bnxt_free_hwrm_resources(bp);
1068910700
bnxt_free_ctx_mem(bp);
1069010701
kfree(bp->ctx);

drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ static int stm32mp1_parse_data(struct stm32_dwmac *dwmac,
333333
*/
334334
dwmac->irq_pwr_wakeup = platform_get_irq_byname(pdev,
335335
"stm32_pwr_wakeup");
336+
if (dwmac->irq_pwr_wakeup == -EPROBE_DEFER)
337+
return -EPROBE_DEFER;
338+
336339
if (!dwmac->clk_eth_ck && dwmac->irq_pwr_wakeup >= 0) {
337340
err = device_init_wakeup(&pdev->dev, true);
338341
if (err) {

drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static const struct dmi_system_id quark_pci_dmi[] = {
160160
.driver_data = (void *)&galileo_stmmac_dmi_data,
161161
},
162162
/*
163-
* There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.
163+
* There are 2 types of SIMATIC IOT2000: IOT2020 and IOT2040.
164164
* The asset tag "6ES7647-0AA00-0YA2" is only for IOT2020 which
165165
* has only one pci network device while other asset tags are
166166
* for IOT2040 which has two.

drivers/net/ieee802154/mcr20a.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,18 +533,24 @@ mcr20a_start(struct ieee802154_hw *hw)
533533
dev_dbg(printdev(lp), "no slotted operation\n");
534534
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL1,
535535
DAR_PHY_CTRL1_SLOTTED, 0x0);
536+
if (ret < 0)
537+
return ret;
536538

537539
/* enable irq */
538540
enable_irq(lp->spi->irq);
539541

540542
/* Unmask SEQ interrupt */
541543
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL2,
542544
DAR_PHY_CTRL2_SEQMSK, 0x0);
545+
if (ret < 0)
546+
return ret;
543547

544548
/* Start the RX sequence */
545549
dev_dbg(printdev(lp), "start the RX sequence\n");
546550
ret = regmap_update_bits(lp->regmap_dar, DAR_PHY_CTRL1,
547551
DAR_PHY_CTRL1_XCVSEQ_MASK, MCR20A_XCVSEQ_RX);
552+
if (ret < 0)
553+
return ret;
548554

549555
return 0;
550556
}

drivers/net/phy/marvell.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,9 +1489,10 @@ static int marvell_get_sset_count(struct phy_device *phydev)
14891489

14901490
static void marvell_get_strings(struct phy_device *phydev, u8 *data)
14911491
{
1492+
int count = marvell_get_sset_count(phydev);
14921493
int i;
14931494

1494-
for (i = 0; i < ARRAY_SIZE(marvell_hw_stats); i++) {
1495+
for (i = 0; i < count; i++) {
14951496
strlcpy(data + i * ETH_GSTRING_LEN,
14961497
marvell_hw_stats[i].string, ETH_GSTRING_LEN);
14971498
}
@@ -1519,9 +1520,10 @@ static u64 marvell_get_stat(struct phy_device *phydev, int i)
15191520
static void marvell_get_stats(struct phy_device *phydev,
15201521
struct ethtool_stats *stats, u64 *data)
15211522
{
1523+
int count = marvell_get_sset_count(phydev);
15221524
int i;
15231525

1524-
for (i = 0; i < ARRAY_SIZE(marvell_hw_stats); i++)
1526+
for (i = 0; i < count; i++)
15251527
data[i] = marvell_get_stat(phydev, i);
15261528
}
15271529

drivers/net/usb/qmi_wwan.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,9 +1122,16 @@ static const struct usb_device_id products[] = {
11221122
{QMI_FIXED_INTF(0x0846, 0x68d3, 8)}, /* Netgear Aircard 779S */
11231123
{QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */
11241124
{QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */
1125+
{QMI_FIXED_INTF(0x1435, 0x0918, 3)}, /* Wistron NeWeb D16Q1 */
1126+
{QMI_FIXED_INTF(0x1435, 0x0918, 4)}, /* Wistron NeWeb D16Q1 */
1127+
{QMI_FIXED_INTF(0x1435, 0x0918, 5)}, /* Wistron NeWeb D16Q1 */
1128+
{QMI_FIXED_INTF(0x1435, 0x3185, 4)}, /* Wistron NeWeb M18Q5 */
1129+
{QMI_FIXED_INTF(0x1435, 0xd111, 4)}, /* M9615A DM11-1 D51QC */
11251130
{QMI_FIXED_INTF(0x1435, 0xd181, 3)}, /* Wistron NeWeb D18Q1 */
11261131
{QMI_FIXED_INTF(0x1435, 0xd181, 4)}, /* Wistron NeWeb D18Q1 */
11271132
{QMI_FIXED_INTF(0x1435, 0xd181, 5)}, /* Wistron NeWeb D18Q1 */
1133+
{QMI_FIXED_INTF(0x1435, 0xd182, 4)}, /* Wistron NeWeb D18 */
1134+
{QMI_FIXED_INTF(0x1435, 0xd182, 5)}, /* Wistron NeWeb D18 */
11281135
{QMI_FIXED_INTF(0x1435, 0xd191, 4)}, /* Wistron NeWeb D19Q1 */
11291136
{QMI_QUIRK_SET_DTR(0x1508, 0x1001, 4)}, /* Fibocom NL668 series */
11301137
{QMI_FIXED_INTF(0x16d8, 0x6003, 0)}, /* CMOTech 6003 */
@@ -1180,6 +1187,7 @@ static const struct usb_device_id products[] = {
11801187
{QMI_FIXED_INTF(0x19d2, 0x0265, 4)}, /* ONDA MT8205 4G LTE */
11811188
{QMI_FIXED_INTF(0x19d2, 0x0284, 4)}, /* ZTE MF880 */
11821189
{QMI_FIXED_INTF(0x19d2, 0x0326, 4)}, /* ZTE MF821D */
1190+
{QMI_FIXED_INTF(0x19d2, 0x0396, 3)}, /* ZTE ZM8620 */
11831191
{QMI_FIXED_INTF(0x19d2, 0x0412, 4)}, /* Telewell TW-LTE 4G */
11841192
{QMI_FIXED_INTF(0x19d2, 0x1008, 4)}, /* ZTE (Vodafone) K3570-Z */
11851193
{QMI_FIXED_INTF(0x19d2, 0x1010, 4)}, /* ZTE (Vodafone) K3571-Z */
@@ -1200,7 +1208,9 @@ static const struct usb_device_id products[] = {
12001208
{QMI_FIXED_INTF(0x19d2, 0x1425, 2)},
12011209
{QMI_FIXED_INTF(0x19d2, 0x1426, 2)}, /* ZTE MF91 */
12021210
{QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
1211+
{QMI_FIXED_INTF(0x19d2, 0x1432, 3)}, /* ZTE ME3620 */
12031212
{QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */
1213+
{QMI_FIXED_INTF(0x2001, 0x7e16, 3)}, /* D-Link DWM-221 */
12041214
{QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */
12051215
{QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */
12061216
{QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */

drivers/net/wireless/ath/ath10k/ce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1855,7 +1855,7 @@ void ath10k_ce_dump_registers(struct ath10k *ar,
18551855
struct ath10k_ce_crash_data ce_data;
18561856
u32 addr, id;
18571857

1858-
lockdep_assert_held(&ar->data_lock);
1858+
lockdep_assert_held(&ar->dump_mutex);
18591859

18601860
ath10k_err(ar, "Copy Engine register dump:\n");
18611861

drivers/net/wireless/ath/ath10k/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,6 +3119,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,
31193119
goto err_free_wq;
31203120

31213121
mutex_init(&ar->conf_mutex);
3122+
mutex_init(&ar->dump_mutex);
31223123
spin_lock_init(&ar->data_lock);
31233124

31243125
INIT_LIST_HEAD(&ar->peers);

drivers/net/wireless/ath/ath10k/core.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,9 @@ struct ath10k {
10631063
/* prevents concurrent FW reconfiguration */
10641064
struct mutex conf_mutex;
10651065

1066+
/* protects coredump data */
1067+
struct mutex dump_mutex;
1068+
10661069
/* protects shared structure data */
10671070
spinlock_t data_lock;
10681071

drivers/net/wireless/ath/ath10k/coredump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ struct ath10k_fw_crash_data *ath10k_coredump_new(struct ath10k *ar)
11021102
{
11031103
struct ath10k_fw_crash_data *crash_data = ar->coredump.fw_crash_data;
11041104

1105-
lockdep_assert_held(&ar->data_lock);
1105+
lockdep_assert_held(&ar->dump_mutex);
11061106

11071107
if (ath10k_coredump_mask == 0)
11081108
/* coredump disabled */
@@ -1146,7 +1146,7 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar)
11461146
if (!buf)
11471147
return NULL;
11481148

1149-
spin_lock_bh(&ar->data_lock);
1149+
mutex_lock(&ar->dump_mutex);
11501150

11511151
dump_data = (struct ath10k_dump_file_data *)(buf);
11521152
strlcpy(dump_data->df_magic, "ATH10K-FW-DUMP",
@@ -1213,7 +1213,7 @@ static struct ath10k_dump_file_data *ath10k_coredump_build(struct ath10k *ar)
12131213
sofar += sizeof(*dump_tlv) + crash_data->ramdump_buf_len;
12141214
}
12151215

1216-
spin_unlock_bh(&ar->data_lock);
1216+
mutex_unlock(&ar->dump_mutex);
12171217

12181218
return dump_data;
12191219
}

drivers/net/wireless/ath/ath10k/mac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5774,7 +5774,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
57745774
}
57755775

57765776
if (changed & BSS_CHANGED_MCAST_RATE &&
5777-
!WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
5777+
!ath10k_mac_vif_chan(arvif->vif, &def)) {
57785778
band = def.chan->band;
57795779
rateidx = vif->bss_conf.mcast_rate[band] - 1;
57805780

@@ -5812,7 +5812,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
58125812
}
58135813

58145814
if (changed & BSS_CHANGED_BASIC_RATES) {
5815-
if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) {
5815+
if (ath10k_mac_vif_chan(vif, &def)) {
58165816
mutex_unlock(&ar->conf_mutex);
58175817
return;
58185818
}

0 commit comments

Comments
 (0)