Adding module parameter [SOLVED]

I am trying to add a module parameter on reboot but it won't stick.
I can do:
echo 1 > /sys/module/mt76_usb/parameters/disable_usb_sg

but this doesn't work after reboot:

# cat /etc/modules.d/mymoduleparam.conf
option mt76_usb disable_usb_sg=1

# cat /sys/module/mt76_usb/parameters/disable_usb_sg
N

Still doesn't work.

# cat /etc/modules.d/mymoduleparam.conf
options mt76_usb disable_usb_sg=1

# cat /sys/module/mt76_usb/parameters/disable_usb_sg
N

I wonder if it is maybe because another module is loading it?

I think I got it:

# opkg files kmod-dummy
Package kmod-dummy (4.14.180-1) is installed on root and has the following files:
/lib/modules/4.14.180/dummy.ko
/etc/modules.d/34-dummy

# cat /etc/modules.d/34-dummy
dummy

# cat /etc/modules.d/00-custom
dummy numdummies=0
1 Like

# opkg files kmod-mt76-usb
Package kmod-mt76-usb (5.4.52+2020-05-30-85c51608-2) is installed on root and has the following files:
/lib/modules/5.4.52/mt76-usb.ko

Got it to work, thanks.
# cat /etc/modules.d/mymoduleparam.conf
mt76-usb disable_usb_sg=1

# cat /sys/module/mt76_usb/parameters/disable_usb_sg
Y

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.