diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 91b62ddbf9f0..a54f6873e9ea 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -34,6 +34,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
34 | struct sk_buff *frag_skb, | 34 | struct sk_buff *frag_skb, |
35 | struct ieee80211_tx_control *control) | 35 | struct ieee80211_tx_control *control) |
36 | { | 36 | { |
37 | struct skb_frame_desc *skbdesc; | ||
37 | struct sk_buff *skb; | 38 | struct sk_buff *skb; |
38 | int size; | 39 | int size; |
39 | 40 | ||
@@ -60,6 +61,13 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
60 | frag_skb->data, frag_skb->len, control, | 61 | frag_skb->data, frag_skb->len, control, |
61 | (struct ieee80211_rts *)(skb->data)); | 62 | (struct ieee80211_rts *)(skb->data)); |
62 | 63 | ||
64 | /* | ||
65 | * Initialize skb descriptor | ||
66 | */ | ||
67 | skbdesc = get_skb_frame_desc(skb); | ||
68 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
69 | skbdesc->flags |= FRAME_DESC_DRIVER_GENERATED; | ||
70 | |||
63 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { | 71 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { |
64 | WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); | 72 | WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); |
65 | return NETDEV_TX_BUSY; | 73 | return NETDEV_TX_BUSY; |
@@ -74,6 +82,7 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
74 | struct rt2x00_dev *rt2x00dev = hw->priv; | 82 | struct rt2x00_dev *rt2x00dev = hw->priv; |
75 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; | 83 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; |
76 | struct data_queue *queue; | 84 | struct data_queue *queue; |
85 | struct skb_frame_desc *skbdesc; | ||
77 | u16 frame_control; | 86 | u16 frame_control; |
78 | 87 | ||
79 | /* | 88 | /* |
@@ -121,6 +130,12 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
121 | } | 130 | } |
122 | } | 131 | } |
123 | 132 | ||
133 | /* | ||
134 | * Initialize skb descriptor | ||
135 | */ | ||
136 | skbdesc = get_skb_frame_desc(skb); | ||
137 | memset(skbdesc, 0, sizeof(*skbdesc)); | ||
138 | |||
124 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { | 139 | if (rt2x00dev->ops->lib->write_tx_data(rt2x00dev, queue, skb, control)) { |
125 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); | 140 | ieee80211_stop_queue(rt2x00dev->hw, control->queue); |
126 | return NETDEV_TX_BUSY; | 141 | return NETDEV_TX_BUSY; |