Hi Kalle, Here's another large batch of mt76 code cleanup / deduplication / fixes - Felix The following changes since commit e1c02eb16a9c742178874a7d1a08d300981715fb: qtnfmac: implement dump_station support for STA mode (2018-10-05 14:01:44 +0300) are available in the Git repository at: https://github.com/nbd168/wireless tags/mt76-for-kvalo-2018-10-05 for you to fetch changes up to 06ac97c2e58c7b32bf950ac53976c4260687d386: mt76x0: pci: report firmware version using ethtool (2018-10-05 20:05:46 +0200) ---------------------------------------------------------------- mt76 patches for 4.20 * unify code between mt76x0, mt76x2 * mt76x0 fixes * another fix for rx buffer allocation regression on usb * move mt76x2 source files to mt76x2 folder * more work on mt76x0e support ---------------------------------------------------------------- Colin Ian King (1): mt76: fix header guard macro define names Lorenzo Bianconi (31): mt76x0: pci: add mt76x0e_cleanup routine mt76x2: move mt76x2 source files to mt76x2 folder mt76: usb: fix hw initialization sequence mt76x0: usb: stop cal/mac workqueues at hw stop mt76: move mt76x02_tx_get_max_txpwr_adj in mt76x02_util.c mt76: add get_tx_txpwr_adj function pointer to mt76_driver_ops mt76: move mt76x02_mac_write_txwi in mt76x02-lib module mt76: usb: use mt76x02u_tx_prepare_skb to fill txwi mt76x0: init: remove unnecessary configurations mt76: move mt76x02_phy_get_min_avg_rssi in mt76x02_phy.c mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.h mt76x0: mac: use sta ewma estimation for rssi tracking mt76x0: remove unused variable in mt76x0_dev mt76x0: remove hw_atomic_mutex mutex in mt76x0_dev mt76x2: move mt76x2_dev in mt76x02_util.h mt76x0: merge mt76x0_dev in mt76x02_dev mt76: move mt76x02_mac_process_rx in mt76x02-lib module mt76: unify rxwi parsing between mt76x2 and mt76x0 drivers mt76: move mt76x02_tx in mt76x02-lib module mt76: move txrx shared routines in mt76x02_txrx.c mt76: rename mt76x02_util.h in mt76x02.h mt76x2: remove leftover function declatarions mt76: move tpc routines in mt76x02-lib module mt76: move mt76x02_tx_prepare_skb in mt76x02_txrx.c mt76: usb: move mt76x02u_tx_complete_skb in mt76x02_usb_core.c mt76: move mt76x02_mac_poll_tx_status in mt76x02-lib moudle mt76: move mt76x02_tx_complete in mt76x02-lib module mt76: use mt76x02_dev instead of mt76_dev in mt76x02_mmio.c mt76: move tx_tasklet management in mt76x02-lib moudle mt76: move irq handler in mt76x02-lib moudle mt76x0: pci: report firmware version using ethtool Stanislaw Gruszka (1): mt76: fix frag length allocation for usb drivers/net/wireless/mediatek/mt76/Kconfig | 43 +------------- drivers/net/wireless/mediatek/mt76/Makefile | 26 ++------- drivers/net/wireless/mediatek/mt76/mt76.h | 6 +- drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig | 20 +++++++ drivers/net/wireless/mediatek/mt76/mt76x0/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/debugfs.c | 4 +- drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c | 28 ++++----- drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.h | 18 ++---- drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 50 ++++++---------- drivers/net/wireless/mediatek/mt76/mt76x0/initvals.h | 3 +- drivers/net/wireless/mediatek/mt76/mt76x0/mac.c | 82 +++----------------------- drivers/net/wireless/mediatek/mt76/mt76x0/mac.h | 20 ------- drivers/net/wireless/mediatek/mt76/mt76x0/main.c | 19 +++--- drivers/net/wireless/mediatek/mt76/mt76x0/mcu.h | 8 +-- drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 135 +++++++----------------------------------- drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 44 +++++++++----- drivers/net/wireless/mediatek/mt76/mt76x0/pci_mcu.c | 5 +- drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 112 +++++++++++++---------------------- drivers/net/wireless/mediatek/mt76/mt76x0/trace.h | 1 - drivers/net/wireless/mediatek/mt76/mt76x0/tx.c | 101 -------------------------------- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 68 +++++++++------------- drivers/net/wireless/mediatek/mt76/mt76x0/usb_mcu.c | 6 +- drivers/net/wireless/mediatek/mt76/mt76x02.h | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/{mt76x2_dfs.h => mt76x02_dfs.h} | 40 ++++++------- drivers/net/wireless/mediatek/mt76/mt76x02_dma.h | 8 +-- drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 239 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- drivers/net/wireless/mediatek/mt76/mt76x02_mac.h | 32 ++++++++-- drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h | 2 +- drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c | 179 +++++++++++++++++++++++++++++++++++++++++++------------- drivers/net/wireless/mediatek/mt76/mt76x02_phy.c | 48 +++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76x02_phy.h | 1 + drivers/net/wireless/mediatek/mt76/{mt76x2_trace.c => mt76x02_trace.c} | 2 +- drivers/net/wireless/mediatek/mt76/{mt76x2_trace.h => mt76x02_trace.h} | 31 +++++----- drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 203 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/mt76x02_usb.h | 9 ++- drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 57 ++++++++++++++++-- drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 55 +----------------- drivers/net/wireless/mediatek/mt76/mt76x02_util.h | 78 ------------------------- drivers/net/wireless/mediatek/mt76/mt76x2.h | 210 ------------------------------------------------------------------ drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig | 20 +++++++ drivers/net/wireless/mediatek/mt76/mt76x2/Makefile | 16 +++++ drivers/net/wireless/mediatek/mt76/{mt76x2_debugfs.c => mt76x2/debugfs.c} | 12 ++-- drivers/net/wireless/mediatek/mt76/mt76x2/dfs.h | 26 +++++++++ drivers/net/wireless/mediatek/mt76/{mt76x2_eeprom.c => mt76x2/eeprom.c} | 42 ++++++++------ drivers/net/wireless/mediatek/mt76/{mt76x2_eeprom.h => mt76x2/eeprom.h} | 12 ++-- drivers/net/wireless/mediatek/mt76/{mt76x2_init_common.c => mt76x2/init.c} | 14 ++--- drivers/net/wireless/mediatek/mt76/{mt76x2_common.c => mt76x2/mac.c} | 46 +++++++++------ drivers/net/wireless/mediatek/mt76/{mt76x2_dma.c => mt76x2/mac.h} | 32 +++++----- drivers/net/wireless/mediatek/mt76/{mt76x2_mcu_common.c => mt76x2/mcu.c} | 13 ++--- drivers/net/wireless/mediatek/mt76/{mt76x2_mcu.h => mt76x2/mcu.h} | 6 +- drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h | 107 ++++++++++++++++++++++++++++++++++ drivers/net/wireless/mediatek/mt76/{ => mt76x2}/mt76x2u.h | 41 ++++++------- drivers/net/wireless/mediatek/mt76/{mt76x2_pci.c => mt76x2/pci.c} | 7 +-- drivers/net/wireless/mediatek/mt76/{mt76x2_dfs.c => mt76x2/pci_dfs.c} | 146 +++++++++++++++++++++++----------------------- drivers/net/wireless/mediatek/mt76/{mt76x2_init.c => mt76x2/pci_init.c} | 70 +++++++++------------- drivers/net/wireless/mediatek/mt76/{mt76x2_mac.c => mt76x2/pci_mac.c} | 99 +++++-------------------------- drivers/net/wireless/mediatek/mt76/{mt76x2_main.c => mt76x2/pci_main.c} | 31 +++++----- drivers/net/wireless/mediatek/mt76/{mt76x2_mcu.c => mt76x2/pci_mcu.c} | 11 ++-- drivers/net/wireless/mediatek/mt76/{mt76x2_phy.c => mt76x2/pci_phy.c} | 35 +++++------ drivers/net/wireless/mediatek/mt76/{mt76x2_tx.c => mt76x2/pci_tx.c} | 43 ++------------ drivers/net/wireless/mediatek/mt76/{mt76x2_phy_common.c => mt76x2/phy.c} | 71 ++++------------------ drivers/net/wireless/mediatek/mt76/{mt76x2_usb.c => mt76x2/usb.c} | 10 ++-- drivers/net/wireless/mediatek/mt76/{mt76x2u_init.c => mt76x2/usb_init.c} | 40 ++++++------- drivers/net/wireless/mediatek/mt76/{mt76x2u_mac.c => mt76x2/usb_mac.c} | 14 ++--- drivers/net/wireless/mediatek/mt76/{mt76x2u_main.c => mt76x2/usb_main.c} | 19 +++--- drivers/net/wireless/mediatek/mt76/{mt76x2u_mcu.c => mt76x2/usb_mcu.c} | 20 +++---- drivers/net/wireless/mediatek/mt76/{mt76x2u_phy.c => mt76x2/usb_phy.c} | 15 ++--- drivers/net/wireless/mediatek/mt76/mt76x2_core.c | 76 ------------------------ drivers/net/wireless/mediatek/mt76/mt76x2_mac.h | 64 -------------------- drivers/net/wireless/mediatek/mt76/mt76x2_mac_common.c | 239 --------------------------------------------------------------------------- drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c | 118 ------------------------------------- drivers/net/wireless/mediatek/mt76/mt76x2u_core.c | 53 ----------------- drivers/net/wireless/mediatek/mt76/usb.c | 2 +- 73 files changed, 1685 insertions(+), 2088 deletions(-) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/mac.h delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x0/tx.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02.h rename drivers/net/wireless/mediatek/mt76/{mt76x2_dfs.h => mt76x02_dfs.h} (76%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_trace.c => mt76x02_trace.c} (97%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_trace.h => mt76x02_trace.h} (86%) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_util.h delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/Makefile rename drivers/net/wireless/mediatek/mt76/{mt76x2_debugfs.c => mt76x2/debugfs.c} (92%) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/dfs.h rename drivers/net/wireless/mediatek/mt76/{mt76x2_eeprom.c => mt76x2/eeprom.c} (91%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_eeprom.h => mt76x2/eeprom.h} (83%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_init_common.c => mt76x2/init.c} (95%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_common.c => mt76x2/mac.c} (53%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_dma.c => mt76x2/mac.h} (59%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_mcu_common.c => mt76x2/mcu.c} (90%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_mcu.h => mt76x2/mcu.h} (93%) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h rename drivers/net/wireless/mediatek/mt76/{ => mt76x2}/mt76x2u.h (55%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_pci.c => mt76x2/pci.c} (93%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_dfs.c => mt76x2/pci_dfs.c} (84%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_init.c => mt76x2/pci_init.c} (87%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_mac.c => mt76x2/pci_mac.c} (66%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_main.c => mt76x2/pci_main.c} (91%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_mcu.c => mt76x2/pci_mcu.c} (95%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_phy.c => mt76x2/pci_phy.c} (92%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_tx.c => mt76x2/pci_tx.c} (75%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_phy_common.c => mt76x2/phy.c} (82%) rename drivers/net/wireless/mediatek/mt76/{mt76x2_usb.c => mt76x2/usb.c} (95%) rename drivers/net/wireless/mediatek/mt76/{mt76x2u_init.c => mt76x2/usb_init.c} (88%) rename drivers/net/wireless/mediatek/mt76/{mt76x2u_mac.c => mt76x2/usb_mac.c} (94%) rename drivers/net/wireless/mediatek/mt76/{mt76x2u_main.c => mt76x2/usb_main.c} (92%) rename drivers/net/wireless/mediatek/mt76/{mt76x2u_mcu.c => mt76x2/usb_mcu.c} (93%) rename drivers/net/wireless/mediatek/mt76/{mt76x2u_phy.c => mt76x2/usb_phy.c} (94%) delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_core.c delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_mac.h delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_mac_common.c delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c delete mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2u_core.c