mareksuscak / asus-pce-n53-linux

🤖 Asus PCE-N53 Linux Driver for Kernel versions 3.x, 4.x and 5.x
Other
30 stars 17 forks source link

Compile errors with Ubuntu 16.04 LTS #4

Closed v-ladynev closed 7 years ago

v-ladynev commented 7 years ago

I have Ubuntu 16.04 LTS and Asus PCE-N53 card.

During building a driver, I had to fix 2 compile errors:

asus-pce-n53-linux/os/linux/../../common/rtmp_mcu.c:558:72: error: passing argument 3 of ‘pci_read_config_word’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    pci_read_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, &Configuration); 

asus-pce-n53-linux/os/linux/../../common/rtmp_mcu.c:578:72: error: passing argument 3 of ‘pci_read_config_word’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    pci_read_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, &Configuration);

I had changed this

pci_read_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, &Configuration);

to this

pci_read_config_word(((POS_COOKIE)pAd->OS_Cookie)->pci_dev, offset, (u16*)&Configuration);

in 2 places of a file rtmp_mcu.c

v-ladynev commented 7 years ago

Probably, worth to add something from here http://askubuntu.com/a/894473/667014 to the install insturctions.

mareksuscak commented 7 years ago

Noted. Thank you!

v-ladynev commented 7 years ago

@mareksuscak You are welcome :)