aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00debug.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c13
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00lib.h6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h7
4 files changed, 13 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
index bfab3b8780d6..bd92cb8e68e0 100644
--- a/drivers/net/wireless/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
@@ -115,7 +115,7 @@ struct rt2x00debug_intf {
115}; 115};
116 116
117void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, 117void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
118 struct sk_buff *skb) 118 enum rt2x00_dump_type type, struct sk_buff *skb)
119{ 119{
120 struct rt2x00debug_intf *intf = rt2x00dev->debugfs_intf; 120 struct rt2x00debug_intf *intf = rt2x00dev->debugfs_intf;
121 struct skb_frame_desc *desc = get_skb_frame_desc(skb); 121 struct skb_frame_desc *desc = get_skb_frame_desc(skb);
@@ -148,7 +148,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
148 dump_hdr->chip_rt = cpu_to_le16(rt2x00dev->chip.rt); 148 dump_hdr->chip_rt = cpu_to_le16(rt2x00dev->chip.rt);
149 dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf); 149 dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf);
150 dump_hdr->chip_rev = cpu_to_le32(rt2x00dev->chip.rev); 150 dump_hdr->chip_rev = cpu_to_le32(rt2x00dev->chip.rev);
151 dump_hdr->type = cpu_to_le16(desc->frame_type); 151 dump_hdr->type = cpu_to_le16(type);
152 dump_hdr->queue_index = desc->entry->queue->qid; 152 dump_hdr->queue_index = desc->entry->queue->qid;
153 dump_hdr->entry_index = desc->entry->entry_idx; 153 dump_hdr->entry_index = desc->entry->entry_idx;
154 dump_hdr->timestamp_sec = cpu_to_le32(timestamp.tv_sec); 154 dump_hdr->timestamp_sec = cpu_to_le32(timestamp.tv_sec);
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 3a49c256789f..ea130f2eb008 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -28,7 +28,6 @@
28 28
29#include "rt2x00.h" 29#include "rt2x00.h"
30#include "rt2x00lib.h" 30#include "rt2x00lib.h"
31#include "rt2x00dump.h"
32 31
33/* 32/*
34 * Link tuning handlers 33 * Link tuning handlers
@@ -540,11 +539,9 @@ void rt2x00lib_txdone(struct queue_entry *entry,
540 * If send to mac80211, mac80211 will clean up the skb structure, 539 * If send to mac80211, mac80211 will clean up the skb structure,
541 * otherwise we have to do it ourself. 540 * otherwise we have to do it ourself.
542 */ 541 */
543 skbdesc = get_skb_frame_desc(entry->skb); 542 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TXDONE, entry->skb);
544 skbdesc->frame_type = DUMP_FRAME_TXDONE;
545
546 rt2x00debug_dump_frame(rt2x00dev, entry->skb);
547 543
544 skbdesc = get_skb_frame_desc(entry->skb);
548 if (!(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED)) 545 if (!(skbdesc->flags & FRAME_DESC_DRIVER_GENERATED))
549 ieee80211_tx_status_irqsafe(rt2x00dev->hw, 546 ieee80211_tx_status_irqsafe(rt2x00dev->hw,
550 entry->skb, &tx_status); 547 entry->skb, &tx_status);
@@ -610,8 +607,7 @@ void rt2x00lib_rxdone(struct queue_entry *entry,
610 * Send frame to mac80211 & debugfs. 607 * Send frame to mac80211 & debugfs.
611 * mac80211 will clean up the skb structure. 608 * mac80211 will clean up the skb structure.
612 */ 609 */
613 get_skb_frame_desc(entry->skb)->frame_type = DUMP_FRAME_RXDONE; 610 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_RXDONE, entry->skb);
614 rt2x00debug_dump_frame(rt2x00dev, entry->skb);
615 ieee80211_rx_irqsafe(rt2x00dev->hw, entry->skb, rx_status); 611 ieee80211_rx_irqsafe(rt2x00dev->hw, entry->skb, rx_status);
616 entry->skb = NULL; 612 entry->skb = NULL;
617} 613}
@@ -752,8 +748,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
752 * frame to the device, but we are going to push the 748 * frame to the device, but we are going to push the
753 * frame to debugfs here. 749 * frame to debugfs here.
754 */ 750 */
755 skbdesc->frame_type = DUMP_FRAME_TX; 751 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_TX, skb);
756 rt2x00debug_dump_frame(rt2x00dev, skb);
757} 752}
758EXPORT_SYMBOL_GPL(rt2x00lib_write_tx_desc); 753EXPORT_SYMBOL_GPL(rt2x00lib_write_tx_desc);
759 754
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 41ee02cd2825..c4ce534e3cdb 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -26,6 +26,8 @@
26#ifndef RT2X00LIB_H 26#ifndef RT2X00LIB_H
27#define RT2X00LIB_H 27#define RT2X00LIB_H
28 28
29#include "rt2x00dump.h"
30
29/* 31/*
30 * Interval defines 32 * Interval defines
31 * Both the link tuner as the rfkill will be called once per second. 33 * Both the link tuner as the rfkill will be called once per second.
@@ -128,7 +130,8 @@ static inline void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
128#ifdef CONFIG_RT2X00_LIB_DEBUGFS 130#ifdef CONFIG_RT2X00_LIB_DEBUGFS
129void rt2x00debug_register(struct rt2x00_dev *rt2x00dev); 131void rt2x00debug_register(struct rt2x00_dev *rt2x00dev);
130void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev); 132void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev);
131void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); 133void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
134 enum rt2x00_dump_type type, struct sk_buff *skb);
132#else 135#else
133static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) 136static inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
134{ 137{
@@ -139,6 +142,7 @@ static inline void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev)
139} 142}
140 143
141static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, 144static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
145 enum rt2x00_dump_type type,
142 struct sk_buff *skb) 146 struct sk_buff *skb)
143{ 147{
144} 148}
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index d1707a7ca41f..c3493ed7f4c3 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -109,7 +109,6 @@ enum skb_frame_desc_flags {
109 * this structure should not exceed the size of that array (48 bytes). 109 * this structure should not exceed the size of that array (48 bytes).
110 * 110 *
111 * @flags: Frame flags, see &enum skb_frame_desc_flags. 111 * @flags: Frame flags, see &enum skb_frame_desc_flags.
112 * @frame_type: Frame type, see &enum rt2x00_dump_type.
113 * @data: Pointer to data part of frame (Start of ieee80211 header). 112 * @data: Pointer to data part of frame (Start of ieee80211 header).
114 * @desc: Pointer to descriptor part of the frame. 113 * @desc: Pointer to descriptor part of the frame.
115 * Note that this pointer could point to something outside 114 * Note that this pointer could point to something outside
@@ -121,14 +120,12 @@ enum skb_frame_desc_flags {
121struct skb_frame_desc { 120struct skb_frame_desc {
122 unsigned int flags; 121 unsigned int flags;
123 122
124 unsigned int frame_type; 123 unsigned short data_len;
124 unsigned short desc_len;
125 125
126 void *data; 126 void *data;
127 void *desc; 127 void *desc;
128 128
129 unsigned int data_len;
130 unsigned int desc_len;
131
132 struct queue_entry *entry; 129 struct queue_entry *entry;
133}; 130};
134 131