Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C Linux Kernel
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 10-Apr-12 1:48am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I think this is simialr to any question posted earlier. Check here
 
about dereferencing pointer to incomplete type[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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!
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.1411022.1 | Last Updated 10 Apr 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100