git: 76614fdc8c7b - main - Mechanically convert iwi(4) and iwn(4) to IfAPI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Feb 2023 17:53:58 UTC
The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=76614fdc8c7b1a1a6f35471c91a247a91d70500c commit 76614fdc8c7b1a1a6f35471c91a247a91d70500c Author: Justin Hibbits <jhibbits@FreeBSD.org> AuthorDate: 2022-09-19 20:47:17 +0000 Commit: Justin Hibbits <jhibbits@FreeBSD.org> CommitDate: 2023-02-06 17:32:05 +0000 Mechanically convert iwi(4) and iwn(4) to IfAPI Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37849 --- sys/dev/iwi/if_iwi.c | 10 +++++----- sys/dev/iwn/if_iwn.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 8cd27091d2d9..7456f43a2259 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -160,7 +160,7 @@ static void iwi_free_rx_ring(struct iwi_softc *, struct iwi_rx_ring *); static struct ieee80211_node *iwi_node_alloc(struct ieee80211vap *, const uint8_t [IEEE80211_ADDR_LEN]); static void iwi_node_free(struct ieee80211_node *); -static void iwi_media_status(struct ifnet *, struct ifmediareq *); +static void iwi_media_status(if_t, struct ifmediareq *); static int iwi_newstate(struct ieee80211vap *, enum ieee80211_state, int); static void iwi_wme_init(struct iwi_softc *); static int iwi_wme_setparams(struct iwi_softc *); @@ -920,9 +920,9 @@ iwi_cvtrate(int iwirate) * value here. */ static void -iwi_media_status(struct ifnet *ifp, struct ifmediareq *imr) +iwi_media_status(if_t ifp, struct ifmediareq *imr) { - struct ieee80211vap *vap = ifp->if_softc; + struct ieee80211vap *vap = if_getsoftc(ifp); struct ieee80211com *ic = vap->iv_ic; struct iwi_softc *sc = ic->ic_softc; struct ieee80211_node *ni; @@ -2825,7 +2825,7 @@ static int iwi_auth_and_assoc(struct iwi_softc *sc, struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; - struct ifnet *ifp = vap->iv_ifp; + if_t ifp = vap->iv_ifp; struct ieee80211_node *ni; struct iwi_configuration config; struct iwi_associate *assoc = &sc->assoc; @@ -2972,7 +2972,7 @@ iwi_auth_and_assoc(struct iwi_softc *sc, struct ieee80211vap *vap) assoc->intval = htole16(ni->ni_intval); IEEE80211_ADDR_COPY(assoc->bssid, ni->ni_bssid); if (vap->iv_opmode == IEEE80211_M_IBSS) - IEEE80211_ADDR_COPY(assoc->dst, ifp->if_broadcastaddr); + IEEE80211_ADDR_COPY(assoc->dst, if_getbroadcastaddr(ifp)); else IEEE80211_ADDR_COPY(assoc->dst, ni->ni_bssid); diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 13a0f03f88a0..8795032fc3ae 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -7152,9 +7152,9 @@ iwn_scan(struct iwn_softc *sc, struct ieee80211vap *vap, wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_REQ; wh->i_fc[1] = IEEE80211_FC1_DIR_NODS; - IEEE80211_ADDR_COPY(wh->i_addr1, vap->iv_ifp->if_broadcastaddr); - IEEE80211_ADDR_COPY(wh->i_addr2, IF_LLADDR(vap->iv_ifp)); - IEEE80211_ADDR_COPY(wh->i_addr3, vap->iv_ifp->if_broadcastaddr); + IEEE80211_ADDR_COPY(wh->i_addr1, if_getbroadcastaddr(vap->iv_ifp)); + IEEE80211_ADDR_COPY(wh->i_addr2, if_getlladdr(vap->iv_ifp)); + IEEE80211_ADDR_COPY(wh->i_addr3, if_getbroadcastaddr(vap->iv_ifp)); *(uint16_t *)&wh->i_dur[0] = 0; /* filled by HW */ *(uint16_t *)&wh->i_seq[0] = 0; /* filled by HW */