Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I'm writing a linux kernel module and I'm trying to use the get_wireless_stats function , but it keeps printing an error saying :
"dereferencing pointer to incomplete type"

here's how I used it, can anyone tell me what's going on?

struct net_device *dev;
struct iw_statistics *wi_stats;


wi_stats = dev->wireless_handlers->get_wireless_stats(dev);
Posted

I think this is simialr to any question posted earlier. Check here

about dereferencing pointer to incomplete type[^]
 
Share this answer
 
Incompete type is a type that is declared but not defined (in case of struct types). the problem here was that wireless_handlers is declared in net_device.h but not defined,it's defined in net/iw_handler.h. All I had to do was include it and the error disappeared!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900