rt2x00: Request usb_maxpacket() once

The usb max packet size won't change during the
device's presence. We should store it in a
variable inside rt2x00dev and use that.
This should also fix a division error when the
device is being hot-unplugged while a frame is
being send out.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Ivo van Doorn
2007-11-15 23:41:31 +01:00
committed by David S. Miller
parent 2ffbb8377c
commit b242e891c2
4 changed files with 17 additions and 10 deletions

View File

@ -418,7 +418,7 @@ struct rt2x00lib_ops {
int (*write_tx_data) (struct rt2x00_dev *rt2x00dev,
struct data_ring *ring, struct sk_buff *skb,
struct ieee80211_tx_control *control);
int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, int maxpacket,
int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev,
struct sk_buff *skb);
void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev,
unsigned int queue);
@ -598,6 +598,11 @@ struct rt2x00_dev {
*/
u32 *rf;
/*
* USB Max frame size (for rt2500usb & rt73usb).
*/
u16 usb_maxpacket;
/*
* Current TX power value.
*/