020-05-rt2x00-call-entry-directly-in-rt2x00_dump_frame.patch 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. From 2ceb813798e1fd33e71a574771828c0f298e077b Mon Sep 17 00:00:00 2001
  2. From: Stanislaw Gruszka <sgruszka@redhat.com>
  3. Date: Wed, 8 Feb 2017 13:51:30 +0100
  4. Subject: [PATCH 05/19] rt2x00: call entry directly in rt2x00_dump_frame
  5. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
  6. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  7. ---
  8. drivers/net/wireless/ralink/rt2x00/rt2400pci.c | 2 +-
  9. drivers/net/wireless/ralink/rt2x00/rt2500pci.c | 2 +-
  10. drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 2 +-
  11. drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 2 +-
  12. drivers/net/wireless/ralink/rt2x00/rt2x00.h | 4 ++--
  13. drivers/net/wireless/ralink/rt2x00/rt2x00debug.c | 7 ++++---
  14. drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 4 ++--
  15. drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 2 +-
  16. drivers/net/wireless/ralink/rt2x00/rt61pci.c | 2 +-
  17. drivers/net/wireless/ralink/rt2x00/rt73usb.c | 2 +-
  18. 10 files changed, 15 insertions(+), 14 deletions(-)
  19. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
  20. index 085c5b423bdf..19874439ac40 100644
  21. --- a/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
  22. +++ b/drivers/net/wireless/ralink/rt2x00/rt2400pci.c
  23. @@ -1200,7 +1200,7 @@ static void rt2400pci_write_beacon(struct queue_entry *entry,
  24. /*
  25. * Dump beacon to userspace through debugfs.
  26. */
  27. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
  28. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry);
  29. out:
  30. /*
  31. * Enable beaconing again.
  32. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
  33. index 9832fd50c793..791434de8052 100644
  34. --- a/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
  35. +++ b/drivers/net/wireless/ralink/rt2x00/rt2500pci.c
  36. @@ -1349,7 +1349,7 @@ static void rt2500pci_write_beacon(struct queue_entry *entry,
  37. /*
  38. * Dump beacon to userspace through debugfs.
  39. */
  40. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
  41. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry);
  42. out:
  43. /*
  44. * Enable beaconing again.
  45. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
  46. index cd3ab5a9e98d..62357465fe29 100644
  47. --- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
  48. +++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
  49. @@ -1170,7 +1170,7 @@ static void rt2500usb_write_beacon(struct queue_entry *entry,
  50. /*
  51. * Dump beacon to userspace through debugfs.
  52. */
  53. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
  54. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry);
  55. /*
  56. * USB devices cannot blindly pass the skb->len as the
  57. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  58. index 572cdea4ca25..8223a1520316 100644
  59. --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  60. +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
  61. @@ -1014,7 +1014,7 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc)
  62. /*
  63. * Dump beacon to userspace through debugfs.
  64. */
  65. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
  66. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry);
  67. /*
  68. * Write entire beacon with TXWI and padding to register.
  69. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
  70. index ea299c4e7ada..26869b3bef45 100644
  71. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
  72. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
  73. @@ -1400,11 +1400,11 @@ void rt2x00queue_flush_queues(struct rt2x00_dev *rt2x00dev, bool drop);
  74. */
  75. #ifdef CPTCFG_RT2X00_LIB_DEBUGFS
  76. void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
  77. - enum rt2x00_dump_type type, struct sk_buff *skb);
  78. + enum rt2x00_dump_type type, struct queue_entry *entry);
  79. #else
  80. static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
  81. enum rt2x00_dump_type type,
  82. - struct sk_buff *skb)
  83. + struct queue_entry *entry)
  84. {
  85. }
  86. #endif /* CPTCFG_RT2X00_LIB_DEBUGFS */
  87. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
  88. index 72ae530e4a3b..964aefdc11f0 100644
  89. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
  90. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00debug.c
  91. @@ -157,9 +157,10 @@ void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
  92. }
  93. void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
  94. - enum rt2x00_dump_type type, struct sk_buff *skb)
  95. + enum rt2x00_dump_type type, struct queue_entry *entry)
  96. {
  97. struct rt2x00debug_intf *intf = rt2x00dev->debugfs_intf;
  98. + struct sk_buff *skb = entry->skb;
  99. struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb);
  100. struct sk_buff *skbcopy;
  101. struct rt2x00dump_hdr *dump_hdr;
  102. @@ -196,8 +197,8 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
  103. dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf);
  104. dump_hdr->chip_rev = cpu_to_le16(rt2x00dev->chip.rev);
  105. dump_hdr->type = cpu_to_le16(type);
  106. - dump_hdr->queue_index = skbdesc->entry->queue->qid;
  107. - dump_hdr->entry_index = skbdesc->entry->entry_idx;
  108. + dump_hdr->queue_index = entry->queue->qid;
  109. + dump_hdr->entry_index = entry->entry_idx;
  110. dump_hdr->timestamp_sec = cpu_to_le32(timestamp.tv_sec);
  111. dump_hdr->timestamp_usec = cpu_to_le32(timestamp.tv_usec);
  112. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  113. index 4b08007f93f7..dd6678109b7e 100644
  114. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  115. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  116. @@ -363,7 +363,7 @@ void rt2x00lib_txdone(struct queue_entry *entry,
  117. * Send frame to debugfs immediately, after this call is completed
  118. * we are going to overwrite the skb->cb array.
  119. */
  120. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TXDONE, entry->skb);
  121. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TXDONE, entry);
  122. /*
  123. * Determine if the frame has been successfully transmitted and
  124. @@ -772,7 +772,7 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp)
  125. */
  126. rt2x00link_update_stats(rt2x00dev, entry->skb, &rxdesc);
  127. rt2x00debug_update_crypto(rt2x00dev, &rxdesc);
  128. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_RXDONE, entry->skb);
  129. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_RXDONE, entry);
  130. /*
  131. * Initialize RX status information, and send frame
  132. diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
  133. index b2364d378774..380daf4e1b8d 100644
  134. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
  135. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
  136. @@ -544,7 +544,7 @@ static void rt2x00queue_write_tx_descriptor(struct queue_entry *entry,
  137. * All processing on the frame has been completed, this means
  138. * it is now ready to be dumped to userspace through debugfs.
  139. */
  140. - rt2x00debug_dump_frame(queue->rt2x00dev, DUMP_FRAME_TX, entry->skb);
  141. + rt2x00debug_dump_frame(queue->rt2x00dev, DUMP_FRAME_TX, entry);
  142. }
  143. static void rt2x00queue_kick_tx_queue(struct data_queue *queue,
  144. diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
  145. index 8adb5f3abe15..973d418b8113 100644
  146. --- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c
  147. +++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c
  148. @@ -1988,7 +1988,7 @@ static void rt61pci_write_beacon(struct queue_entry *entry,
  149. /*
  150. * Dump beacon to userspace through debugfs.
  151. */
  152. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
  153. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry);
  154. /*
  155. * Write entire beacon with descriptor and padding to register.
  156. diff --git a/drivers/net/wireless/ralink/rt2x00/rt73usb.c b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
  157. index 1a29c4d205a5..bb8d307a789f 100644
  158. --- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c
  159. +++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c
  160. @@ -1557,7 +1557,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry,
  161. /*
  162. * Dump beacon to userspace through debugfs.
  163. */
  164. - rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry->skb);
  165. + rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_BEACON, entry);
  166. /*
  167. * Write entire beacon with descriptor and padding to register.
  168. --
  169. 2.12.1