diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2008-08-11 07:01:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-11 11:10:28 -0400 |
commit | 69da6b87fcb270f758fe75141c32e041f8db510c (patch) | |
tree | 6e68be8ee39eaf96347a41e31348f714db2ca24f /drivers/net/wireless/ath9k/main.c | |
parent | e550dfb0c2c31b6363aa463a035fc9f8dcaa3c9b (diff) |
ath9k: Assign seq# when mac80211 requests this
Use TX control flag IEEE80211_TX_CTL_ASSIGN_SEQ as a request to update
the seq# for the frames. This will likely require some further cleanup
to get seq# correctly for Beacons vs. other frames and also potentially
for multiple BSSes. Anyway, this is better than ending up sending out
most frames with seq# 0.
(This is a backport of patch w/ same title already in net-next-2.6.
It is verified to fix http://bugzilla.kernel.org/show_bug.cgi?id=11394
and it should be acceptable for -rc due to the driver being new
in 2.6.27.)
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index c5107f269f24..99badf1404c3 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -369,6 +369,20 @@ static int ath9k_tx(struct ieee80211_hw *hw, | |||
369 | { | 369 | { |
370 | struct ath_softc *sc = hw->priv; | 370 | struct ath_softc *sc = hw->priv; |
371 | int hdrlen, padsize; | 371 | int hdrlen, padsize; |
372 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
373 | |||
374 | /* | ||
375 | * As a temporary workaround, assign seq# here; this will likely need | ||
376 | * to be cleaned up to work better with Beacon transmission and virtual | ||
377 | * BSSes. | ||
378 | */ | ||
379 | if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | ||
380 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | ||
381 | if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) | ||
382 | sc->seq_no += 0x10; | ||
383 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
384 | hdr->seq_ctrl |= cpu_to_le16(sc->seq_no); | ||
385 | } | ||
372 | 386 | ||
373 | /* Add the padding after the header if this is not already done */ | 387 | /* Add the padding after the header if this is not already done */ |
374 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); | 388 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); |