I have a Wi-Fi driver (a .ko file) for embedded Linux system and there are two identical Wi-Fi devices on my board. After insmod-ing the .ko file into the kernel, the system is able to drive these two Wi-Fi devices.
My question is: if the driver's source code contains global variables (and static variables), do these two devices share the same set of variables? Or, there will be two driver instances for each device?
Thanks!
Linux kernel modules are linked into the kernel the same as any files would be normally in C. If they have global variables, there is only one copy of each global variable. They can even use global variables from other modules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With