rtlwifi-linux/rtlwifi-next

Compile error

Opened this issue · 8 comments

I am trying to compile the driver under Ubuntu 16.04 with latest kernel of 4.12.
But there is an error I cannot resolve:
/rtlwifi-next/rtl8188ee/trx.c:447:22: error: ‘RX_FLAG_40MHZ’ undeclared (first use in this function)
rx_status->flag |= RX_FLAG_40MHZ;

binli commented

4.13 also had the same issue.

make[1]: Entering directory '/usr/src/linux-headers-4.13.0-12-generic'
CC [M] /home/u/gits/rtlwifi-next/rtl8188ee/trx.o
/home/u/gits/rtlwifi-next/rtl8188ee/trx.c: In function ‘rtl88ee_rx_query_desc’:
/home/u/gits/rtlwifi-next/rtl8188ee/trx.c:447:22: error: ‘RX_FLAG_40MHZ’ undeclared (first use in this function)
rx_status->flag |= RX_FLAG_40MHZ;
^~~~~~~~~~~~~
/home/u/gits/rtlwifi-next/rtl8188ee/trx.c:447:22: note: each undeclared identifier is reported only once for each function it appears in
/home/u/gits/rtlwifi-next/rtl8188ee/trx.c:450:22: error: ‘RX_FLAG_HT’ undeclared (first use in this function); did you mean ‘RX_FLAG_40MHZ’?
rx_status->flag |= RX_FLAG_HT;
^~~~~~~~~~
RX_FLAG_40MHZ

I am trying to compile the driver under Ubuntu 16.04 with the kernel of 4.4, and the error just happened, this problem has bothered me for a few days, and i am going crazy, anybody can help?
cky@cky:~/program_ws/rtlwifi-next$ sudo make
make -C /lib/modules/4.4.0-31-generic/build M=/home/cky/program_ws/rtlwifi-next modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-31-generic'
CC [M] /home/cky/program_ws/rtlwifi-next/base.o
In file included from /home/cky/program_ws/rtlwifi-next/base.c:26:0:
/home/cky/program_ws/rtlwifi-next/wifi.h:1434:40: error: ‘NUM_NL80211_BANDS’ undeclared here (not in a function)
struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
^
/home/cky/program_ws/rtlwifi-next/base.c: In function ‘rtlwifi_rate_mapping’:
/home/cky/program_ws/rtlwifi-next/base.c:1056:25: warning: comparison between ‘enum nl80211_band’ and ‘enum ieee80211_band’ [-Wenum-compare]
if (NL80211_BAND_2GHZ == hw->conf.chandef.chan->band) {
^
scripts/Makefile.build:258: recipe for target '/home/cky/program_ws/rtlwifi-next/base.o' failed
make[2]: *** [/home/cky/program_ws/rtlwifi-next/base.o] Error 1
Makefile:1403: recipe for target 'module/home/cky/program_ws/rtlwifi-next' failed
make[1]: *** [module/home/cky/program_ws/rtlwifi-next] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-31-generic'
Makefile:100: recipe for target 'all' failed
make: *** [all] Error 2

I have the same problem on a freshly installed Ubuntu 16.04.3

Me too!
CC [M] /home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/table.o
CC [M] /home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/trx.o
/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/trx.c: In function ‘rtl88ee_rx_query_desc’:
/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/trx.c:447:22: error: ‘RX_FLAG_40MHZ’ undeclared (first use in this function)
rx_status->flag |= RX_FLAG_40MHZ;
^
/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/trx.c:447:22: note: each undeclared identifier is reported only once for each function it appears in
/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/trx.c:450:22: error: ‘RX_FLAG_HT’ undeclared (first use in this function)
rx_status->flag |= RX_FLAG_HT;
^
scripts/Makefile.build:308: recipe for target '/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/trx.o' failed
make[3]: *** [/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee/trx.o] Error 1
scripts/Makefile.build:581: recipe for target '/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee' failed
make[2]: *** [/home/wangweilin/wwl/backup/rtlwifi-next/rtl8188ee] Error 2
Makefile:1550: recipe for target 'module/home/wangweilin/wwl/backup/rtlwifi-next' failed
make[1]: *** [module/home/wangweilin/wwl/backup/rtlwifi-next] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-37-generic'
Makefile:100: recipe for target 'all' failed
make: *** [all] Error 2

does anyone solve the problem?

Still have this problem in Kali with 4.18

Upgrade your kernel to 5.2, all chips supported by this driver are built-in.