Undeclared functions wiphy_rfkill_start_polling

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5484

elvisjohndowson

01-07-2009 15:30:11

Hi,
I just downloaded the latest rt2x00 wifi drivers from the master branch, and created a set of patches and applied these to the linux-omap3-2.6.29 branch, just to update my rt2x00 drivers. When compiling, I get a few errors, because some functions haven't been declared.

for example rt2x00lib.h, wiphy_rfkill_start_polling and wiphy_rfkill_stop_polling are not declared.

387 static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev)
388 {
389 if (test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags))
390 wiphy_rfkill_start_polling(rt2x00dev->hw->wiphy);
391 }
392
393 static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev)
394 {
395 if (test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags))
396 wiphy_rfkill_stop_polling(rt2x00dev->hw->wiphy);
397 }

I get the following errors, while compiling rtx2000.

In file included from drivers/net/wireless/rt2x00/rt2x00dev.c31
| drivers/net/wireless/rt2x00/rt2x00lib.h In function 'rt2x00rfkill_register'
| drivers/net/wireless/rt2x00/rt2x00lib.h390 error implicit declaration of function 'wiphy_rfkill_start_polling'
| drivers/net/wireless/rt2x00/rt2x00lib.h In function 'rt2x00rfkill_unregister'
| drivers/net/wireless/rt2x00/rt2x00lib.h396 error implicit declaration of function 'wiphy_rfkill_stop_polling'
| drivers/net/wireless/rt2x00/rt2x00dev.c In function 'rt2x00lib_rxdone'
| drivers/net/wireless/rt2x00/rt2x00dev.c452 error implicit declaration of function 'IEEE80211_SKB_RXCB'
| drivers/net/wireless/rt2x00/rt2x00dev.c452 warning passing argument 1 of 'memcpy' makes pointer from integer without a cast
| drivers/net/wireless/rt2x00/rt2x00dev.c453 error too few arguments to function 'ieee80211_rx_irqsafe'
| make[4] *** [drivers/net/wireless/rt2x00/rt2x00dev.o] Error 1

Best regards,

Elvis

IvD

01-07-2009 16:44:21

But that is _not_ a problem of rt2x00, mac80211 or whatever.
It is simply because you cannot simply copy the rt2x00 driver directory from kernel A to kernel B, because there are also changes in the dependencies. Why don't you just use compat-wireless, that makes sure all dependencies are present with the correct API.