Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/net80211 Replace IFF_OACTIVE (abused here) by a pe...
details: https://anonhg.NetBSD.org/src-all/rev/817a4fff1a25
branches: trunk
changeset: 375278:817a4fff1a25
user: Martin Husemann <martin%NetBSD.org@localhost>
date: Tue Sep 20 20:43:21 2022 +0200
description:
Replace IFF_OACTIVE (abused here) by a per-VAP "not ready yet" flag.
diffstat:
sys/net80211/ieee80211_output.c | 6 +++---
sys/net80211/ieee80211_proto.c | 2 +-
sys/net80211/ieee80211_var.h | 4 ++++
3 files changed, 8 insertions(+), 4 deletions(-)
diffs (59 lines):
diff -r 2cce25c62fe5 -r 817a4fff1a25 sys/net80211/ieee80211_output.c
--- a/sys/net80211/ieee80211_output.c Tue Sep 20 20:31:04 2022 +0200
+++ b/sys/net80211/ieee80211_output.c Tue Sep 20 20:43:21 2022 +0200
@@ -540,7 +540,7 @@ ieee80211_vap_transmit(struct ifnet *ifp
#if __FreeBSD__
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
#elif __NetBSD__
- ifp->if_flags |= IFF_OACTIVE;
+ vap->iv_not_ready = 1;
#endif
m_freem(m);
if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
@@ -788,10 +788,11 @@ ieee80211_output(struct ifnet *ifp, stru
int error;
int ret;
+ vap = ifp->if_softc;
#if __FreeBSD__
if (ifp->if_drv_flags & IFF_DRV_OACTIVE) {
#elif __NetBSD__
- if (ifp->if_flags & IFF_OACTIVE) {
+ if (vap->iv_not_ready) {
#endif
/*
* Short-circuit requests if the vap is marked OACTIVE
@@ -803,7 +804,6 @@ ieee80211_output(struct ifnet *ifp, stru
*/
senderr(ENETDOWN);
}
- vap = ifp->if_softc;
ic = vap->iv_ic;
/*
* Hand to the 802.3 code if not tagged as
diff -r 2cce25c62fe5 -r 817a4fff1a25 sys/net80211/ieee80211_proto.c
--- a/sys/net80211/ieee80211_proto.c Tue Sep 20 20:31:04 2022 +0200
+++ b/sys/net80211/ieee80211_proto.c Tue Sep 20 20:43:21 2022 +0200
@@ -2288,7 +2288,7 @@ ieee80211_newstate_cb(void *xvap, int np
#if __FreeBSD__
vap->iv_ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
#elif __NetBSD__
- vap->iv_ifp->if_flags &= ~IFF_OACTIVE;
+ vap->iv_not_ready = 0; /* no OACTIVE on NetBSD */
#endif
/*
diff -r 2cce25c62fe5 -r 817a4fff1a25 sys/net80211/ieee80211_var.h
--- a/sys/net80211/ieee80211_var.h Tue Sep 20 20:31:04 2022 +0200
+++ b/sys/net80211/ieee80211_var.h Tue Sep 20 20:43:21 2022 +0200
@@ -420,6 +420,10 @@ struct ieee80211vap {
uint32_t iv_flags; /* state flags */
uint32_t iv_flags_ext; /* extended state flags */
+#if __NetBSD__
+ uint32_t iv_not_ready; /* block TX untill we enter
+ * RUN state */
+#endif
uint32_t iv_flags_ht; /* HT state flags */
uint32_t iv_flags_ven; /* vendor state flags */
uint32_t iv_ifflags; /* ifnet flags */
Home |
Main Index |
Thread Index |
Old Index