aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_freebsd.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2006-06-13 21:36:23 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2006-06-13 21:36:23 +0000
commitedd32c2da270644caf802098bd2aaa5344dc5fe0 (patch)
tree6bdda3a80fe25172e30b3b25fc2a0ae45191cc84 /sys/net80211/ieee80211_freebsd.c
parentb21c9288cef919b48f4676955549ba697f17d224 (diff)
downloadsrc-edd32c2da270644caf802098bd2aaa5344dc5fe0.tar.gz
src-edd32c2da270644caf802098bd2aaa5344dc5fe0.zip
Use kern_kldload() and kern_kldunload() to load and unload modules when
we intend for the user to be able to unload them later via kldunload(2) instead of calling linker_load_module() and then directly adjusting the ref count on the linker file structure. This makes the resulting consumer code simpler and cleaner and better hides the linker internals making it possible to sanely lock the linker.
Notes
Notes: svn path=/head/; revision=159590
Diffstat (limited to 'sys/net80211/ieee80211_freebsd.c')
-rw-r--r--sys/net80211/ieee80211_freebsd.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c
index 4fa020733d31..912f2d0b17c5 100644
--- a/sys/net80211/ieee80211_freebsd.c
+++ b/sys/net80211/ieee80211_freebsd.c
@@ -310,14 +310,9 @@ ieee80211_notify_michael_failure(struct ieee80211com *ic,
void
ieee80211_load_module(const char *modname)
{
-#ifdef notyet
- struct thread *td = curthread;
- if (suser(td) == 0 && securelevel_gt(td->td_ucred, 0) == 0) {
- mtx_lock(&Giant);
- (void) linker_load_module(modname, NULL, NULL, NULL, NULL);
- mtx_unlock(&Giant);
- }
+#ifdef notyet
+ (void)kern_kldload(curthread, modname, NULL);
#else
printf("%s: load the %s module by hand for now.\n", __func__, modname);
#endif