diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-11-15 17:41:31 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-11-18 21:47:37 -0500 |
commit | b242e891c218162cfbae064b1a9136cdbed5ee53 (patch) | |
tree | 3e460f49ffd103881082bc561d0536109517b617 /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | 2ffbb8377c7a0713baf6644e285adc27a5654582 (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index d1ad5251a77a..c8f16f161c28 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -418,7 +418,7 @@ struct rt2x00lib_ops { | |||
418 | int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, | 418 | int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, |
419 | struct data_ring *ring, struct sk_buff *skb, | 419 | struct data_ring *ring, struct sk_buff *skb, |
420 | struct ieee80211_tx_control *control); | 420 | struct ieee80211_tx_control *control); |
421 | int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, int maxpacket, | 421 | int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, |
422 | struct sk_buff *skb); | 422 | struct sk_buff *skb); |
423 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, | 423 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, |
424 | unsigned int queue); | 424 | unsigned int queue); |
@@ -599,6 +599,11 @@ struct rt2x00_dev { | |||
599 | u32 *rf; | 599 | u32 *rf; |
600 | 600 | ||
601 | /* | 601 | /* |
602 | * USB Max frame size (for rt2500usb & rt73usb). | ||
603 | */ | ||
604 | u16 usb_maxpacket; | ||
605 | |||
606 | /* | ||
602 | * Current TX power value. | 607 | * Current TX power value. |
603 | */ | 608 | */ |
604 | u16 tx_power; | 609 | u16 tx_power; |