Skip to content

Commit 82bc2e4

Browse files
committed
Merge tag 'wireless-drivers-next-2020-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for v5.6 Second set of patches for v5.6. Nothing special standing out, smaller new features and fixes allover. Major changes: ar5523 * add support for SMCWUSBT-G2 USB device iwlwifi * support new versions of the FTM FW APIs * support new version of the beacon template FW API * print some extra information when the driver is loaded rtw88 * support wowlan feature for 8822c * add support for WIPHY_WOWLAN_NET_DETECT brcmfmac * add initial support for monitor mode qtnfmac * add module parameter to enable DFS offloading in firmware * add support for STA HE rates * add support for TWT responder and spatial reuse ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents c4c57b9 + 2a13513 commit 82bc2e4

Some content is hidden

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

136 files changed

+3495
-1410
lines changed

Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Optional properties:
5050
entry in clock-names.
5151
- clock-names: Should contain the clock names "wifi_wcss_cmd", "wifi_wcss_ref",
5252
"wifi_wcss_rtc" for "qcom,ipq4019-wifi" compatible target and
53-
"cxo_ref_clk_pin" for "qcom,wcn3990-wifi"
53+
"cxo_ref_clk_pin" and optionally "qdss" for "qcom,wcn3990-wifi"
5454
compatible target.
5555
- qcom,msi_addr: MSI interrupt address.
5656
- qcom,msi_base: Base value to add before writing MSI data into
@@ -88,6 +88,9 @@ Optional properties:
8888
of the host capability QMI request
8989
- qcom,xo-cal-data: xo cal offset to be configured in xo trim register.
9090

91+
- qcom,msa-fixed-perm: Boolean context flag to disable SCM call for statically
92+
mapped msa region.
93+
9194
Example (to supply PCI based wifi block details):
9295

9396
In this example, the node is defined as child node of the PCI controller.
@@ -185,4 +188,5 @@ wifi@18000000 {
185188
vdd-3.3-ch0-supply = <&vreg_l25a_3p3>;
186189
memory-region = <&wifi_msa_mem>;
187190
iommus = <&apps_smmu 0x0040 0x1>;
191+
qcom,msa-fixed-perm;
188192
};

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9961,7 +9961,6 @@ F: drivers/net/ethernet/marvell/mvneta.*
99619961

99629962
MARVELL MWIFIEX WIRELESS DRIVER
99639963
M: Amitkumar Karwar <[email protected]>
9964-
M: Nishant Sarmukadam <[email protected]>
99659964
M: Ganapathi Bhat <[email protected]>
99669965
M: Xinming Hu <[email protected]>
99679966

drivers/net/wireless/ath/ar5523/ar5523.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static void ar5523_read_reply(struct ar5523 *ar, struct ar5523_cmd_hdr *hdr,
7474

7575
if (cmd->odata) {
7676
if (cmd->olen < olen) {
77-
ar5523_err(ar, "olen to small %d < %d\n",
77+
ar5523_err(ar, "olen too small %d < %d\n",
7878
cmd->olen, olen);
7979
cmd->olen = 0;
8080
cmd->res = -EOVERFLOW;
@@ -1770,6 +1770,8 @@ static const struct usb_device_id ar5523_id_table[] = {
17701770
AR5523_DEVICE_UX(0x0846, 0x4300), /* Netgear / WG111U */
17711771
AR5523_DEVICE_UG(0x0846, 0x4250), /* Netgear / WG111T */
17721772
AR5523_DEVICE_UG(0x0846, 0x5f00), /* Netgear / WPN111 */
1773+
AR5523_DEVICE_UG(0x083a, 0x4506), /* SMC / EZ Connect
1774+
SMCWUSBT-G2 */
17731775
AR5523_DEVICE_UG(0x157e, 0x3006), /* Umedia / AR5523_1 */
17741776
AR5523_DEVICE_UX(0x157e, 0x3205), /* Umedia / AR5523_2 */
17751777
AR5523_DEVICE_UG(0x157e, 0x3006), /* Umedia / TEW444UBEU */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,7 @@ static bool ath10k_htt_rx_pn_check_replay_hl(struct ath10k *ar,
21402140
if (last_pn_valid)
21412141
pn_invalid = ath10k_htt_rx_pn_cmp48(&new_pn, last_pn);
21422142
else
2143-
peer->tids_last_pn_valid[tid] = 1;
2143+
peer->tids_last_pn_valid[tid] = true;
21442144

21452145
if (!pn_invalid)
21462146
last_pn->pn48 = new_pn.pn48;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ ath10k_is_rssi_enable(struct ath10k_hw_params *hw,
816816

817817
#define TARGET_10_4_TX_DBG_LOG_SIZE 1024
818818
#define TARGET_10_4_NUM_WDS_ENTRIES 32
819-
#define TARGET_10_4_DMA_BURST_SIZE 0
819+
#define TARGET_10_4_DMA_BURST_SIZE 1
820820
#define TARGET_10_4_MAC_AGGR_DELIM 0
821821
#define TARGET_10_4_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1
822822
#define TARGET_10_4_VOW_CONFIG 0

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ static int ath10k_pci_set_ram_config(struct ath10k *ar, u32 config)
15781578
return 0;
15791579
}
15801580

1581-
/* if an error happened returns < 0, otherwise the length */
1581+
/* Always returns the length */
15821582
static int ath10k_pci_dump_memory_sram(struct ath10k *ar,
15831583
const struct ath10k_mem_region *region,
15841584
u8 *buf)
@@ -1604,11 +1604,22 @@ static int ath10k_pci_dump_memory_reg(struct ath10k *ar,
16041604
{
16051605
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
16061606
u32 i;
1607+
int ret;
1608+
1609+
mutex_lock(&ar->conf_mutex);
1610+
if (ar->state != ATH10K_STATE_ON) {
1611+
ath10k_warn(ar, "Skipping pci_dump_memory_reg invalid state\n");
1612+
ret = -EIO;
1613+
goto done;
1614+
}
16071615

16081616
for (i = 0; i < region->len; i += 4)
16091617
*(u32 *)(buf + i) = ioread32(ar_pci->mem + region->start + i);
16101618

1611-
return region->len;
1619+
ret = region->len;
1620+
done:
1621+
mutex_unlock(&ar->conf_mutex);
1622+
return ret;
16121623
}
16131624

16141625
/* if an error happened returns < 0, otherwise the length */
@@ -1704,7 +1715,11 @@ static void ath10k_pci_dump_memory(struct ath10k *ar,
17041715
count = ath10k_pci_dump_memory_sram(ar, current_region, buf);
17051716
break;
17061717
case ATH10K_MEM_REGION_TYPE_IOREG:
1707-
count = ath10k_pci_dump_memory_reg(ar, current_region, buf);
1718+
ret = ath10k_pci_dump_memory_reg(ar, current_region, buf);
1719+
if (ret < 0)
1720+
break;
1721+
1722+
count = ret;
17081723
break;
17091724
default:
17101725
ret = ath10k_pci_dump_memory_generic(ar, current_region, buf);

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ static int ath10k_qmi_setup_msa_permissions(struct ath10k_qmi *qmi)
8484
int ret;
8585
int i;
8686

87+
if (qmi->msa_fixed_perm)
88+
return 0;
89+
8790
for (i = 0; i < qmi->nr_mem_region; i++) {
8891
ret = ath10k_qmi_map_msa_permission(qmi, &qmi->mem_region[i]);
8992
if (ret)
@@ -102,6 +105,9 @@ static void ath10k_qmi_remove_msa_permission(struct ath10k_qmi *qmi)
102105
{
103106
int i;
104107

108+
if (qmi->msa_fixed_perm)
109+
return;
110+
105111
for (i = 0; i < qmi->nr_mem_region; i++)
106112
ath10k_qmi_unmap_msa_permission(qmi, &qmi->mem_region[i]);
107113
}
@@ -1035,6 +1041,9 @@ static int ath10k_qmi_setup_msa_resources(struct ath10k_qmi *qmi, u32 msa_size)
10351041
qmi->msa_mem_size = msa_size;
10361042
}
10371043

1044+
if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
1045+
qmi->msa_fixed_perm = true;
1046+
10381047
ath10k_dbg(ar, ATH10K_DBG_QMI, "msa pa: %pad , msa va: 0x%p\n",
10391048
&qmi->msa_pa,
10401049
qmi->msa_va);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ struct ath10k_qmi {
104104
bool fw_ready;
105105
char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
106106
struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
107+
bool msa_fixed_perm;
107108
};
108109

109110
int ath10k_qmi_wlan_enable(struct ath10k *ar,

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

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -642,16 +642,23 @@ static int ath10k_sdio_mbox_rx_fetch(struct ath10k *ar)
642642

643643
ret = ath10k_sdio_readsb(ar, ar_sdio->mbox_info.htc_addr,
644644
skb->data, pkt->alloc_len);
645-
646-
if (ret) {
647-
ar_sdio->n_rx_pkts = 0;
648-
ath10k_sdio_mbox_free_rx_pkt(pkt);
649-
return ret;
650-
}
645+
if (ret)
646+
goto err;
651647

652648
htc_hdr = (struct ath10k_htc_hdr *)skb->data;
653649
pkt->act_len = le16_to_cpu(htc_hdr->len) + sizeof(*htc_hdr);
650+
651+
if (pkt->act_len > pkt->alloc_len) {
652+
ret = -EINVAL;
653+
goto err;
654+
}
655+
654656
skb_put(skb, pkt->act_len);
657+
return 0;
658+
659+
err:
660+
ar_sdio->n_rx_pkts = 0;
661+
ath10k_sdio_mbox_free_rx_pkt(pkt);
655662

656663
return ret;
657664
}
@@ -687,6 +694,11 @@ static int ath10k_sdio_mbox_rx_fetch_bundle(struct ath10k *ar)
687694
htc_hdr = (struct ath10k_htc_hdr *)(ar_sdio->vsg_buffer + pkt_offset);
688695
pkt->act_len = le16_to_cpu(htc_hdr->len) + sizeof(*htc_hdr);
689696

697+
if (pkt->act_len > pkt->alloc_len ) {
698+
ret = -EINVAL;
699+
goto err;
700+
}
701+
690702
skb_put_data(pkt->skb, htc_hdr, pkt->act_len);
691703
pkt_offset += pkt->alloc_len;
692704
}

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static const char * const ath10k_regulators[] = {
4646
};
4747

4848
static const char * const ath10k_clocks[] = {
49-
"cxo_ref_clk_pin",
49+
"cxo_ref_clk_pin", "qdss",
5050
};
5151

5252
static void ath10k_snoc_htc_tx_cb(struct ath10k_ce_pipe *ce_state);
@@ -582,7 +582,7 @@ static void ath10k_snoc_process_rx_cb(struct ath10k_ce_pipe *ce_state,
582582
max_nbytes, DMA_FROM_DEVICE);
583583

584584
if (unlikely(max_nbytes < nbytes)) {
585-
ath10k_warn(ar, "rxed more than expected (nbytes %d, max %d)",
585+
ath10k_warn(ar, "rxed more than expected (nbytes %d, max %d)\n",
586586
nbytes, max_nbytes);
587587
dev_kfree_skb_any(skb);
588588
continue;
@@ -1201,7 +1201,7 @@ static int ath10k_snoc_request_irq(struct ath10k *ar)
12011201
irqflags, ce_name[id], ar);
12021202
if (ret) {
12031203
ath10k_err(ar,
1204-
"failed to register IRQ handler for CE %d: %d",
1204+
"failed to register IRQ handler for CE %d: %d\n",
12051205
id, ret);
12061206
goto err_irq;
12071207
}
@@ -1466,26 +1466,23 @@ MODULE_DEVICE_TABLE(of, ath10k_snoc_dt_match);
14661466
static int ath10k_snoc_probe(struct platform_device *pdev)
14671467
{
14681468
const struct ath10k_snoc_drv_priv *drv_data;
1469-
const struct of_device_id *of_id;
14701469
struct ath10k_snoc *ar_snoc;
14711470
struct device *dev;
14721471
struct ath10k *ar;
14731472
u32 msa_size;
14741473
int ret;
14751474
u32 i;
14761475

1477-
of_id = of_match_device(ath10k_snoc_dt_match, &pdev->dev);
1478-
if (!of_id) {
1479-
dev_err(&pdev->dev, "failed to find matching device tree id\n");
1476+
dev = &pdev->dev;
1477+
drv_data = device_get_match_data(dev);
1478+
if (!drv_data) {
1479+
dev_err(dev, "failed to find matching device tree id\n");
14801480
return -EINVAL;
14811481
}
14821482

1483-
drv_data = of_id->data;
1484-
dev = &pdev->dev;
1485-
14861483
ret = dma_set_mask_and_coherent(dev, drv_data->dma_mask);
14871484
if (ret) {
1488-
dev_err(dev, "failed to set dma mask: %d", ret);
1485+
dev_err(dev, "failed to set dma mask: %d\n", ret);
14891486
return ret;
14901487
}
14911488

0 commit comments

Comments
 (0)