mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: add MT7927 USB support
Add the MT7927 USB device ID and normalize the raw 0x6639 CHIPID to MT7927 so the shared mt7925u code can use the proper chip-specific paths. Restore the required band setup after USB MAC reset before restarting the device. Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include "mac.h"
|
||||
|
||||
static const struct usb_device_id mt7925u_device_table[] = {
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x0e8d, 0x6639, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)MT7925_FIRMWARE_WM },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(0x0e8d, 0x7925, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)MT7925_FIRMWARE_WM },
|
||||
/* Netgear, Inc. A8500 */
|
||||
@@ -123,6 +125,12 @@ static int mt7925u_mac_reset(struct mt792x_dev *dev)
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
if (is_mt7927(&dev->mt76)) {
|
||||
err = mt7925_mcu_set_dbdc(&dev->mphy, true);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = __mt7925_start(&dev->phy);
|
||||
out:
|
||||
clear_bit(MT76_RESET, &dev->mphy.state);
|
||||
@@ -200,6 +208,13 @@ static int mt7925u_probe(struct usb_interface *usb_intf,
|
||||
(mt76_rr(dev, MT_HW_REV) & 0xff);
|
||||
dev_dbg(mdev->dev, "ASIC revision: %04x\n", mdev->rev);
|
||||
|
||||
if (mt76_chip(mdev) == 0x6639) {
|
||||
dev_dbg(mdev->dev,
|
||||
"MT7927 raw CHIPID=0x%04x, forcing chip=0x7927\n",
|
||||
mt76_chip(mdev));
|
||||
mdev->rev = (0x7927 << 16) | (mdev->rev & 0xff);
|
||||
}
|
||||
|
||||
if (mt76_get_field(dev, MT_CONN_ON_MISC, MT_TOP_MISC2_FW_N9_RDY)) {
|
||||
ret = mt792xu_wfsys_reset(dev);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user