mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02: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 <sean.wang@mediatek.com> Link: https://patch.msgid.link/20260425195011.790265-22-sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
35a5dcc717
commit
bef8367b48
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -925,6 +925,7 @@ mt76u_ac_to_hwq(struct mt76_dev *dev, struct mt76_queue *q, u8 qid)
|
|||
q->ep = q->hw_idx + 1;
|
||||
break;
|
||||
}
|
||||
case 0x6639:
|
||||
case 0x7961:
|
||||
case 0x7925:
|
||||
q->hw_idx = mt76_ac_to_hwq(ac);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user