Click here to Skip to main content
13,506,611 members
Rate this:
Please Sign up or sign in to vote.
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 10-Apr-12 0:48am
Rate this: bad
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[^]
Rate this: bad
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!

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.180417.1 | Last Updated 10 Apr 2012
Copyright © CodeProject, 1999-2018
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