Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/usb Pass the current ieee80211 node info to ur...



details:   https://anonhg.NetBSD.org/src-all/rev/a4dd2de39162
branches:  trunk
changeset: 375208:a4dd2de39162
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Sun Feb 20 11:17:30 2022 +0100

description:
Pass the current ieee80211 node info to urtwn_tsf_sync_enable so
we have quick access to the current timestamp data.

diffstat:

 sys/dev/usb/if_urtwn.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (34 lines):

diff -r 462c7cd0ba33 -r a4dd2de39162 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Sun Feb 20 11:02:45 2022 +0100
+++ b/sys/dev/usb/if_urtwn.c    Sun Feb 20 11:17:30 2022 +0100
@@ -292,7 +292,7 @@ static void urtwn_r88e_read_rom(struct u
 static int     urtwn_ra_init(struct ieee80211vap *);
 static int     urtwn_get_nettype(struct urtwn_softc *);
 static void    urtwn_set_nettype0_msr(struct urtwn_softc *, uint8_t);
-static void    urtwn_tsf_sync_enable(struct urtwn_softc *);
+static void    urtwn_tsf_sync_enable(struct urtwn_softc *, struct ieee80211_node *);
 static void    urtwn_set_led(struct urtwn_softc *, int, int);
 static void    urtwn_calib_to(void *);
 static void    urtwn_calib_to_cb(struct urtwn_softc *, void *);
@@ -1521,11 +1521,8 @@ urtwn_set_nettype0_msr(struct urtwn_soft
 }
 
 static void
-urtwn_tsf_sync_enable(struct urtwn_softc *sc)
+urtwn_tsf_sync_enable(struct urtwn_softc *sc, struct ieee80211_node *ni)
 {
-       struct ieee80211vap *vap  = TAILQ_FIRST(&sc->sc_uw.uw_ic.ic_vaps);
-/* XXX VAP is wrong */
-       struct ieee80211_node *ni = vap->iv_bss;
        uint64_t tsf;
 
        URTWNHIST_FUNC(); URTWNHIST_CALLED();
@@ -1925,7 +1922,7 @@ urtwn_newstate(struct ieee80211vap *vap,
                              R92C_RCR_CBSSID_DATA | R92C_RCR_CBSSID_BCN);
 
                        /* Enable TSF synchronization. */
-                       urtwn_tsf_sync_enable(sc);
+                       urtwn_tsf_sync_enable(sc, ni);
 
                        msr |= R92C_MSR_INFRA;
                        break;



Home | Main Index | Thread Index | Old Index