Date: Tue, 20 Jan 2009 22:01:08 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r187491 - user/sam/wifi/sys/net80211 Message-ID: <200901202201.n0KM18lY057891@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Tue Jan 20 22:01:08 2009 New Revision: 187491 URL: http://svn.freebsd.org/changeset/base/187491 Log: Add ieee80211_notify_reghint to broadcast regulatory information to user space; this may be used to handle initial card setup for drivers that can provide proper regulatory data like an ISO country code--we want this done in user space because that's where the regdomain tables are. Note this may not be used; it's likely we can do what we need w/ existing mechanisms on device discovery. Modified: user/sam/wifi/sys/net80211/ieee80211_freebsd.c user/sam/wifi/sys/net80211/ieee80211_freebsd.h user/sam/wifi/sys/net80211/ieee80211_proto.h Modified: user/sam/wifi/sys/net80211/ieee80211_freebsd.c ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_freebsd.c Tue Jan 20 22:00:19 2009 (r187490) +++ user/sam/wifi/sys/net80211/ieee80211_freebsd.c Tue Jan 20 22:01:08 2009 (r187491) @@ -682,6 +682,18 @@ ieee80211_notify_country(struct ieee8021 } void +ieee80211_notify_reghint(struct ieee80211com *ic, int sku, int cc) +{ + struct ifnet *ifp = ic->ic_ifp; + struct ieee80211_reghint_event iev; + + memset(&iev, 0, sizeof(iev)); + iev.iev_sku = sku; + iev.iev_cc = cc; + rt_ieee80211msg(ifp, RTM_IEEE80211_REGHINT, &iev, sizeof(iev)); +} + +void ieee80211_notify_radio(struct ieee80211com *ic, int state) { struct ifnet *ifp = ic->ic_ifp; Modified: user/sam/wifi/sys/net80211/ieee80211_freebsd.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_freebsd.h Tue Jan 20 22:00:19 2009 (r187490) +++ user/sam/wifi/sys/net80211/ieee80211_freebsd.h Tue Jan 20 22:01:08 2009 (r187491) @@ -461,13 +461,18 @@ struct ieee80211_deauth_event { struct ieee80211_country_event { uint8_t iev_addr[6]; - uint8_t iev_cc[2]; /* ISO country code */ + uint8_t iev_cc[2]; /* ISO 3166 country code string */ }; struct ieee80211_radio_event { uint8_t iev_state; /* 1 on, 0 off */ }; +struct ieee80211_reghint_event { + uint16_t iev_sku; /* SKU */ + uint16_t iev_cc; /* ISO 3166 country code */ +}; + #define RTM_IEEE80211_ASSOC 100 /* station associate (bss mode) */ #define RTM_IEEE80211_REASSOC 101 /* station re-associate (bss mode) */ #define RTM_IEEE80211_DISASSOC 102 /* station disassociate (bss mode) */ @@ -485,6 +490,7 @@ struct ieee80211_radio_event { #define RTM_IEEE80211_AUTH 114 /* station authenticate (ap mode) */ #define RTM_IEEE80211_COUNTRY 115 /* discovered country code (sta mode) */ #define RTM_IEEE80211_RADIO 116 /* RF kill switch state change */ +#define RTM_IEEE80211_REGHINT 117 /* regulatory hint from system */ /* * Structure prepended to raw packets sent through the bpf Modified: user/sam/wifi/sys/net80211/ieee80211_proto.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_proto.h Tue Jan 20 22:00:19 2009 (r187490) +++ user/sam/wifi/sys/net80211/ieee80211_proto.h Tue Jan 20 22:01:08 2009 (r187491) @@ -362,5 +362,6 @@ void ieee80211_notify_node_deauth(struct void ieee80211_notify_node_auth(struct ieee80211_node *); void ieee80211_notify_country(struct ieee80211vap *, const uint8_t [], const uint8_t cc[2]); +void ieee80211_notify_reghint(struct ieee80211com *, int sku, int cc); void ieee80211_notify_radio(struct ieee80211com *, int); #endif /* _NET80211_IEEE80211_PROTO_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901202201.n0KM18lY057891>