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/6f9835db6bf6
branches:  trunk
changeset: 367639:6f9835db6bf6
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 be18faa4f0db -r 6f9835db6bf6 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
@@ -291,7 +291,7 @@
 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 *);
@@ -1520,11 +1520,8 @@
 }
 
 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();
@@ -1924,7 +1921,7 @@
                              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