Skip to content

Commit 2cfd71f

Browse files
author
Kalle Valo
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git
mt76 driver had major conflicts within mt7615 directory. To make it easier for every merge wireless-drivers to wireless-drivers-next and solve those conflicts.
2 parents 3dc05ff + 1cfd342 commit 2cfd71f

File tree

11 files changed

+88
-65
lines changed

11 files changed

+88
-65
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
820820
ath10k_ahb_release_irq_legacy(ar);
821821

822822
err_free_pipes:
823-
ath10k_pci_free_pipes(ar);
823+
ath10k_pci_release_resource(ar);
824824

825825
err_resource_deinit:
826826
ath10k_ahb_resource_deinit(ar);

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

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3473,25 +3473,60 @@ int ath10k_pci_setup_resource(struct ath10k *ar)
34733473

34743474
timer_setup(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry, 0);
34753475

3476+
ar_pci->attr = kmemdup(pci_host_ce_config_wlan,
3477+
sizeof(pci_host_ce_config_wlan),
3478+
GFP_KERNEL);
3479+
if (!ar_pci->attr)
3480+
return -ENOMEM;
3481+
3482+
ar_pci->pipe_config = kmemdup(pci_target_ce_config_wlan,
3483+
sizeof(pci_target_ce_config_wlan),
3484+
GFP_KERNEL);
3485+
if (!ar_pci->pipe_config) {
3486+
ret = -ENOMEM;
3487+
goto err_free_attr;
3488+
}
3489+
3490+
ar_pci->serv_to_pipe = kmemdup(pci_target_service_to_ce_map_wlan,
3491+
sizeof(pci_target_service_to_ce_map_wlan),
3492+
GFP_KERNEL);
3493+
if (!ar_pci->serv_to_pipe) {
3494+
ret = -ENOMEM;
3495+
goto err_free_pipe_config;
3496+
}
3497+
34763498
if (QCA_REV_6174(ar) || QCA_REV_9377(ar))
34773499
ath10k_pci_override_ce_config(ar);
34783500

34793501
ret = ath10k_pci_alloc_pipes(ar);
34803502
if (ret) {
34813503
ath10k_err(ar, "failed to allocate copy engine pipes: %d\n",
34823504
ret);
3483-
return ret;
3505+
goto err_free_serv_to_pipe;
34843506
}
34853507

34863508
return 0;
3509+
3510+
err_free_serv_to_pipe:
3511+
kfree(ar_pci->serv_to_pipe);
3512+
err_free_pipe_config:
3513+
kfree(ar_pci->pipe_config);
3514+
err_free_attr:
3515+
kfree(ar_pci->attr);
3516+
return ret;
34873517
}
34883518

34893519
void ath10k_pci_release_resource(struct ath10k *ar)
34903520
{
3521+
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
3522+
34913523
ath10k_pci_rx_retry_sync(ar);
34923524
netif_napi_del(&ar->napi);
34933525
ath10k_pci_ce_deinit(ar);
34943526
ath10k_pci_free_pipes(ar);
3527+
kfree(ar_pci->attr);
3528+
kfree(ar_pci->pipe_config);
3529+
kfree(ar_pci->serv_to_pipe);
34953530
}
34963531

34973532
static const struct ath10k_bus_ops ath10k_pci_bus_ops = {
@@ -3601,30 +3636,6 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
36013636

36023637
timer_setup(&ar_pci->ps_timer, ath10k_pci_ps_timer, 0);
36033638

3604-
ar_pci->attr = kmemdup(pci_host_ce_config_wlan,
3605-
sizeof(pci_host_ce_config_wlan),
3606-
GFP_KERNEL);
3607-
if (!ar_pci->attr) {
3608-
ret = -ENOMEM;
3609-
goto err_free;
3610-
}
3611-
3612-
ar_pci->pipe_config = kmemdup(pci_target_ce_config_wlan,
3613-
sizeof(pci_target_ce_config_wlan),
3614-
GFP_KERNEL);
3615-
if (!ar_pci->pipe_config) {
3616-
ret = -ENOMEM;
3617-
goto err_free;
3618-
}
3619-
3620-
ar_pci->serv_to_pipe = kmemdup(pci_target_service_to_ce_map_wlan,
3621-
sizeof(pci_target_service_to_ce_map_wlan),
3622-
GFP_KERNEL);
3623-
if (!ar_pci->serv_to_pipe) {
3624-
ret = -ENOMEM;
3625-
goto err_free;
3626-
}
3627-
36283639
ret = ath10k_pci_setup_resource(ar);
36293640
if (ret) {
36303641
ath10k_err(ar, "failed to setup resource: %d\n", ret);
@@ -3705,10 +3716,9 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
37053716

37063717
err_free_irq:
37073718
ath10k_pci_free_irq(ar);
3708-
ath10k_pci_rx_retry_sync(ar);
37093719

37103720
err_deinit_irq:
3711-
ath10k_pci_deinit_irq(ar);
3721+
ath10k_pci_release_resource(ar);
37123722

37133723
err_sleep:
37143724
ath10k_pci_sleep_sync(ar);
@@ -3720,39 +3730,25 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
37203730
err_core_destroy:
37213731
ath10k_core_destroy(ar);
37223732

3723-
err_free:
3724-
kfree(ar_pci->attr);
3725-
kfree(ar_pci->pipe_config);
3726-
kfree(ar_pci->serv_to_pipe);
3727-
37283733
return ret;
37293734
}
37303735

37313736
static void ath10k_pci_remove(struct pci_dev *pdev)
37323737
{
37333738
struct ath10k *ar = pci_get_drvdata(pdev);
3734-
struct ath10k_pci *ar_pci;
37353739

37363740
ath10k_dbg(ar, ATH10K_DBG_PCI, "pci remove\n");
37373741

37383742
if (!ar)
37393743
return;
37403744

3741-
ar_pci = ath10k_pci_priv(ar);
3742-
3743-
if (!ar_pci)
3744-
return;
3745-
37463745
ath10k_core_unregister(ar);
37473746
ath10k_pci_free_irq(ar);
37483747
ath10k_pci_deinit_irq(ar);
37493748
ath10k_pci_release_resource(ar);
37503749
ath10k_pci_sleep_sync(ar);
37513750
ath10k_pci_release(ar);
37523751
ath10k_core_destroy(ar);
3753-
kfree(ar_pci->attr);
3754-
kfree(ar_pci->pipe_config);
3755-
kfree(ar_pci->serv_to_pipe);
37563752
}
37573753

37583754
MODULE_DEVICE_TABLE(pci, ath10k_pci_id_table);

drivers/net/wireless/ath/ath9k/hif_usb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,11 +733,13 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
733733
return;
734734
}
735735

736+
rx_buf->skb = nskb;
737+
736738
usb_fill_int_urb(urb, hif_dev->udev,
737739
usb_rcvintpipe(hif_dev->udev,
738740
USB_REG_IN_PIPE),
739741
nskb->data, MAX_REG_IN_BUF_SIZE,
740-
ath9k_hif_usb_reg_in_cb, nskb, 1);
742+
ath9k_hif_usb_reg_in_cb, rx_buf, 1);
741743
}
742744

743745
resubmit:

drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ static int iwl_dbg_tlv_alloc_trigger(struct iwl_trans *trans,
271271
{
272272
struct iwl_fw_ini_trigger_tlv *trig = (void *)tlv->data;
273273
u32 tp = le32_to_cpu(trig->time_point);
274+
struct iwl_ucode_tlv *dup = NULL;
275+
int ret;
274276

275277
if (le32_to_cpu(tlv->length) < sizeof(*trig))
276278
return -EINVAL;
@@ -283,10 +285,20 @@ static int iwl_dbg_tlv_alloc_trigger(struct iwl_trans *trans,
283285
return -EINVAL;
284286
}
285287

286-
if (!le32_to_cpu(trig->occurrences))
288+
if (!le32_to_cpu(trig->occurrences)) {
289+
dup = kmemdup(tlv, sizeof(*tlv) + le32_to_cpu(tlv->length),
290+
GFP_KERNEL);
291+
if (!dup)
292+
return -ENOMEM;
293+
trig = (void *)dup->data;
287294
trig->occurrences = cpu_to_le32(-1);
295+
tlv = dup;
296+
}
297+
298+
ret = iwl_dbg_tlv_add(tlv, &trans->dbg.time_point[tp].trig_list);
299+
kfree(dup);
288300

289-
return iwl_dbg_tlv_add(tlv, &trans->dbg.time_point[tp].trig_list);
301+
return ret;
290302
}
291303

292304
static int (*dbg_tlv_alloc[])(struct iwl_trans *trans,

drivers/net/wireless/intel/iwlwifi/mvm/sta.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,17 +1189,15 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta)
11891189
for_each_set_bit(i, &changetid_queues, IWL_MAX_HW_QUEUES)
11901190
iwl_mvm_change_queue_tid(mvm, i);
11911191

1192+
rcu_read_unlock();
1193+
11921194
if (free_queue >= 0 && alloc_for_sta != IWL_MVM_INVALID_STA) {
11931195
ret = iwl_mvm_free_inactive_queue(mvm, free_queue, queue_owner,
11941196
alloc_for_sta);
1195-
if (ret) {
1196-
rcu_read_unlock();
1197+
if (ret)
11971198
return ret;
1198-
}
11991199
}
12001200

1201-
rcu_read_unlock();
1202-
12031201
return free_queue;
12041202
}
12051203

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
582582
IWL_DEV_INFO(0x30DC, 0x1552, iwl9560_2ac_cfg_soc, iwl9560_killer_1550i_name),
583583
IWL_DEV_INFO(0x31DC, 0x1551, iwl9560_2ac_cfg_soc, iwl9560_killer_1550s_name),
584584
IWL_DEV_INFO(0x31DC, 0x1552, iwl9560_2ac_cfg_soc, iwl9560_killer_1550i_name),
585+
IWL_DEV_INFO(0xA370, 0x1551, iwl9560_2ac_cfg_soc, iwl9560_killer_1550s_name),
586+
IWL_DEV_INFO(0xA370, 0x1552, iwl9560_2ac_cfg_soc, iwl9560_killer_1550i_name),
585587

586588
IWL_DEV_INFO(0x271C, 0x0214, iwl9260_2ac_cfg, iwl9260_1_name),
587589

drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ static int mt7615_eeprom_load(struct mt7615_dev *dev, u32 addr)
7272
{
7373
int ret;
7474

75-
ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_SIZE +
76-
MT7615_EEPROM_EXTRA_DATA);
75+
ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_FULL_SIZE);
7776
if (ret < 0)
7877
return ret;
7978

drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define MT7615_EEPROM_TXDPD_SIZE 216
1818
#define MT7615_EEPROM_TXDPD_COUNT (44 + 3)
1919

20-
#define MT7615_EEPROM_EXTRA_DATA (MT7615_EEPROM_TXDPD_OFFSET + \
20+
#define MT7615_EEPROM_FULL_SIZE (MT7615_EEPROM_TXDPD_OFFSET + \
2121
MT7615_EEPROM_TXDPD_COUNT * \
2222
MT7615_EEPROM_TXDPD_SIZE)
2323

drivers/net/wireless/mediatek/mt76/mt7615/usb.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,26 @@ static int mt7663u_probe(struct usb_interface *usb_intf,
119119
if (!mt76_poll_msec(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_PWR_ON,
120120
FW_STATE_PWR_ON << 1, 500)) {
121121
dev_err(dev->mt76.dev, "Timeout for power on\n");
122-
return -EIO;
122+
ret = -EIO;
123+
goto error;
123124
}
124125

125126
alloc_queues:
126127
ret = mt76u_alloc_mcu_queue(&dev->mt76);
127128
if (ret)
128-
goto error;
129+
goto error_free_q;
129130

130131
ret = mt76u_alloc_queues(&dev->mt76);
131132
if (ret)
132-
goto error;
133+
goto error_free_q;
133134

134135
ret = mt7663_usb_sdio_register_device(dev);
135136
if (ret)
136-
goto error_freeq;
137+
goto error_free_q;
137138

138139
return 0;
139140

140-
error_freeq:
141+
error_free_q:
141142
mt76u_queues_deinit(&dev->mt76);
142143
error:
143144
usb_set_intfdata(usb_intf, NULL);

drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,9 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
456456
tasklet_disable(&dev->mt76.tx_tasklet);
457457
napi_disable(&dev->mt76.tx_napi);
458458

459-
for (i = 0; i < ARRAY_SIZE(dev->mt76.napi); i++)
459+
mt76_for_each_q_rx(&dev->mt76, i) {
460460
napi_disable(&dev->mt76.napi[i]);
461+
}
461462

462463
mutex_lock(&dev->mt76.mutex);
463464

@@ -515,7 +516,7 @@ static void mt76x02_watchdog_reset(struct mt76x02_dev *dev)
515516

516517
tasklet_enable(&dev->mt76.pre_tbtt_tasklet);
517518

518-
for (i = 0; i < ARRAY_SIZE(dev->mt76.napi); i++) {
519+
mt76_for_each_q_rx(&dev->mt76, i) {
519520
napi_enable(&dev->mt76.napi[i]);
520521
napi_schedule(&dev->mt76.napi[i]);
521522
}

0 commit comments

Comments
 (0)