Skip to content

Commit be20f28

Browse files
committed
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 <[email protected]>
2 parents 8258d2d + ab1068d commit be20f28

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,14 +1590,13 @@ static void iwl_pcie_set_interrupt_capa(struct pci_dev *pdev,
15901590
struct iwl_trans *trans)
15911591
{
15921592
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;
15941594
u16 pci_cmd;
15951595

15961596
if (!trans->cfg->mq_rx_supported)
15971597
goto enable_msi;
15981598

1599-
nr_online_cpus = num_online_cpus();
1600-
max_irqs = min_t(u32, nr_online_cpus + 2, IWL_MAX_RX_HW_QUEUES);
1599+
max_irqs = min_t(u32, num_online_cpus() + 2, IWL_MAX_RX_HW_QUEUES);
16011600
for (i = 0; i < max_irqs; i++)
16021601
trans_pcie->msix_entries[i].entry = i;
16031602

@@ -1623,16 +1622,17 @@ static void iwl_pcie_set_interrupt_capa(struct pci_dev *pdev,
16231622
* Two interrupts less: non rx causes shared with FBQ and RSS.
16241623
* More than two interrupts: we will use fewer RSS queues.
16251624
*/
1626-
if (num_irqs <= nr_online_cpus) {
1625+
if (num_irqs <= max_irqs - 2) {
16271626
trans_pcie->trans->num_rx_queues = num_irqs + 1;
16281627
trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX |
16291628
IWL_SHARED_IRQ_FIRST_RSS;
1630-
} else if (num_irqs == nr_online_cpus + 1) {
1629+
} else if (num_irqs == max_irqs - 1) {
16311630
trans_pcie->trans->num_rx_queues = num_irqs;
16321631
trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX;
16331632
} else {
16341633
trans_pcie->trans->num_rx_queues = num_irqs - 1;
16351634
}
1635+
WARN_ON(trans_pcie->trans->num_rx_queues > IWL_MAX_RX_HW_QUEUES);
16361636

16371637
trans_pcie->alloc_vecs = num_irqs;
16381638
trans_pcie->msix_enabled = true;

drivers/net/wireless/ralink/rt2x00/rt2x00queue.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,16 +372,15 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
372372

373373
/*
374374
* Determine IFS values
375-
* - Use TXOP_BACKOFF for probe and management frames except beacons
375+
* - Use TXOP_BACKOFF for management frames except beacons
376376
* - Use TXOP_SIFS for fragment bursts
377377
* - Use TXOP_HTTXOP for everything else
378378
*
379379
* Note: rt2800 devices won't use CTS protection (if used)
380380
* for frames not transmitted with TXOP_HTTXOP
381381
*/
382-
if ((ieee80211_is_mgmt(hdr->frame_control) &&
383-
!ieee80211_is_beacon(hdr->frame_control)) ||
384-
(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE))
382+
if (ieee80211_is_mgmt(hdr->frame_control) &&
383+
!ieee80211_is_beacon(hdr->frame_control))
385384
txdesc->u.ht.txop = TXOP_BACKOFF;
386385
else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT))
387386
txdesc->u.ht.txop = TXOP_SIFS;

0 commit comments

Comments
 (0)