Skip to content

wireless: mt7601u-t31-camhi modprobes mac80211 instead of the driver, so it can never bring up wlan0 #2412

Description

@openipc-ai

general/overlay/etc/wireless/usb has one arm that loads the 802.11 stack and never a driver, so selecting it can only fail:

if [ "$1" = "mt7601u-t31-camhi" ]; then
	set_gpio 61 0
	modprobe mac80211
	exit 0
fi

mac80211 is the stack, not a device driver — nothing claims the adapter, wlan0 never appears, and set_wireless has already exit 0'd so no later arm gets a chance either.

Its immediate neighbour in the same file, same pad, does it right:

if [ "$1" = "rtl8733bu-t31-camhipro" ]; then
	set_gpio 61 0
	modprobe 8733bu
	exit 0
fi

and so does every other MT7601U entry, e.g. mt7601u-hi3516ev200-camhi → modprobe mt7601u. It reads like a copy/paste where the modprobe line was not updated.

mt7601u-t31-camhi is the only arm in usb, sdio or modem with this shape — I checked all 66 by parsing each arm's modprobe list.

Second-order problem on T31 specifically. A current T31 lite image carries no mt7601u.ko at all — the only Wi-Fi module on the one I checked is 8188fu. So even with the modprobe corrected, this entry needs the driver in the image to be selectable; as it stands it is a dead option that a camera owner can pick and then be left with no wlan0 and no explanation.

Suggested fix is one line:

 if [ "$1" = "mt7601u-t31-camhi" ]; then
 	set_gpio 61 0
-	modprobe mac80211
+	modprobe mt7601u
 	exit 0
 fi

Found while building a WebUI control that lists only the adapters an image can actually bring up (OpenIPC/majestic-webui#457): the filter keeps an entry when every module its arm loads is present on the camera, and this one passed on mac80211 alone while loading nothing that could work. The WebUI now excludes arms whose modules are all stack, but the script is where it should be fixed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions