aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 23:01:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 23:01:30 -0500
commitc5ce28df0e7c01a1de23c36ebdefcd803f2b6cbb (patch)
tree9830baf38832769e1cf621708889111bbe3c93df /drivers/net/wireless/iwlwifi/mvm/utils.c
parent29afc4e9a408f2304e09c6dd0dbcfbd2356d0faa (diff)
parent9399f0c51489ae8c16d6559b82a452fdc1895e91 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) More iov_iter conversion work from Al Viro. [ The "crypto: switch af_alg_make_sg() to iov_iter" commit was wrong, and this pull actually adds an extra commit on top of the branch I'm pulling to fix that up, so that the pre-merge state is ok. - Linus ] 2) Various optimizations to the ipv4 forwarding information base trie lookup implementation. From Alexander Duyck. 3) Remove sock_iocb altogether, from CHristoph Hellwig. 4) Allow congestion control algorithm selection via routing metrics. From Daniel Borkmann. 5) Make ipv4 uncached route list per-cpu, from Eric Dumazet. 6) Handle rfs hash collisions more gracefully, also from Eric Dumazet. 7) Add xmit_more support to r8169, e1000, and e1000e drivers. From Florian Westphal. 8) Transparent Ethernet Bridging support for GRO, from Jesse Gross. 9) Add BPF packet actions to packet scheduler, from Jiri Pirko. 10) Add support for uniqu flow IDs to openvswitch, from Joe Stringer. 11) New NetCP ethernet driver, from Muralidharan Karicheri and Wingman Kwok. 12) More sanely handle out-of-window dupacks, which can result in serious ACK storms. From Neal Cardwell. 13) Various rhashtable bug fixes and enhancements, from Herbert Xu, Patrick McHardy, and Thomas Graf. 14) Support xmit_more in be2net, from Sathya Perla. 15) Group Policy extensions for vxlan, from Thomas Graf. 16) Remove Checksum Offload support for vxlan, from Tom Herbert. 17) Like ipv4, support lockless transmit over ipv6 UDP sockets. From Vlad Yasevich. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1494+1 commits) crypto: fix af_alg_make_sg() conversion to iov_iter ipv4: Namespecify TCP PMTU mechanism i40e: Fix for stats init function call in Rx setup tcp: don't include Fast Open option in SYN-ACK on pure SYN-data openvswitch: Only set TUNNEL_VXLAN_OPT if VXLAN-GBP metadata is set ipv6: Make __ipv6_select_ident static ipv6: Fix fragment id assignment on LE arches. bridge: Fix inability to add non-vlan fdb entry net: Mellanox: Delete unnecessary checks before the function call "vunmap" cxgb4: Add support in cxgb4 to get expansion rom version via ethtool ethtool: rename reserved1 memeber in ethtool_drvinfo for expansion ROM version net: dsa: Remove redundant phy_attach() IB/mlx4: Reset flow support for IB kernel ULPs IB/mlx4: Always use the correct port for mirrored multicast attachments net/bonding: Fix potential bad memory access during bonding events tipc: remove tipc_snprintf tipc: nl compat add noop and remove legacy nl framework tipc: convert legacy nl stats show to nl compat tipc: convert legacy nl net id get to nl compat tipc: convert legacy nl net id set to nl compat ...
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/utils.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/utils.c79
1 files changed, 40 insertions, 39 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/utils.c b/drivers/net/wireless/iwlwifi/mvm/utils.c
index 917431e30f74..8decf9953229 100644
--- a/drivers/net/wireless/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/iwlwifi/mvm/utils.c
@@ -432,7 +432,7 @@ static void iwl_mvm_dump_umac_error_log(struct iwl_mvm *mvm)
432 mvm->status, table.valid); 432 mvm->status, table.valid);
433 } 433 }
434 434
435 IWL_ERR(mvm, "0x%08X | %-28s\n", table.error_id, 435 IWL_ERR(mvm, "0x%08X | %s\n", table.error_id,
436 desc_lookup(table.error_id)); 436 desc_lookup(table.error_id));
437 IWL_ERR(mvm, "0x%08X | umac branchlink1\n", table.blink1); 437 IWL_ERR(mvm, "0x%08X | umac branchlink1\n", table.blink1);
438 IWL_ERR(mvm, "0x%08X | umac branchlink2\n", table.blink2); 438 IWL_ERR(mvm, "0x%08X | umac branchlink2\n", table.blink2);
@@ -531,49 +531,50 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
531} 531}
532 532
533void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, u16 ssn, 533void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, u16 ssn,
534 const struct iwl_trans_txq_scd_cfg *cfg) 534 const struct iwl_trans_txq_scd_cfg *cfg,
535 unsigned int wdg_timeout)
535{ 536{
536 if (iwl_mvm_is_dqa_supported(mvm)) { 537 struct iwl_scd_txq_cfg_cmd cmd = {
537 struct iwl_scd_txq_cfg_cmd cmd = { 538 .scd_queue = queue,
538 .scd_queue = queue, 539 .enable = 1,
539 .enable = 1, 540 .window = cfg->frame_limit,
540 .window = cfg->frame_limit, 541 .sta_id = cfg->sta_id,
541 .sta_id = cfg->sta_id, 542 .ssn = cpu_to_le16(ssn),
542 .ssn = cpu_to_le16(ssn), 543 .tx_fifo = cfg->fifo,
543 .tx_fifo = cfg->fifo, 544 .aggregate = cfg->aggregate,
544 .aggregate = cfg->aggregate, 545 .tid = cfg->tid,
545 .flags = IWL_SCD_FLAGS_DQA_ENABLED, 546 };
546 .tid = cfg->tid, 547
547 .control = IWL_SCD_CONTROL_SET_SSN, 548 if (!iwl_mvm_is_scd_cfg_supported(mvm)) {
548 }; 549 iwl_trans_txq_enable_cfg(mvm->trans, queue, ssn, cfg,
549 int ret = iwl_mvm_send_cmd_pdu(mvm, SCD_QUEUE_CFG, 0, 550 wdg_timeout);
550 sizeof(cmd), &cmd); 551 return;
551 if (ret)
552 IWL_ERR(mvm,
553 "Failed to configure queue %d on FIFO %d\n",
554 queue, cfg->fifo);
555 } 552 }
556 553
557 iwl_trans_txq_enable_cfg(mvm->trans, queue, ssn, 554 iwl_trans_txq_enable_cfg(mvm->trans, queue, ssn, NULL, wdg_timeout);
558 iwl_mvm_is_dqa_supported(mvm) ? NULL : cfg); 555 WARN(iwl_mvm_send_cmd_pdu(mvm, SCD_QUEUE_CFG, 0, sizeof(cmd), &cmd),
556 "Failed to configure queue %d on FIFO %d\n", queue, cfg->fifo);
559} 557}
560 558
561void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue) 559void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, u8 flags)
562{ 560{
563 iwl_trans_txq_disable(mvm->trans, queue, 561 struct iwl_scd_txq_cfg_cmd cmd = {
564 !iwl_mvm_is_dqa_supported(mvm)); 562 .scd_queue = queue,
565 563 .enable = 0,
566 if (iwl_mvm_is_dqa_supported(mvm)) { 564 };
567 struct iwl_scd_txq_cfg_cmd cmd = { 565 int ret;
568 .scd_queue = queue, 566
569 .enable = 0, 567 if (!iwl_mvm_is_scd_cfg_supported(mvm)) {
570 }; 568 iwl_trans_txq_disable(mvm->trans, queue, true);
571 int ret = iwl_mvm_send_cmd_pdu(mvm, SCD_QUEUE_CFG, CMD_ASYNC, 569 return;
572 sizeof(cmd), &cmd);
573 if (ret)
574 IWL_ERR(mvm, "Failed to disable queue %d (ret=%d)\n",
575 queue, ret);
576 } 570 }
571
572 iwl_trans_txq_disable(mvm->trans, queue, false);
573 ret = iwl_mvm_send_cmd_pdu(mvm, SCD_QUEUE_CFG, flags,
574 sizeof(cmd), &cmd);
575 if (ret)
576 IWL_ERR(mvm, "Failed to disable queue %d (ret=%d)\n",
577 queue, ret);
577} 578}
578 579
579/** 580/**
@@ -620,7 +621,7 @@ void iwl_mvm_update_smps(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
620 lockdep_assert_held(&mvm->mutex); 621 lockdep_assert_held(&mvm->mutex);
621 622
622 /* SMPS is irrelevant for NICs that don't have at least 2 RX antenna */ 623 /* SMPS is irrelevant for NICs that don't have at least 2 RX antenna */
623 if (num_of_ant(mvm->fw->valid_rx_ant) == 1) 624 if (num_of_ant(iwl_mvm_get_valid_rx_ant(mvm)) == 1)
624 return; 625 return;
625 626
626 if (vif->type == NL80211_IFTYPE_AP) 627 if (vif->type == NL80211_IFTYPE_AP)
@@ -662,7 +663,7 @@ bool iwl_mvm_rx_diversity_allowed(struct iwl_mvm *mvm)
662 663
663 lockdep_assert_held(&mvm->mutex); 664 lockdep_assert_held(&mvm->mutex);
664 665
665 if (num_of_ant(mvm->fw->valid_rx_ant) == 1) 666 if (num_of_ant(iwl_mvm_get_valid_rx_ant(mvm)) == 1)
666 return false; 667 return false;
667 668
668 if (mvm->cfg->rx_with_siso_diversity) 669 if (mvm->cfg->rx_with_siso_diversity)