OpenWrt Forum Archive

Topic: How to load and unload a module in the kamikaze?

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I want to load and unload a module into openwrt but find it very difficult to unload it by using "rmmod"
Is there anything to do with the environment variables? 
Any suggestions?

I had absolutely no problems doing "rmmod wlan" last night.  Reloading them didn't quite work, but I was in a position where a reboot was no big deal.

I have a similar problem.

It doesn't apply to all drivers, but I am using a script to load a 3d-party driver.

If I run the script "manually" from bash, the driver is loaded and I can unload it from bash.

If I run the script from /etc/rc.d/ during startup, or if I run it as a cron-job, I am not able to unload the driver. I even tried to unload the driver in the same script that loads the driver, and it still wouldn't unload.

Could it have something to do with the way OpenWRT are running processes and loading modules?

I have tried the same procedure with another Linux distro using the same kernel and drivers and the driver unloaded successfully. There were some issues on this distro with different c-libraries from the OpenWRT, so I haven't verified the "success" 100%, but the driver was loaded without error-messages and I was able to unload it.

Any ideas ?

hi,

i also have a problem using rmmod. i have i linksys wrt54gl with kamikaze 7.09 and i just wanted to unload the wlcompat and wl module. here rmmod wl did not return. after killing the ssh connection and reconnecting I can now see rmmod taking 100% of my cpu power. lsmod states that wl is not loaded anymore though.

@edit: dmesg shows: unregister_netdevice: waiting for wl0 to become free. Usage count = 2 . Although wlan should be disabled as of "option disabled 1" in /etc/config/wireless

(Last edited by exactt on 24 Apr 2008, 12:28)

The discussion might have continued from here.