MediaTek MT7612U driver install for WiFi in Jetson Nano

Hi,

I am trying to install this device
WiFi M.2 11ac Module AE key 2.4 5GHz w USB driver reset pin W27612-UAE (asiarf.com)

which comes with MediaTek MT7612U. I have downloaded the driver from mediatek site
MediaTek | MT7612U

but when I execute $make it is giving me this error

/DPO/include/cfg80211.h:39:49: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function); did you mean ‘IEEE80211_NUM_ACS’?
struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
^~~~~~~~~~~~~~~~~~~
IEEE80211_NUM_ACS

I checked with $lsusb and it seems the hardware has been installed successfully

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0e8d:7612 MediaTek Inc.
Bus 001 Device 003: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
Bus 001 Device 009: ID 09cb:4007
Bus 001 Device 008: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 007: ID 1908:0226 GEMBIRD
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Is there anyone who could successfully install the driver for this or any other WiFi module from MediaTek?
Any help would be appreciated.

Thanks,

lsusb only proves that our usb driver is fine. It does not include the driver from MTK.

Maybe you can search the forum and see if any user share their experience for this wifi adapter.

Thanks for your reply and yes, I get that. Wondering if anyone here could successfully build and install the driver for this device.

A little more information on this issue.

I could finally compile the driver after downloading the source code from GitHub - apxii/mt7612u: MT7612U driver for linux.
However, now my issue is when I am trying to load the driver I am getting segmentation fault and this is what $ dmesg is showing:

[ 680.761715] → RTMPAllocTxRxRingMemory
[ 680.762131] ← ERROR in Alloc Bulk buffer for HTTxContext!
[ 680.762133] —> RTMPFreeTxRxRingMemory
[ 680.762137] <— RTMPFreeTxRxRingMemory
[ 680.762140] ERROR!!! RTMPAllocAdapterBlock 132
[ 680.762143] Failed to allocate memory - TxRxRing

and when I looked into the source code I found this in ‘/common/cmm_mac_usb.c’

static int RTMPAllocUsbBulkBufStruct(
	struct usb_device *udev,
	struct urb **ppUrb,
	void **ppXBuffer,
	INT	bufLen,
	dma_addr_t *pDmaAddr,
	char *pBufName)
{
	*ppUrb = usb_alloc_urb(0, GFP_ATOMIC);
	if (*ppUrb == NULL) {
		DBGPRINT(RT_DEBUG_ERROR, ("<-- ERROR in Alloc urb struct for %s !\n", pBufName));
		return NDIS_STATUS_RESOURCES;
	}

	*ppXBuffer = usb_alloc_coherent(udev, bufLen, GFP_ATOMIC, pDmaAddr);
	if (*ppXBuffer == NULL) {
		DBGPRINT(RT_DEBUG_ERROR, ("<-- ERROR in Alloc Bulk buffer for %s!\n", pBufName));
		return NDIS_STATUS_RESOURCES;
	}

	return NDIS_STATUS_SUCCESS;
}

So, the bottom line is usb_alloc_coherent() function is failing. I read in some websites in the Internet that setting the coherent_pool=4M somewhere in boot script might solve the issue, but I am not sure where and which script in Jetson I need to edit and append this configuration . Does anyone know how to fix this error?

I finally could build and install the driver and I posted the source code in github if anyone is having the same issue as mine. Here is the link to download the driver.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.