Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111947
b: refs/heads/master
c: 459f5f9
h: refs/heads/master
i:
  111945: 7d567ab
  111943: bcf3763
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Sep 24, 2008
1 parent 016606a commit d9d358d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 980b24da6f1725c2d0b32c9484d06cd7d09d3c4b
refs/heads/master: 459f5f90f1bd959ced04761406415b178b315177
9 changes: 6 additions & 3 deletions trunk/drivers/net/wireless/ath9k/beacon.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

/* Implementation of beacon processing. */

#include <asm/unaligned.h>
#include "core.h"

/*
Expand Down Expand Up @@ -305,6 +304,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
struct ieee80211_hdr *hdr;
struct ath_buf *bf;
struct sk_buff *skb;
__le64 tstamp;

avp = sc->sc_vaps[if_id];
ASSERT(avp);
Expand Down Expand Up @@ -370,6 +370,9 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
return -ENOMEM;
}

tstamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
sc->bc_tstamp = le64_to_cpu(tstamp);

/*
* Calculate a TSF adjustment factor required for
* staggered beacons. Note that we assume the format
Expand Down Expand Up @@ -669,8 +672,8 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
conf.bmiss_timeout = ATH_DEFAULT_BMISS_LIMIT * conf.beacon_interval;

/* extract tstamp from last beacon and convert to TU */
nexttbtt = TSF_TO_TU(get_unaligned_le32(conf.u.last_tstamp + 4),
get_unaligned_le32(conf.u.last_tstamp));
nexttbtt = TSF_TO_TU(sc->bc_tstamp >> 32, sc->bc_tstamp);

/* XXX conditionalize multi-bss support? */
if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) {
/*
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath9k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ struct ath_softc {
u32 sc_bhalq;
u32 sc_bmisscount;
u32 ast_be_xmit; /* beacons transmitted */
u64 bc_tstamp;

/* Rate */
struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX];
Expand Down

0 comments on commit d9d358d

Please sign in to comment.