mt76x02u: check chip version on probe
authorStanislaw Gruszka <sgruszka@redhat.com>
Thu, 7 Mar 2019 12:22:21 +0000 (13:22 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 19 Mar 2019 15:33:33 +0000 (17:33 +0200)
commit40b941611bd4826b7e3e449f738af98ad22e1ce6
treee6b4907453555d694824893d6a0d08a5b380ab54
parentc0316470683af0507427c3e0660246feacdf8363
mt76x02u: check chip version on probe

Since some USB device IDs are duplicated between mt76x0u, mt7601u
and mt76x2u device, check chip version on probe and return error if
not match the driver.

Don't think this is serious issue, probe most likely will fail at
some other point for wrong device, but we do not have to configure
it if we know is not our device.

Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
drivers/net/wireless/mediatek/mt76/mt76x02.h
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c