aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/wlan
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2023-02-07 16:10:10 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2023-03-06 16:04:15 +0000
commit935b194ded5dc555fc14e3d2f4c72e58cff39566 (patch)
tree08ce64eb3705f437f671980a51737cf6a7efe64d /sys/dev/usb/wlan
parent70510800d1ada1a92dc22bc74e57e9bb4fbaccc3 (diff)
Diffstat (limited to 'sys/dev/usb/wlan')
-rw-r--r--sys/dev/usb/wlan/if_rsu.c14
-rw-r--r--sys/dev/usb/wlan/if_run.c10
-rw-r--r--sys/dev/usb/wlan/if_upgt.c2
3 files changed, 13 insertions, 13 deletions
diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c
index b1939a0ab9f2..758d25f776da 100644
--- a/sys/dev/usb/wlan/if_rsu.c
+++ b/sys/dev/usb/wlan/if_rsu.c
@@ -684,7 +684,7 @@ rsu_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
struct rsu_softc *sc = ic->ic_softc;
struct rsu_vap *uvp;
struct ieee80211vap *vap;
- struct ifnet *ifp;
+ if_t ifp;
if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */
return (NULL);
@@ -700,10 +700,10 @@ rsu_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
}
ifp = vap->iv_ifp;
- ifp->if_capabilities = IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6;
+ if_setcapabilities(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
RSU_LOCK(sc);
if (sc->sc_rx_checksum_enable)
- ifp->if_capenable |= IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6;
+ if_setcapenablebit(ifp, IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6, 0);
RSU_UNLOCK(sc);
/* override state transition machine */
@@ -3036,11 +3036,11 @@ rsu_ioctl_net(struct ieee80211com *ic, u_long cmd, void *data)
IEEE80211_LOCK(ic); /* XXX */
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
- struct ifnet *ifp = vap->iv_ifp;
+ if_t ifp = vap->iv_ifp;
- ifp->if_capenable &=
- ~(IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
- ifp->if_capenable |= rxmask;
+ if_setcapenablebit(ifp, 0,
+ IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6);
+ if_setcapenablebit(ifp, rxmask, 0);
}
IEEE80211_UNLOCK(ic);
break;
diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c
index 07c62ac72f18..c3d5aed623ed 100644
--- a/sys/dev/usb/wlan/if_run.c
+++ b/sys/dev/usb/wlan/if_run.c
@@ -414,7 +414,7 @@ static void run_get_txpower(struct run_softc *);
static int run_read_eeprom(struct run_softc *);
static struct ieee80211_node *run_node_alloc(struct ieee80211vap *,
const uint8_t mac[IEEE80211_ADDR_LEN]);
-static int run_media_change(struct ifnet *);
+static int run_media_change(if_t);
static int run_newstate(struct ieee80211vap *, enum ieee80211_state, int);
static int run_wme_update(struct ieee80211com *);
static void run_key_set_cb(void *);
@@ -2116,9 +2116,9 @@ run_node_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN])
}
static int
-run_media_change(struct ifnet *ifp)
+run_media_change(if_t ifp)
{
- struct ieee80211vap *vap = ifp->if_softc;
+ struct ieee80211vap *vap = if_getsoftc(ifp);
struct ieee80211com *ic = vap->iv_ic;
const struct ieee80211_txparam *tp;
struct run_softc *sc = ic->ic_softc;
@@ -2154,8 +2154,8 @@ run_media_change(struct ifnet *ifp)
}
#if 0
- if ((ifp->if_flags & IFF_UP) &&
- (ifp->if_drv_flags & RUN_RUNNING)){
+ if ((if_getflags(ifp) & IFF_UP) &&
+ (if_getdrvflags(ifp) & RUN_RUNNING)){
run_init_locked(sc);
}
#endif
diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c
index 8fb4c82a07d3..5d3f742381d2 100644
--- a/sys/dev/usb/wlan/if_upgt.c
+++ b/sys/dev/usb/wlan/if_upgt.c
@@ -2192,7 +2192,7 @@ done:
* will stall. It's strange, but it works, so we keep reading
* the statistics here. *shrug*
*/
- if (!(vap->iv_ifp->if_get_counter(vap->iv_ifp, IFCOUNTER_OPACKETS) %
+ if (!(if_getcounter(vap->iv_ifp, IFCOUNTER_OPACKETS) %
UPGT_TX_STAT_INTERVAL))
upgt_get_stats(sc);