mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJbDq9KAAoJEG4XJFUm622bdFkIAIkIFEEC7TU3p5ud8YDUSOl/ 6MBX/QFSTsFiyWL44YbH+0fU9vBla1oQuOtw+LFyr+te8OOLZzczdb30xUS+/tj0 O/LNMvNZ/TtvRl92Plj7ZcPmbDVa4UAABKL4ZKOjPP7EKdrCFQMLJ92IdHny+PW0 cwOwR5kmcTUgUHzHJ3D/g4M/TIz9UOgGFf1ET5+XiaYR9no84fQEXxDtBgMiNPvH dCR8naiWliq3Zjyfc7nBSMKOk9bOlxRSUPQrjxYN/cLFZEzJJOIU8oSIacgvaYw9 DcZdwJn3BCOiWBihTPr5nzwsdvWOVNE2zc991IqqduhkkzcJdo0CPoTmnh604ZY= =PSVv -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
be20f28fbd
2 changed files with 8 additions and 9 deletions
|
@ -1590,14 +1590,13 @@ static void iwl_pcie_set_interrupt_capa(struct pci_dev *pdev,
|
||||||
struct iwl_trans *trans)
|
struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||||
int max_irqs, num_irqs, i, ret, nr_online_cpus;
|
int max_irqs, num_irqs, i, ret;
|
||||||
u16 pci_cmd;
|
u16 pci_cmd;
|
||||||
|
|
||||||
if (!trans->cfg->mq_rx_supported)
|
if (!trans->cfg->mq_rx_supported)
|
||||||
goto enable_msi;
|
goto enable_msi;
|
||||||
|
|
||||||
nr_online_cpus = num_online_cpus();
|
max_irqs = min_t(u32, num_online_cpus() + 2, IWL_MAX_RX_HW_QUEUES);
|
||||||
max_irqs = min_t(u32, nr_online_cpus + 2, IWL_MAX_RX_HW_QUEUES);
|
|
||||||
for (i = 0; i < max_irqs; i++)
|
for (i = 0; i < max_irqs; i++)
|
||||||
trans_pcie->msix_entries[i].entry = i;
|
trans_pcie->msix_entries[i].entry = i;
|
||||||
|
|
||||||
|
@ -1623,16 +1622,17 @@ static void iwl_pcie_set_interrupt_capa(struct pci_dev *pdev,
|
||||||
* Two interrupts less: non rx causes shared with FBQ and RSS.
|
* Two interrupts less: non rx causes shared with FBQ and RSS.
|
||||||
* More than two interrupts: we will use fewer RSS queues.
|
* More than two interrupts: we will use fewer RSS queues.
|
||||||
*/
|
*/
|
||||||
if (num_irqs <= nr_online_cpus) {
|
if (num_irqs <= max_irqs - 2) {
|
||||||
trans_pcie->trans->num_rx_queues = num_irqs + 1;
|
trans_pcie->trans->num_rx_queues = num_irqs + 1;
|
||||||
trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX |
|
trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX |
|
||||||
IWL_SHARED_IRQ_FIRST_RSS;
|
IWL_SHARED_IRQ_FIRST_RSS;
|
||||||
} else if (num_irqs == nr_online_cpus + 1) {
|
} else if (num_irqs == max_irqs - 1) {
|
||||||
trans_pcie->trans->num_rx_queues = num_irqs;
|
trans_pcie->trans->num_rx_queues = num_irqs;
|
||||||
trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX;
|
trans_pcie->shared_vec_mask = IWL_SHARED_IRQ_NON_RX;
|
||||||
} else {
|
} else {
|
||||||
trans_pcie->trans->num_rx_queues = num_irqs - 1;
|
trans_pcie->trans->num_rx_queues = num_irqs - 1;
|
||||||
}
|
}
|
||||||
|
WARN_ON(trans_pcie->trans->num_rx_queues > IWL_MAX_RX_HW_QUEUES);
|
||||||
|
|
||||||
trans_pcie->alloc_vecs = num_irqs;
|
trans_pcie->alloc_vecs = num_irqs;
|
||||||
trans_pcie->msix_enabled = true;
|
trans_pcie->msix_enabled = true;
|
||||||
|
|
|
@ -372,16 +372,15 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine IFS values
|
* Determine IFS values
|
||||||
* - Use TXOP_BACKOFF for probe and management frames except beacons
|
* - Use TXOP_BACKOFF for management frames except beacons
|
||||||
* - Use TXOP_SIFS for fragment bursts
|
* - Use TXOP_SIFS for fragment bursts
|
||||||
* - Use TXOP_HTTXOP for everything else
|
* - Use TXOP_HTTXOP for everything else
|
||||||
*
|
*
|
||||||
* Note: rt2800 devices won't use CTS protection (if used)
|
* Note: rt2800 devices won't use CTS protection (if used)
|
||||||
* for frames not transmitted with TXOP_HTTXOP
|
* for frames not transmitted with TXOP_HTTXOP
|
||||||
*/
|
*/
|
||||||
if ((ieee80211_is_mgmt(hdr->frame_control) &&
|
if (ieee80211_is_mgmt(hdr->frame_control) &&
|
||||||
!ieee80211_is_beacon(hdr->frame_control)) ||
|
!ieee80211_is_beacon(hdr->frame_control))
|
||||||
(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE))
|
|
||||||
txdesc->u.ht.txop = TXOP_BACKOFF;
|
txdesc->u.ht.txop = TXOP_BACKOFF;
|
||||||
else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT))
|
else if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT))
|
||||||
txdesc->u.ht.txop = TXOP_SIFS;
|
txdesc->u.ht.txop = TXOP_SIFS;
|
||||||
|
|
Loading…
Reference in a new issue