Date: Fri, 11 Jan 2008 20:41:38 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133064 for review Message-ID: <200801112041.m0BKfc1M069105@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133064 Change 133064 by sam@sam_ebb on 2008/01/11 20:40:49 add wlan clone support; compile-tested only Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#15 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.c#15 (text+ko) ==== @@ -43,6 +43,7 @@ #include <sys/socket.h> #include <net/if.h> +#include <net/if_clone.h> #include <net/if_media.h> #include <net/ethernet.h> #include <net/route.h> @@ -60,6 +61,39 @@ SYSCTL_INT(_net_wlan, OID_AUTO, recv_bar, CTLFLAG_RW, &ieee80211_recv_bar_ena, 0, "BAR frame processing (ena/dis)"); +static int +wlan_clone_create(struct if_clone *ifc, int unit, caddr_t params) +{ + struct ieee80211_clone_params cp; + struct ieee80211vap *vap; + struct ieee80211com *ic; + struct ifnet *ifp; + int error; + + error = copyin(params, &cp, sizeof(cp)); + if (error) + return error; + ifp = ifunit(cp.icp_parent); + if (ifp == NULL) + return ENXIO; + ic = ifp->if_softc; /* XXX forces ic at front of softc */ + vap = ic->ic_vap_create(ic, ifc->ifc_name, unit, + cp.icp_opmode, cp.icp_flags, cp.icp_bssid, + cp.icp_flags & IEEE80211_CLONE_MACADDR ? + cp.icp_macaddr : ic->ic_myaddr); + return (vap == NULL ? EIO : 0); +} + +static void +wlan_clone_destroy(struct ifnet *ifp) +{ + struct ieee80211vap *vap = ifp->if_softc; + struct ieee80211com *ic = vap->iv_ic; + + ic->ic_vap_delete(vap); +} +IFC_SIMPLE_DECLARE(wlan, 0); + #ifdef IEEE80211_AMPDU_AGE static int ieee80211_sysctl_ampdu_age(SYSCTL_HANDLER_ARGS)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801112041.m0BKfc1M069105>