diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2008-07-28 23:08:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-07-29 16:55:08 -0400 |
commit | 1f690d7b549ef9c7424536475501885dd5b54930 (patch) | |
tree | 1515e6e63f8aeb29a7a60afcb3783529b8f8cb53 | |
parent | 5422399518e8142198df888aab00acdac251f754 (diff) |
rtl8187: Fix for TX sequence number problem
"mac80211: fix TX sequence numbers" broke rtl8187. This
patch makes the same kind of fix that was done for rt2x00. Note that
this code will have to be reworked for proper sequence numbers on beacons.
In addition, the sequence number has been placed in the hardware state,
not the vif state.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rtl8187.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rtl8187_dev.c | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtl8187.h b/drivers/net/wireless/rtl8187.h index 3afb49f8866a..8961901b5c04 100644 --- a/drivers/net/wireless/rtl8187.h +++ b/drivers/net/wireless/rtl8187.h | |||
@@ -100,6 +100,7 @@ struct rtl8187_priv { | |||
100 | struct usb_device *udev; | 100 | struct usb_device *udev; |
101 | u32 rx_conf; | 101 | u32 rx_conf; |
102 | u16 txpwr_base; | 102 | u16 txpwr_base; |
103 | u16 seqno; | ||
103 | u8 asic_rev; | 104 | u8 asic_rev; |
104 | u8 is_rtl8187b; | 105 | u8 is_rtl8187b; |
105 | enum { | 106 | enum { |
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index d3067b1216ca..7ff03aca2518 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -169,6 +169,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
169 | { | 169 | { |
170 | struct rtl8187_priv *priv = dev->priv; | 170 | struct rtl8187_priv *priv = dev->priv; |
171 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 171 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
172 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; | ||
172 | unsigned int ep; | 173 | unsigned int ep; |
173 | void *buf; | 174 | void *buf; |
174 | struct urb *urb; | 175 | struct urb *urb; |
@@ -234,6 +235,20 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
234 | ep = epmap[skb_get_queue_mapping(skb)]; | 235 | ep = epmap[skb_get_queue_mapping(skb)]; |
235 | } | 236 | } |
236 | 237 | ||
238 | /* FIXME: The sequence that follows is needed for this driver to | ||
239 | * work with mac80211 since "mac80211: fix TX sequence numbers". | ||
240 | * As with the temporary code in rt2x00, changes will be needed | ||
241 | * to get proper sequence numbers on beacons. In addition, this | ||
242 | * patch places the sequence number in the hardware state, which | ||
243 | * limits us to a single virtual state. | ||
244 | */ | ||
245 | if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | ||
246 | if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) | ||
247 | priv->seqno += 0x10; | ||
248 | ieee80211hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
249 | ieee80211hdr->seq_ctrl |= cpu_to_le16(priv->seqno); | ||
250 | } | ||
251 | |||
237 | info->driver_data[0] = dev; | 252 | info->driver_data[0] = dev; |
238 | info->driver_data[1] = urb; | 253 | info->driver_data[1] = urb; |
239 | 254 | ||