Commit Graph

8 Commits

Author SHA1 Message Date
Lorenzo Bianconi
499cd0aa3b mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mcu.c
Use mt76x02_dev data structure as reference in mt76x02_mcu.c
instead of mt76_dev

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-10-13 17:39:16 +02:00
Colin Ian King
e3469c5ea7 mt76: fix header guard macro define names
The header guards that are #defined are different from those being
checked.  Fix this by #defining them to the correct name.

Fixes clang warnings:
drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h:17:9:
warning: '__MT76x02_MCU_H' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]

drivers/net/wireless/mediatek/mt76/mt76x02_usb.h:17:9:
warning: '__MT76x02_USB_H' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]

Fixes: 905db74701 ("mt76: usb: move mt76x02 mcu code in mt76x02-usb module")
Fixes: edaa580bc8 ("mt76: move shared mcu_calibrate routine in mt76x02-lib module")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-10-05 20:05:44 +02:00
Davide Caratti
22509324c5 mt76: report firmware version using ethtool
print fw_ver and build_ver members of struct mt76x02_fw_header, similarly
to what appears in the output of 'dmesg' when the MCU firmware is loaded.

Reported-by: Sid Hayn <sidhayn@gmail.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-10-01 12:34:11 +02:00
Lorenzo Bianconi
db2803bbda mt76x0: pci: add fw uploading routine
Add pci load firmware routine. Move some shared mcu definitions
in mt76x02_mcu.h

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-10-01 12:33:37 +02:00
Lorenzo Bianconi
edaa580bc8 mt76: move shared mcu_calibrate routine in mt76x02-lib module
Move mcu_calibrate routine in mt76x02-lib module since it is
shared between USB and PCI code. Moreover remove duplicated
code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-09-19 12:31:41 +02:00
Lorenzo Bianconi
36fd09dd0f mt76: move mt76{0,2} mcu shared code in mt76x02_mcu.c
Move shared mt76x2/mt76x0 mcu shared code in a common file
and remove duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-09-19 12:31:39 +02:00
Lorenzo Bianconi
79394f4080 mt76: unify firmware header between mt76x0 and mt76x2
Move mt76x2_fw_header definition in mt76x02_mcu.h and remove
duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-09-19 12:31:38 +02:00
Lorenzo Bianconi
dce9dc8d57 mt76: move mt76x0 and mt76x2 mcu shared defs in mt76x02_mcu.h
Move mt76x0 and mt76x2 mcu shared definition in mt76x02_mcu.h
and remove duplicated code

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2018-09-19 12:31:17 +02:00