diff options
author | David S. Miller <davem@davemloft.net> | 2018-05-31 15:27:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-31 15:27:39 -0400 |
commit | be20f28fbd1a3f09fb16398b304a7a4546f9f97a (patch) | |
tree | e065068e164eca27efb4d8cfd09aae2bbcc9e77a | |
parent | 8258d2da9f9f521dce7019e018360c28d116354e (diff) | |
parent | ab1068d6866e28bf6427ceaea681a381e5870a4a (diff) |
Merge tag 'wireless-drivers-for-davem-2018-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
Kalle Valo says:
====================
wireless-drivers fixes for 4.17
Two last minute fixes, hopefully they make it to 4.17 still.
rt2x00
* revert a fix which caused even more problems
iwlwifi
* fix a crash when there are 16 or more logical CPUs
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index f8a0234d332c..5517ea4c2aa0 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |||
@@ -1590,14 +1590,13 @@ static void iwl_pcie_set_interrupt_capa(struct pci_dev *pdev, | |||
1590 | struct iwl_trans *trans) | 1590 | struct iwl_trans *trans) |
1591 | { | 1591 | { |
1592 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 1592 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
1593 | int max_irqs, num_irqs, i, ret, nr_online_cpus; | 1593 | int max_irqs, num_irqs, i, ret; |
1594 | u16 pci_cmd; | 1594 | u16 pci_cmd; |
1595 | 1595 | ||
1596 | if (!trans->cfg->mq_rx_supported) | 1596 | if (!trans->cfg->mq_rx_supported) |
1597 | goto enable_msi; | 1597 | goto enable_msi; |
1598 | 1598 | ||
1599 | nr_online_cpus = num_online_cpus(); | 1599 | max_irqs = min_t(u32, num_online_cpus() + 2, IWL_MAX_RX_HW_QUEUES); |
1600 | max_irqs = min_t(u32, nr_online_cpus + 2, IWL_MAX_RX_HW_QUEUES); | ||
1601 | for (i = 0; i < max_irqs; i++) | 1600 | for (i = 0; i < max_irqs; i++) |
1602 | trans_pcie->msix_entries[i].entry = i; | 1601 | trans_pcie->msix_entries[i].entry = i; |
1603 | 1602 | ||
@@ -1623,16 +1622,17 @@ static void iwl_pcie_set_interrupt_capa(struct pci_dev *pdev, | |||
1623 | * Two interrupts less: non rx causes shared with FBQ and RSS. | 1622 | * Two interrupts less: non rx causes shared with FBQ and RSS. |
1624 | * More than two interrupts: we will use fewer RSS queues. | 1623 | * More than two interrupts: we will use fewer RSS queues. |
1625 | */ | 1624 | */ |
1626 | if (num_irqs <= nr_online_cpus) { | 1625 | if (num_irqs <= max_irqs - 2) { |
1627 | trans_pcie->trans->num_rx_queues = num_irqs + 1; | 1626 | trans_pcie->trans->num_rx_queues = num_irqs + 1; |
1628 | trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX | | 1627 | trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX | |
1629 | IWL_SHARED_IRQ_FIRST_RSS; | 1628 | IWL_SHARED_IRQ_FIRST_RSS; |
1630 | } else if (num_irqs == nr_online_cpus + 1) { | 1629 | } else if (num_irqs == max_irqs - 1) { |
1631 | trans_pcie->trans->num_rx_queues = num_irqs; | 1630 | trans_pcie->trans->num_rx_queues = num_irqs; |
1632 | trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX; | 1631 | trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX; |
1633 | } else { | 1632 | } else { |
1634 | trans_pcie->trans->num_rx_queues = num_irqs - 1; | 1633 | trans_pcie->trans->num_rx_queues = num_irqs - 1; |
1635 | } | 1634 | } |
1635 | WARN_ON(trans_pcie->trans->num_rx_queues > IWL_MAX_RX_HW_QUEUES); | ||
1636 | 1636 | ||
1637 | trans_pcie->alloc_vecs = num_irqs; | 1637 | trans_pcie->alloc_vecs = num_irqs; |
1638 | trans_pcie->msix_enabled = true; | 1638 | trans_pcie->msix_enabled = true; |
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c index a6884e73d2ab..7ddee980048b 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | |||
@@ -372,16 +372,15 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev, | |||
372 | 372 | ||
373 | /* | 373 | /* |
374 | * Determine IFS values | 374 | * Determine IFS values |
375 | * - Use TXOP_BACKOFF for probe and management frames except beacons | 375 | * - Use TXOP_BACKOFF for management frames except beacons |
376 | * - Use TXOP_SIFS for fragment bursts | 376 | * - Use TXOP_SIFS for fragment bursts |
377 | * - Use TXOP_HTTXOP for everything else | 377 | * - Use TXOP_HTTXOP for everything else |
378 | * | 378 | * |
379 | * Note: rt2800 devices won't use CTS protection (if used) | 379 | * Note: rt2800 devices won't use CTS protection (if used) |
380 | * for frames not transmitted with TXOP_HTTXOP | 380 | * for frames not transmitted with TXOP_HTTXOP |
381 | */ | 381 | */ |
382 | if ((ieee80211_is_mgmt(hdr->frame_control) && | 382 | if (ieee80211_is_mgmt(hdr->frame_control) && |
383 | !ieee80211_is_beacon(hdr->frame_control)) || | 383 | !ieee80211_is_beacon(hdr->frame_control)) |
384 | (tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) | ||
385 | txdesc->u.ht.txop = TXOP_BACKOFF; | 384 | txdesc->u.ht.txop = TXOP_BACKOFF; |
386 | else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)) | 385 | else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)) |
387 | txdesc->u.ht.txop = TXOP_SIFS; | 386 | txdesc->u.ht.txop = TXOP_SIFS; |