0

How do I execute the following command from a loadable Linux kernel hook:

echo 5 > /sys/kernel/debug/ieee80211/phy0/ath9k/AggregationLimit
user36685
  • 3
  • 1

1 Answers1

0

According to 22.5. Setting Module Parameters (Fedora, and also Red Hat Enterprise):

Because parameters cannot be dynamically set for a module that is already loaded into a running kernel, there are two different methods for setting them.

and it goes on to describe how to reload a module, setting the desired parameters using modprobe.

According to /proc/sys vs /sys/modules/mod/parameter answer by Gilles (but lacking a suitable source):

You can read, and sometimes modify, the parameters of the module foo by writing to /sys/module/foo/parameters/*.

but he adds:

Components that are loaded in the kernel read their parameters from the kernel command line. These parameters cannot be set at runtime (at least not through an automatically-generated interface like /sys/module: the component can expose a custom interface for this).

so unless your component provides an interface, (re)loading the module with the desired parameters sounds like the way to approach the problem.

Thomas Dickey
  • 75,040
  • 9
  • 171
  • 268