Forums - USB Driver Build Stage 2 undefineds

6 posts / 0 new
Last post
USB Driver Build Stage 2 undefineds
jshenry1963
Join Date: 17 Nov 20
Posts: 34
Posted: Mon, 2021-05-10 04:42

Hello,

I have a question that you might be able to help me out with.If not, that is ok, I'll start enabling/disabling via menuconfig.

I know I'm using a non qualcomm driver, being that it is from 8devices, but, thought I'd post the question here because there may be others that have run across the same issue and have figured out how to resolve it.

I started out my initial eval on Pi'4s, worked through issues there, got everything running, and did a final bit of eval on a Dell, now I've switched to the end product target device.
It is an arm running a custom linux kernel that is stripped down for size.
It is a "Linux/arm 5.4.13 Kernel Configuration".
The Dell that I had everything working perfect on was an "Linux/x86 5.4.0-72-generic Kernel Configuration"

I am now using the Dell to cross compile for the arm.

Everything builds fine through the stage 1 of make.
e.g.
make -C "/home/jhenry/DevFiles/kernel/build/linux" ARCH=arm M=/home/jhenry/DevFiles/qcacld-2.0 modules WLAN_ROOT=/home/jhenry/DevFiles/qcacld-2.0 MODNAME?=wlan CONFIG_ROME_IF=usb CONFIG_WLAN_FEATURE_11W=y CONFIG_DEBUG_INFO=y CONFIG_QCA_WIFI_ISOC=0 CONFIG_QCA_WIFI_2_0=1 CONFIG_QCA_CLD_WLAN=m WLAN_OPEN_SOURCE=1
make[1]: Entering directory '/home/jhenry/DevFiles/kernel/build/linux'
  CC [M]  /home/jhenry/DevFiles/qcacld-2.0/CORE/HDD/src/wlan_hdd_assoc.o
  CC [M]  /home/jhenry/DevFiles/qcacld-2.0/CORE/HDD/src/wlan_hdd_cfg.o
etc.....

But when it gets to stage 2, the make is returning with a slew of undefineds,
e.g.
  Building modules, stage 2.
  MODPOST 1 modules
ERROR: "cfg80211_assoc_timeout" [/home/jhenry/DevFiles/qcacld-2.0/wlan.ko] undefined!
ERROR: "cfg80211_mgmt_tx_status" [/home/jhenry/DevFiles/qcacld-2.0/wlan.ko] undefined!
ERROR: "wiphy_apply_custom_regulatory" [/home/jhenry/DevFiles/qcacld-2.0/wlan.ko] undefined!
ERROR: "ieee80211_frequency_to_channel" [/home/jhenry/DevFiles/qcacld-2.0/wlan.ko] undefined!
ERROR: "cfg80211_rx_mgmt" [/home/jhenry/DevFiles/qcacld-2.0/wlan.ko] undefined!
etc.

I am guessing that the problem is in my linux build configuration.
Reason is : the initial compiles work, meaning it is finding the appropriate linux header files and the iniital stage compile works properly.
But in stage 2 they can't find the files to link with. Not sure.

My .config for linux kernel for the linux arm for the "80211" stuff is as follows (asking, because you might know which flag I have turned off, which needs turned on)
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_CFG80211_CRDA_SUPPORT=y
# CONFIG_CFG80211_WEXT is not set
CONFIG_LIB80211=y
CONFIG_LIB80211_CRYPT_WEP=y
CONFIG_LIB80211_CRYPT_CCMP=y
CONFIG_LIB80211_CRYPT_TKIP=y
# CONFIG_LIB80211_DEBUG is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
# CONFIG_MAC80211_MESH is not set
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_MESSAGE_TRACING is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set
# CONFIG_PSAMPLE is not set
# CONFIG_NET_IFE is not set
# CONFIG_LWTUNNEL is not set

I do have a few more config items in the dell's linux config that are enabled, such as
CONFIG_CFG80211_WEXT=y
CONFIG_CFG80211_WEXT_EXPORT=y

I really appreciate if you know the answer, if not, I'll figure it out. Time to enable/disable until it works. I wasn't sure if it was a CFG80211 config item or a MAC80211 config item (since cfg uses mac), etc.

Thanks in advance
John Henry

  • Up0
  • Down0
jshenry1963
Join Date: 17 Nov 20
Posts: 34
Posted: Mon, 2021-05-10 04:44

For reference.

I am using the USB based QCA9377-7 mounted on the 8devices USB based radio module / Dev Kit. Works great on my Windows 10, my Dell ubuntu 18.04, and also on the Pi 4's running Raspberry Pi OS. Just trying to do the product integration into the ARM linux based 5.4 kernel.

Thanks in advance

John

 

  • Up0
  • Down0
jshenry1963
Join Date: 17 Nov 20
Posts: 34
Posted: Thu, 2021-05-13 07:10

FYI, turned out this wasn't an issue using the QCA9377-7 USB at all. We have modified the kernel for the end product. Required adding another driver, and removing some unused configs. Some of the configs, we also removed the folders. They weren't needed at the time. Well, adding the QCA to do real wireless stuff, requires some of the removed folders, and just adding the config breaks make. So, gotta add the config, and any config that requires a folder we removed, we gotta add it back. This is a specific implementation issue, not a general QCA9377-7 or 8devices driver issue at all. 

Thanks for the "ears" anyway,

Take care

John

 

  • Up0
  • Down0
jshenry1963
Join Date: 17 Nov 20
Posts: 34
Posted: Wed, 2021-05-19 18:16

A "side" question.....

Is the Qualcomm driver configuration dependent upon any different base driver?

e.g. does it require atheros configuation in linux build? or RTL? If so, do you know which configs to enable?

I'm on the last leg of eval,

Best

John

 

  • Up0
  • Down0
ddeepakk Moderator
Join Date: 27 Jun 17
Posts: 144
Posted: Thu, 2021-05-20 02:12

Hi John,

All the dependencies are already mentioned in the Porting guide that we provide on the qualcomm.com portal. They are mainly on the CFG80211 driver and the Bus driver e.g. SDIO. That's all.

No need to enable Atheros or RTL configs.

Hope this clarifies.

Thanks.

  • Up0
  • Down0
jshenry1963
Join Date: 17 Nov 20
Posts: 34
Posted: Thu, 2021-05-20 04:03

Hi Deepak,

I did see that, thank you.

I do have MMC_DEBUG enabled, 

CONFIG_CFG80211=m

and

CONFIG_CFG80211_INTERNAL_REGDB=y

and do get a lot of the interfaces required compiled, but it is still not compiling a couple of the wireless files that the QCA driver needs. Such as nl80211.c and mlm3.c in net/wireless are not compiling. I can force them in the makefile, did that just for grins to see if the QCA driver would build, and it did, but that of course brought other issues. But at least I proved the QCA build could find those specific interfaces if those two files just compiled. So of course, I reverted back to the normal linux makefile so I am still left with finding out the magic config item to enable to get nl80211.c and mlme.c to compile. Again, this is due to stripping out a LOT of configs that were not needed for the project initially, and something I need enabled isn't there. So it isn't a QCA build issue, it is a linux kernel configuration issue, which isn't your problem, but mine, :) No fun. I'll find it.

Thanks for your help,

John

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.