diff options
author | glebius <glebius@FreeBSD.org> | 2015-05-25 19:53:29 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-05-25 19:53:29 +0000 |
commit | 4a0e78ec55ee3f817d1cd4e4e064d05107aa36ff (patch) | |
tree | d5f9d0f569bb5ced86891fecc5d0120ece350c33 /sys/net80211 | |
parent | f48b822fcb702453a9d199333bda92f7f0c52227 (diff) | |
download | FreeBSD-src-4a0e78ec55ee3f817d1cd4e4e064d05107aa36ff.zip FreeBSD-src-4a0e78ec55ee3f817d1cd4e4e064d05107aa36ff.tar.gz |
Change three methods in struct ieee80211com, namely ic_updateslot,
ic_update_mcast and ic_update_promisc, to pass pointer to the ieee80211com,
not to the ifnet.
Sponsored by: Netflix
Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211.c | 10 | ||||
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 8 | ||||
-rw-r--r-- | sys/net80211/ieee80211_var.h | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/net80211/ieee80211.c b/sys/net80211/ieee80211.c index 8596ce1..cce5a4b 100644 --- a/sys/net80211/ieee80211.c +++ b/sys/net80211/ieee80211.c @@ -224,15 +224,17 @@ ieee80211_chan_init(struct ieee80211com *ic) } static void -null_update_mcast(struct ifnet *ifp) +null_update_mcast(struct ieee80211com *ic) { - if_printf(ifp, "need multicast update callback\n"); + + ic_printf(ic, "need multicast update callback\n"); } static void -null_update_promisc(struct ifnet *ifp) +null_update_promisc(struct ieee80211com *ic) { - if_printf(ifp, "need promiscuous mode update callback\n"); + + ic_printf(ic, "need promiscuous mode update callback\n"); } static int diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 580701f..01c60e1 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -650,7 +650,7 @@ ieee80211_set_shortslottime(struct ieee80211com *ic, int onoff) ic->ic_flags &= ~IEEE80211_F_SHSLOT; /* notify driver */ if (ic->ic_updateslot != NULL) - ic->ic_updateslot(ic->ic_ifp); + ic->ic_updateslot(ic); } /* @@ -1164,18 +1164,16 @@ static void update_mcast(void *arg, int npending) { struct ieee80211com *ic = arg; - struct ifnet *parent = ic->ic_ifp; - ic->ic_update_mcast(parent); + ic->ic_update_mcast(ic); } static void update_promisc(void *arg, int npending) { struct ieee80211com *ic = arg; - struct ifnet *parent = ic->ic_ifp; - ic->ic_update_promisc(parent); + ic->ic_update_promisc(ic); } static void diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 4c9fbf3..74aabf4 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -258,11 +258,11 @@ struct ieee80211com { struct mbuf *, const struct ieee80211_bpf_params *); /* update device state for 802.11 slot time change */ - void (*ic_updateslot)(struct ifnet *); + void (*ic_updateslot)(struct ieee80211com *); /* handle multicast state changes */ - void (*ic_update_mcast)(struct ifnet *); + void (*ic_update_mcast)(struct ieee80211com *); /* handle promiscuous mode changes */ - void (*ic_update_promisc)(struct ifnet *); + void (*ic_update_promisc)(struct ieee80211com *); /* new station association callback/notification */ void (*ic_newassoc)(struct ieee80211_node *, int); /* TDMA update notification */ |