summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/beacon.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2008-08-11 14:01:50 +0300
committerJohn W. Linville <linville@tuxdriver.com>2008-09-11 11:10:28 -0400
commit69da6b87fcb270f758fe75141c32e041f8db510c (patch)
tree6e68be8ee39eaf96347a41e31348f714db2ca24f /drivers/net/wireless/ath9k/beacon.c
parente550dfb0c2c31b6363aa463a035fc9f8dcaa3c9b (diff)
downloadlinux-69da6b87fcb270f758fe75141c32e041f8db510c.tar.gz
linux-69da6b87fcb270f758fe75141c32e041f8db510c.tar.bz2
linux-69da6b87fcb270f758fe75141c32e041f8db510c.zip
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/beacon.c')
-rw-r--r--drivers/net/wireless/ath9k/beacon.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c
index caf569401a34..00a0eaa08866 100644
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -209,6 +209,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
unsigned int curlen;
struct ath_txq *cabq;
struct ath_txq *mcastq;
+ struct ieee80211_tx_info *info;
avp = sc->sc_vaps[if_id];
mcastq = &avp->av_mcastq;
@@ -232,6 +233,18 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
*/
curlen = skb->len;
+ info = IEEE80211_SKB_CB(skb);
+ if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+ /*
+ * TODO: make sure the seq# gets assigned properly (vs. other
+ * TX frames)
+ */
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
+ sc->seq_no += 0x10;
+ hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
+ hdr->seq_ctrl |= cpu_to_le16(sc->seq_no);
+ }
+
/* XXX: spin_lock_bh should not be used here, but sparse bitches
* otherwise. We should fix sparse :) */
spin_lock_bh(&mcastq->axq_lock);