I’m writing a kernel where I need to read certain statistics from iw_statistics structure, here’s the code:
struct net_device *dev;
struct iw_statistics *wi_stats;
wi_stats = dev->wireless_handlers->get_wireless_stats(dev);
the code compiles correctly, but when trying to run it, the module gets stuck connot get removed … I’m using linux kernel 2.6.35 and my wireless device is up and running, so the structure HAS to have some values in it.
You need to make sure that dev is initialized first. To initialize dev, you can do something like the following: