aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/pci.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-12-09 18:12:03 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-09 18:12:03 -0500
commitb5f185f33d0432cef6ff78765e033dfa8f4de068 (patch)
tree33179c016b8fc3b4d57ed7a7786079ba00b6ef4a /drivers/net/wireless/ath/ath10k/pci.c
parent450fa21942fe2c37f0c9f52d1a33bbc081eee288 (diff)
parent81c412600f946fc1c8731685cb6c6fae8002043a (diff)
Merge tag 'master-2014-12-08' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says: ==================== pull request: wireless-next 2014-12-08 Please pull this last batch of pending wireless updates for the 3.19 tree... For the wireless bits, Johannes says: "This time I have Felix's no-status rate control work, which will allow drivers to work better with rate control even if they don't have perfect status reporting. In addition to this, a small hwsim fix from Patrik, one of the regulatory patches from Arik, and a number of cleanups and fixes I did myself. Of note is a patch where I disable CFG80211_WEXT so that compatibility is no longer selectable - this is intended as a wake-up call for anyone who's still using it, and is still easily worked around (it's a one-line patch) before we fully remove the code as well in the future." For the Bluetooth bits, Johan says: "Here's one more bluetooth-next pull request for 3.19: - Minor cleanups for ieee802154 & mac802154 - Fix for the kernel warning with !TASK_RUNNING reported by Kirill A. Shutemov - Support for another ath3k device - Fix for tracking link key based security level - Device tree bindings for btmrvl + a state update fix - Fix for wrong ACL flags on LE links" And... "In addition to the previous one this contains two more cleanups to mac802154 as well as support for some new HCI features from the Bluetooth 4.2 specification. From the original request: 'Here's what should be the last bluetooth-next pull request for 3.19. It's rather large but the majority of it is the Low Energy Secure Connections feature that's part of the Bluetooth 4.2 specification. The specification went public only this week so we couldn't publish the corresponding code before that. The code itself can nevertheless be considered fairly mature as it's been in development for over 6 months and gone through several interoperability test events. Besides LE SC the pull request contains an important fix for command complete events for mgmt sockets which also fixes some leaks of hci_conn objects when powering off or unplugging Bluetooth adapters. A smaller feature that's part of the pull request is service discovery support. This is like normal device discovery except that devices not matching specific UUIDs or strong enough RSSI are filtered out. Other changes that the pull request contains are firmware dump support to the btmrvl driver, firmware download support for Broadcom BCM20702A0 variants, as well as some coding style cleanups in 6lowpan & ieee802154/mac802154 code.'" For the NFC bits, Samuel says: "With this one we get: - NFC digital improvements for DEP support: Chaining, NACK and ATN support added. - NCI improvements: Support for p2p target, SE IO operand addition, SE operands extensions to support proprietary implementations, and a few fixes. - NFC HCI improvements: OPEN_PIPE and NOTIFY_ALL_CLEARED support, and SE IO operand addition. - A bunch of minor improvements and fixes for STMicro st21nfcb and st21nfca" For the iwlwifi bits, Emmanuel says: "Major works are CSA and TDLS. On top of that I have a new firmware API for scan and a few rate control improvements. Johannes find a few tricks to improve our CPU utilization and adds support for a new spin of 7265 called 7265D. Along with this a few random things that don't stand out." And... "I deprecate here -8.ucode since -9 has been published long ago. Along with that I have a new activity, we have now better a infrastructure for firmware debugging. This will allow to have configurable probes insides the firmware. Luca continues his work on NetDetect, this feature is now complete. All the rest is minor fixes here and there." For the Atheros bits, Kalle says: "Only ath10k changes this time and no major changes. Most visible are: o new debugfs interface for runtime firmware debugging (Yanbo) o fix shared WEP (Sujith) o don't rebuild whenever kernel version changes (Johannes) o lots of refactoring to make it easier to add new hw support (Michal) There's also smaller fixes and improvements with no point of listing here." In addition, there are a few last minute updates to ath5k, ath9k, brcmfmac, brcmsmac, mwifiex, rt2x00, rtlwifi, and wil6210. Also included is a pull of the wireless tree to pick-up the fixes originally included in "pull request: wireless 2014-12-03"... Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/pci.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/pci.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 3a6b8a5ca96c..7abb8367119a 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -823,20 +823,24 @@ static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state)
823 struct ath10k *ar = ce_state->ar; 823 struct ath10k *ar = ce_state->ar;
824 struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); 824 struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
825 struct ath10k_hif_cb *cb = &ar_pci->msg_callbacks_current; 825 struct ath10k_hif_cb *cb = &ar_pci->msg_callbacks_current;
826 void *transfer_context; 826 struct sk_buff_head list;
827 struct sk_buff *skb;
827 u32 ce_data; 828 u32 ce_data;
828 unsigned int nbytes; 829 unsigned int nbytes;
829 unsigned int transfer_id; 830 unsigned int transfer_id;
830 831
831 while (ath10k_ce_completed_send_next(ce_state, &transfer_context, 832 __skb_queue_head_init(&list);
832 &ce_data, &nbytes, 833 while (ath10k_ce_completed_send_next(ce_state, (void **)&skb, &ce_data,
833 &transfer_id) == 0) { 834 &nbytes, &transfer_id) == 0) {
834 /* no need to call tx completion for NULL pointers */ 835 /* no need to call tx completion for NULL pointers */
835 if (transfer_context == NULL) 836 if (skb == NULL)
836 continue; 837 continue;
837 838
838 cb->tx_completion(ar, transfer_context, transfer_id); 839 __skb_queue_tail(&list, skb);
839 } 840 }
841
842 while ((skb = __skb_dequeue(&list)))
843 cb->tx_completion(ar, skb);
840} 844}
841 845
842/* Called by lower (CE) layer when data is received from the Target. */ 846/* Called by lower (CE) layer when data is received from the Target. */
@@ -847,12 +851,14 @@ static void ath10k_pci_ce_recv_data(struct ath10k_ce_pipe *ce_state)
847 struct ath10k_pci_pipe *pipe_info = &ar_pci->pipe_info[ce_state->id]; 851 struct ath10k_pci_pipe *pipe_info = &ar_pci->pipe_info[ce_state->id];
848 struct ath10k_hif_cb *cb = &ar_pci->msg_callbacks_current; 852 struct ath10k_hif_cb *cb = &ar_pci->msg_callbacks_current;
849 struct sk_buff *skb; 853 struct sk_buff *skb;
854 struct sk_buff_head list;
850 void *transfer_context; 855 void *transfer_context;
851 u32 ce_data; 856 u32 ce_data;
852 unsigned int nbytes, max_nbytes; 857 unsigned int nbytes, max_nbytes;
853 unsigned int transfer_id; 858 unsigned int transfer_id;
854 unsigned int flags; 859 unsigned int flags;
855 860
861 __skb_queue_head_init(&list);
856 while (ath10k_ce_completed_recv_next(ce_state, &transfer_context, 862 while (ath10k_ce_completed_recv_next(ce_state, &transfer_context,
857 &ce_data, &nbytes, &transfer_id, 863 &ce_data, &nbytes, &transfer_id,
858 &flags) == 0) { 864 &flags) == 0) {
@@ -869,13 +875,16 @@ static void ath10k_pci_ce_recv_data(struct ath10k_ce_pipe *ce_state)
869 } 875 }
870 876
871 skb_put(skb, nbytes); 877 skb_put(skb, nbytes);
878 __skb_queue_tail(&list, skb);
879 }
872 880
881 while ((skb = __skb_dequeue(&list))) {
873 ath10k_dbg(ar, ATH10K_DBG_PCI, "pci rx ce pipe %d len %d\n", 882 ath10k_dbg(ar, ATH10K_DBG_PCI, "pci rx ce pipe %d len %d\n",
874 ce_state->id, skb->len); 883 ce_state->id, skb->len);
875 ath10k_dbg_dump(ar, ATH10K_DBG_PCI_DUMP, NULL, "pci rx: ", 884 ath10k_dbg_dump(ar, ATH10K_DBG_PCI_DUMP, NULL, "pci rx: ",
876 skb->data, skb->len); 885 skb->data, skb->len);
877 886
878 cb->rx_completion(ar, skb, pipe_info->pipe_num); 887 cb->rx_completion(ar, skb);
879 } 888 }
880 889
881 ath10k_pci_rx_post_pipe(pipe_info); 890 ath10k_pci_rx_post_pipe(pipe_info);
@@ -1263,7 +1272,7 @@ static void ath10k_pci_tx_pipe_cleanup(struct ath10k_pci_pipe *pci_pipe)
1263 id = MS(__le16_to_cpu(ce_desc[i].flags), 1272 id = MS(__le16_to_cpu(ce_desc[i].flags),
1264 CE_DESC_FLAGS_META_DATA); 1273 CE_DESC_FLAGS_META_DATA);
1265 1274
1266 ar_pci->msg_callbacks_current.tx_completion(ar, skb, id); 1275 ar_pci->msg_callbacks_current.tx_completion(ar, skb);
1267 } 1276 }
1268} 1277}
1269 1278
@@ -1988,6 +1997,7 @@ static int ath10k_pci_hif_resume(struct ath10k *ar)
1988static const struct ath10k_hif_ops ath10k_pci_hif_ops = { 1997static const struct ath10k_hif_ops ath10k_pci_hif_ops = {
1989 .tx_sg = ath10k_pci_hif_tx_sg, 1998 .tx_sg = ath10k_pci_hif_tx_sg,
1990 .diag_read = ath10k_pci_hif_diag_read, 1999 .diag_read = ath10k_pci_hif_diag_read,
2000 .diag_write = ath10k_pci_diag_write_mem,
1991 .exchange_bmi_msg = ath10k_pci_hif_exchange_bmi_msg, 2001 .exchange_bmi_msg = ath10k_pci_hif_exchange_bmi_msg,
1992 .start = ath10k_pci_hif_start, 2002 .start = ath10k_pci_hif_start,
1993 .stop = ath10k_pci_hif_stop, 2003 .stop = ath10k_pci_hif_stop,
@@ -1998,6 +2008,8 @@ static const struct ath10k_hif_ops ath10k_pci_hif_ops = {
1998 .get_free_queue_number = ath10k_pci_hif_get_free_queue_number, 2008 .get_free_queue_number = ath10k_pci_hif_get_free_queue_number,
1999 .power_up = ath10k_pci_hif_power_up, 2009 .power_up = ath10k_pci_hif_power_up,
2000 .power_down = ath10k_pci_hif_power_down, 2010 .power_down = ath10k_pci_hif_power_down,
2011 .read32 = ath10k_pci_read32,
2012 .write32 = ath10k_pci_write32,
2001#ifdef CONFIG_PM 2013#ifdef CONFIG_PM
2002 .suspend = ath10k_pci_hif_suspend, 2014 .suspend = ath10k_pci_hif_suspend,
2003 .resume = ath10k_pci_hif_resume, 2015 .resume = ath10k_pci_hif_resume,