aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/pci.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/rtlwifi/pci.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/rtlwifi/pci.c')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index c70efb9a6e78..ec456f0d972e 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -578,6 +578,13 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
578 else 578 else
579 entry = (u8 *)(&ring->desc[ring->idx]); 579 entry = (u8 *)(&ring->desc[ring->idx]);
580 580
581 if (rtlpriv->cfg->ops->get_available_desc &&
582 rtlpriv->cfg->ops->get_available_desc(hw, prio) <= 1) {
583 RT_TRACE(rtlpriv, (COMP_INTR | COMP_SEND), DBG_DMESG,
584 "no available desc!\n");
585 return;
586 }
587
581 if (!rtlpriv->cfg->ops->is_tx_desc_closed(hw, prio, ring->idx)) 588 if (!rtlpriv->cfg->ops->is_tx_desc_closed(hw, prio, ring->idx))
582 return; 589 return;
583 ring->idx = (ring->idx + 1) % ring->entries; 590 ring->idx = (ring->idx + 1) % ring->entries;
@@ -641,10 +648,9 @@ static void _rtl_pci_tx_isr(struct ieee80211_hw *hw, int prio)
641 648
642 ieee80211_tx_status_irqsafe(hw, skb); 649 ieee80211_tx_status_irqsafe(hw, skb);
643 650
644 if ((ring->entries - skb_queue_len(&ring->queue)) 651 if ((ring->entries - skb_queue_len(&ring->queue)) <= 4) {
645 == 2) {
646 652
647 RT_TRACE(rtlpriv, COMP_ERR, DBG_LOUD, 653 RT_TRACE(rtlpriv, COMP_ERR, DBG_DMESG,
648 "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%x\n", 654 "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%x\n",
649 prio, ring->idx, 655 prio, ring->idx,
650 skb_queue_len(&ring->queue)); 656 skb_queue_len(&ring->queue));
@@ -793,7 +799,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
793 rx_remained_cnt = 799 rx_remained_cnt =
794 rtlpriv->cfg->ops->rx_desc_buff_remained_cnt(hw, 800 rtlpriv->cfg->ops->rx_desc_buff_remained_cnt(hw,
795 hw_queue); 801 hw_queue);
796 if (rx_remained_cnt < 1) 802 if (rx_remained_cnt == 0)
797 return; 803 return;
798 804
799 } else { /* rx descriptor */ 805 } else { /* rx descriptor */
@@ -848,18 +854,18 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
848 else 854 else
849 skb_reserve(skb, stats.rx_drvinfo_size + 855 skb_reserve(skb, stats.rx_drvinfo_size +
850 stats.rx_bufshift); 856 stats.rx_bufshift);
851
852 } else { 857 } else {
853 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, 858 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
854 "skb->end - skb->tail = %d, len is %d\n", 859 "skb->end - skb->tail = %d, len is %d\n",
855 skb->end - skb->tail, len); 860 skb->end - skb->tail, len);
856 break; 861 dev_kfree_skb_any(skb);
862 goto new_trx_end;
857 } 863 }
858 /* handle command packet here */ 864 /* handle command packet here */
859 if (rtlpriv->cfg->ops->rx_command_packet && 865 if (rtlpriv->cfg->ops->rx_command_packet &&
860 rtlpriv->cfg->ops->rx_command_packet(hw, stats, skb)) { 866 rtlpriv->cfg->ops->rx_command_packet(hw, stats, skb)) {
861 dev_kfree_skb_any(skb); 867 dev_kfree_skb_any(skb);
862 goto end; 868 goto new_trx_end;
863 } 869 }
864 870
865 /* 871 /*
@@ -909,6 +915,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
909 } else { 915 } else {
910 dev_kfree_skb_any(skb); 916 dev_kfree_skb_any(skb);
911 } 917 }
918new_trx_end:
912 if (rtlpriv->use_new_trx_flow) { 919 if (rtlpriv->use_new_trx_flow) {
913 rtlpci->rx_ring[hw_queue].next_rx_rp += 1; 920 rtlpci->rx_ring[hw_queue].next_rx_rp += 1;
914 rtlpci->rx_ring[hw_queue].next_rx_rp %= 921 rtlpci->rx_ring[hw_queue].next_rx_rp %=
@@ -924,7 +931,6 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
924 rtlpriv->enter_ps = false; 931 rtlpriv->enter_ps = false;
925 schedule_work(&rtlpriv->works.lps_change_work); 932 schedule_work(&rtlpriv->works.lps_change_work);
926 } 933 }
927end:
928 skb = new_skb; 934 skb = new_skb;
929no_new: 935no_new:
930 if (rtlpriv->use_new_trx_flow) { 936 if (rtlpriv->use_new_trx_flow) {
@@ -1688,6 +1694,15 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
1688 } 1694 }
1689 } 1695 }
1690 1696
1697 if (rtlpriv->cfg->ops->get_available_desc &&
1698 rtlpriv->cfg->ops->get_available_desc(hw, hw_queue) == 0) {
1699 RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
1700 "get_available_desc fail\n");
1701 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock,
1702 flags);
1703 return skb->len;
1704 }
1705
1691 if (ieee80211_is_data_qos(fc)) { 1706 if (ieee80211_is_data_qos(fc)) {
1692 tid = rtl_get_tid(skb); 1707 tid = rtl_get_tid(skb);
1693 if (sta) { 1708 if (sta) {