aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187_dev.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-10 07:21:59 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:12 -0400
commit94778280fabdb6bc76db5509bd95859f1141385b (patch)
tree795a20eed458dacab69a345c33467523a2a8dbe1 /drivers/net/wireless/rtl8187_dev.c
parent2e20cc3986cbee410fbe8e3e116bdcb12d70fcce (diff)
mac80211: provide sequence numbers
I've come to think that not providing sequence numbers for the normal STA mode case was a mistake, at least two drivers now had to implement code they wouldn't otherwise need, and I believe at76_usb and adm8211 might be broken. This patch makes mac80211 assign a sequence number to all those frames that need one except beacons. That means that if a driver only implements modes that do not do beaconing it need not worry about the sequence number. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl8187_dev.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index 2c69ab37c650..16f2fe2d849e 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -241,20 +241,6 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
241 ep = epmap[skb_get_queue_mapping(skb)]; 241 ep = epmap[skb_get_queue_mapping(skb)];
242 } 242 }
243 243
244 /* FIXME: The sequence that follows is needed for this driver to
245 * work with mac80211 since "mac80211: fix TX sequence numbers".
246 * As with the temporary code in rt2x00, changes will be needed
247 * to get proper sequence numbers on beacons. In addition, this
248 * patch places the sequence number in the hardware state, which
249 * limits us to a single virtual state.
250 */
251 if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
252 if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
253 priv->seqno += 0x10;
254 ieee80211hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
255 ieee80211hdr->seq_ctrl |= cpu_to_le16(priv->seqno);
256 }
257
258 info->driver_data[0] = dev; 244 info->driver_data[0] = dev;
259 info->driver_data[1] = urb; 245 info->driver_data[1] = urb;
260 246
@@ -1187,6 +1173,10 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1187 dev->max_signal = 65; 1173 dev->max_signal = 65;
1188 } 1174 }
1189 1175
1176 /*
1177 * XXX: Once this driver supports anything that requires
1178 * beacons it must implement IEEE80211_TX_CTL_ASSIGN_SEQ.
1179 */
1190 dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); 1180 dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
1191 1181
1192 if ((id->driver_info == DEVICE_RTL8187) && priv->is_rtl8187b) 1182 if ((id->driver_info == DEVICE_RTL8187) && priv->is_rtl8187b)