diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index bd1546ba7ad2..b45bc24c3dae 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -113,26 +113,6 @@ int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev, | |||
113 | const u16 offset, void *buffer, | 113 | const u16 offset, void *buffer, |
114 | const u16 buffer_length, const int timeout) | 114 | const u16 buffer_length, const int timeout) |
115 | { | 115 | { |
116 | int status; | ||
117 | |||
118 | mutex_lock(&rt2x00dev->csr_mutex); | ||
119 | |||
120 | status = rt2x00usb_vendor_req_buff_lock(rt2x00dev, request, | ||
121 | requesttype, offset, buffer, | ||
122 | buffer_length, timeout); | ||
123 | |||
124 | mutex_unlock(&rt2x00dev->csr_mutex); | ||
125 | |||
126 | return status; | ||
127 | } | ||
128 | EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff); | ||
129 | |||
130 | int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev, | ||
131 | const u8 request, const u8 requesttype, | ||
132 | const u16 offset, const void *buffer, | ||
133 | const u16 buffer_length, | ||
134 | const int timeout) | ||
135 | { | ||
136 | int status = 0; | 116 | int status = 0; |
137 | unsigned char *tb; | 117 | unsigned char *tb; |
138 | u16 off, len, bsize; | 118 | u16 off, len, bsize; |
@@ -157,7 +137,7 @@ int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev, | |||
157 | 137 | ||
158 | return status; | 138 | return status; |
159 | } | 139 | } |
160 | EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_large_buff); | 140 | EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff); |
161 | 141 | ||
162 | int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev, | 142 | int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev, |
163 | const unsigned int offset, | 143 | const unsigned int offset, |
@@ -198,6 +178,11 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
198 | return; | 178 | return; |
199 | 179 | ||
200 | /* | 180 | /* |
181 | * Remove the descriptor from the front of the skb. | ||
182 | */ | ||
183 | skb_pull(entry->skb, entry->queue->desc_size); | ||
184 | |||
185 | /* | ||
201 | * Obtain the status about this packet. | 186 | * Obtain the status about this packet. |
202 | * Note that when the status is 0 it does not mean the | 187 | * Note that when the status is 0 it does not mean the |
203 | * frame was send out correctly. It only means the frame | 188 | * frame was send out correctly. It only means the frame |
@@ -243,10 +228,10 @@ int rt2x00usb_write_tx_data(struct queue_entry *entry, | |||
243 | rt2x00usb_interrupt_txdone, entry); | 228 | rt2x00usb_interrupt_txdone, entry); |
244 | 229 | ||
245 | /* | 230 | /* |
246 | * Make sure the skb->data pointer points to the frame, not the | 231 | * Call the driver's write_tx_datadesc function, if it exists. |
247 | * descriptor. | ||
248 | */ | 232 | */ |
249 | skb_pull(entry->skb, entry->queue->desc_size); | 233 | if (rt2x00dev->ops->lib->write_tx_datadesc) |
234 | rt2x00dev->ops->lib->write_tx_datadesc(entry, txdesc); | ||
250 | 235 | ||
251 | return 0; | 236 | return 0; |
252 | } | 237 | } |