Skip to content

Commit

Permalink
mt76x2: move mt76x2 source files to mt76x2 folder
Browse files Browse the repository at this point in the history
Move mt76x2 and mt76x2u drivers to mt76x2 subfolder and
leave just shared code in mt76 root folder

Acked-by: Stanislaw Gruszka <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Oct 1, 2018
1 parent 053de5c commit c6b1926
Showing 35 changed files with 78 additions and 78 deletions.
20 changes: 1 addition & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
EXTRA_CFLAGS += -Werror

obj-m := mt76.o
obj-$(CONFIG_MT76X2E) += mt76x2e.o
obj-$(CONFIG_MT7603E) += mt7603/
obj-$(CONFIG_MT76x2_COMMON) += mt76x2-common.o
obj-$(CONFIG_MT76x02_LIB) += mt76x02-lib.o
obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o
obj-$(CONFIG_MT76_USB) += mt76-usb.o
obj-$(CONFIG_MT76X2U) += mt76x2u.o
obj-$(CONFIG_MT76x2_COMMON) += mt76x2/
obj-$(CONFIG_MT76x0_COMMON) += mt76x0/

mt76-y := \
@@ -19,19 +17,3 @@ mt76x02-lib-y := mt76x02_util.o mt76x02_mac.o mt76x02_mcu.o \
mt76x02_eeprom.o mt76x02_phy.o mt76x02_mmio.o

mt76x02-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o

mt76x2-common-y := \
mt76x2_eeprom.o mt76x2_tx_common.o mt76x2_mac_common.o \
mt76x2_init_common.o mt76x2_common.o mt76x2_phy_common.o \
mt76x2_debugfs.o mt76x2_mcu_common.o

mt76x2e-y := \
mt76x2_pci.o mt76x2_dma.o \
mt76x2_main.o mt76x2_init.o mt76x2_tx.o \
mt76x2_core.o mt76x2_mac.o mt76x2_mcu.o mt76x2_phy.o \
mt76x2_dfs.o mt76x2_trace.o

mt76x2u-y := \
mt76x2_usb.o mt76x2u_init.o mt76x2u_main.o mt76x2u_mac.o \
mt76x2u_mcu.o mt76x2u_phy.o mt76x2u_core.o

18 changes: 18 additions & 0 deletions mt76x2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
obj-$(CONFIG_MT76x2_COMMON) += mt76x2-common.o
obj-$(CONFIG_MT76x2E) += mt76x2e.o
obj-$(CONFIG_MT76x2U) += mt76x2u.o

mt76x2-common-y := \
eeprom.o tx.o mac.o init.o common.o phy.o \
debugfs.o mcu.o

mt76x2e-y := \
pci.o pci_dma.o pci_main.o pci_init.o pci_tx.o \
pci_core.o pci_mac.o pci_mcu.o pci_phy.o \
pci_dfs.o pci_trace.o

mt76x2u-y := \
usb.o usb_init.o usb_main.o usb_mac.o usb_mcu.o \
usb_phy.o usb_core.o

CFLAGS_pci_trace.o := -I$(src)
2 changes: 1 addition & 1 deletion mt76x2_common.c → mt76x2/common.c
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
*/

#include "mt76x2.h"
#include "mt76x02_mac.h"
#include "../mt76x02_mac.h"

void mt76x2_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
struct sk_buff *skb)
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion mt76x2_eeprom.c → mt76x2/eeprom.c
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#include <linux/module.h>
#include <asm/unaligned.h>
#include "mt76x2.h"
#include "mt76x2_eeprom.h"
#include "eeprom.h"

#define EE_FIELD(_name, _value) [MT_EE_##_name] = (_value) | 1

2 changes: 1 addition & 1 deletion mt76x2_eeprom.h → mt76x2/eeprom.h
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#ifndef __MT76x2_EEPROM_H
#define __MT76x2_EEPROM_H

#include "mt76x02_eeprom.h"
#include "../mt76x02_eeprom.h"

enum mt76x2_cal_channel_group {
MT_CH_5G_JAPAN,
4 changes: 2 additions & 2 deletions mt76x2_init_common.c → mt76x2/init.c
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@
*/

#include "mt76x2.h"
#include "mt76x2_eeprom.h"
#include "mt76x02_phy.h"
#include "eeprom.h"
#include "../mt76x02_phy.h"

static void
mt76x2_set_wlan_state(struct mt76x2_dev *dev, bool enable)
2 changes: 1 addition & 1 deletion mt76x2_mac_common.c → mt76x2/mac.c
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
*/

#include "mt76x2.h"
#include "mt76x02_util.h"
#include "../mt76x02_util.h"

void mt76x2_mac_stop(struct mt76x2_dev *dev, bool force)
{
4 changes: 2 additions & 2 deletions mt76x2_mac.h → mt76x2/mac.h
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
#ifndef __MT76x2_MAC_H
#define __MT76x2_MAC_H

#include "mt76.h"
#include "mt76x02_mac.h"
#include "../mt76.h"
#include "../mt76x02_mac.h"

struct mt76x2_dev;
struct mt76x2_sta;
6 changes: 3 additions & 3 deletions mt76x2_mcu_common.c → mt76x2/mcu.c
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@
#include <linux/delay.h>

#include "mt76x2.h"
#include "mt76x2_mcu.h"
#include "mt76x2_eeprom.h"
#include "mt76x02_dma.h"
#include "mcu.h"
#include "eeprom.h"
#include "../mt76x02_dma.h"

int mt76x2_mcu_set_channel(struct mt76x2_dev *dev, u8 channel, u8 bw,
u8 bw_index, bool scan)
2 changes: 1 addition & 1 deletion mt76x2_mcu.h → mt76x2/mcu.h
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#ifndef __MT76x2_MCU_H
#define __MT76x2_MCU_H

#include "mt76x02_mcu.h"
#include "../mt76x02_mcu.h"

/* Register definitions */
#define MT_MCU_CPU_CTL 0x0704
8 changes: 4 additions & 4 deletions mt76x2.h → mt76x2/mt76x2.h
Original file line number Diff line number Diff line change
@@ -39,10 +39,10 @@

#define MT_CALIBRATE_INTERVAL HZ

#include "mt76.h"
#include "mt76x02_regs.h"
#include "mt76x2_mac.h"
#include "mt76x2_dfs.h"
#include "../mt76.h"
#include "../mt76x02_regs.h"
#include "mac.h"
#include "dfs.h"

struct mt76x2_rx_freq_cal {
s8 high_gain[MT_MAX_CHAINS];
4 changes: 2 additions & 2 deletions mt76x2u.h → mt76x2/mt76x2u.h
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@
#include <linux/device.h>

#include "mt76x2.h"
#include "mt76x2_mcu.h"
#include "mt76x02_dma.h"
#include "mcu.h"
#include "../mt76x02_dma.h"

#define MT7612U_EEPROM_SIZE 512

2 changes: 1 addition & 1 deletion mt76x2_pci.c → mt76x2/pci.c
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
#include <linux/pci.h>

#include "mt76x2.h"
#include "mt76x2_trace.h"
#include "trace.h"

static const struct pci_device_id mt76pci_device_table[] = {
{ PCI_DEVICE(0x14c3, 0x7662) },
4 changes: 2 additions & 2 deletions mt76x2_core.c → mt76x2/pci_core.c
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

#include <linux/delay.h>
#include "mt76x2.h"
#include "mt76x2_trace.h"
#include "mt76x02_util.h"
#include "trace.h"
#include "../mt76x02_util.h"

void mt76x2_rx_poll_complete(struct mt76_dev *mdev, enum mt76_rxq_id q)
{
2 changes: 1 addition & 1 deletion mt76x2_dfs.c → mt76x2/pci_dfs.c
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
*/

#include "mt76x2.h"
#include "mt76x02_util.h"
#include "../mt76x02_util.h"

#define RADAR_SPEC(m, len, el, eh, wl, wh, \
w_tolerance, tl, th, t_tolerance, \
4 changes: 2 additions & 2 deletions mt76x2_dma.c → mt76x2/pci_dma.c
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@
*/

#include "mt76x2.h"
#include "mt76x02_dma.h"
#include "mt76x02_util.h"
#include "../mt76x02_dma.h"
#include "../mt76x02_util.h"

void mt76x2_tx_tasklet(unsigned long data)
{
8 changes: 4 additions & 4 deletions mt76x2_init.c → mt76x2/pci_init.c
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@

#include <linux/delay.h>
#include "mt76x2.h"
#include "mt76x2_eeprom.h"
#include "mt76x2_mcu.h"
#include "mt76x02_util.h"
#include "mt76x02_dma.h"
#include "eeprom.h"
#include "mcu.h"
#include "../mt76x02_util.h"
#include "../mt76x02_dma.h"

static void
mt76x2_mac_pbf_init(struct mt76x2_dev *dev)
8 changes: 4 additions & 4 deletions mt76x2_mac.c → mt76x2/pci_mac.c
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@

#include <linux/delay.h>
#include "mt76x2.h"
#include "mt76x2_mcu.h"
#include "mt76x2_eeprom.h"
#include "mt76x2_trace.h"
#include "mt76x02_util.h"
#include "mcu.h"
#include "eeprom.h"
#include "trace.h"
#include "../mt76x02_util.h"

void mt76x2_mac_set_bssid(struct mt76x2_dev *dev, u8 idx, const u8 *addr)
{
2 changes: 1 addition & 1 deletion mt76x2_main.c → mt76x2/pci_main.c
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
*/

#include "mt76x2.h"
#include "mt76x02_util.h"
#include "../mt76x02_util.h"

static int
mt76x2_start(struct ieee80211_hw *hw)
6 changes: 3 additions & 3 deletions mt76x2_mcu.c → mt76x2/pci_mcu.c
Original file line number Diff line number Diff line change
@@ -19,9 +19,9 @@
#include <linux/delay.h>

#include "mt76x2.h"
#include "mt76x2_mcu.h"
#include "mt76x2_eeprom.h"
#include "mt76x02_dma.h"
#include "mcu.h"
#include "eeprom.h"
#include "../mt76x02_dma.h"

static int
mt76pci_load_rom_patch(struct mt76x2_dev *dev)
4 changes: 2 additions & 2 deletions mt76x2_phy.c → mt76x2/pci_phy.c
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@

#include <linux/delay.h>
#include "mt76x2.h"
#include "mt76x2_mcu.h"
#include "mt76x2_eeprom.h"
#include "mcu.h"
#include "eeprom.h"

static bool
mt76x2_phy_tssi_init_cal(struct mt76x2_dev *dev)
2 changes: 1 addition & 1 deletion mt76x2_trace.c → mt76x2/pci_trace.c
Original file line number Diff line number Diff line change
@@ -18,6 +18,6 @@

#ifndef __CHECKER__
#define CREATE_TRACE_POINTS
#include "mt76x2_trace.h"
#include "trace.h"

#endif
4 changes: 2 additions & 2 deletions mt76x2_tx.c → mt76x2/pci_tx.c
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@
*/

#include "mt76x2.h"
#include "mt76x02_util.h"
#include "mt76x02_dma.h"
#include "../mt76x02_util.h"
#include "../mt76x02_dma.h"

struct beacon_bc_data {
struct mt76x2_dev *dev;
6 changes: 3 additions & 3 deletions mt76x2_phy_common.c → mt76x2/phy.c
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@
*/

#include "mt76x2.h"
#include "mt76x2_eeprom.h"
#include "mt76x2_mcu.h"
#include "mt76x02_phy.h"
#include "eeprom.h"
#include "mcu.h"
#include "../mt76x02_phy.h"

static void
mt76x2_adjust_high_lna_gain(struct mt76x2_dev *dev, int reg, s8 offset)
4 changes: 2 additions & 2 deletions mt76x2_trace.h → mt76x2/trace.h
Original file line number Diff line number Diff line change
@@ -137,8 +137,8 @@ TRACE_EVENT(dev_irq,
#endif

#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#define TRACE_INCLUDE_PATH mt76x2
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE mt76x2_trace
#define TRACE_INCLUDE_FILE trace

#include <trace/define_trace.h>
2 changes: 1 addition & 1 deletion mt76x2_tx_common.c → mt76x2/tx.c
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
*/

#include "mt76x2.h"
#include "dma.h"
#include "../dma.h"

void mt76x2_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
struct sk_buff *skb)
2 changes: 1 addition & 1 deletion mt76x2_usb.c → mt76x2/usb.c
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
#include <linux/kernel.h>
#include <linux/module.h>

#include "mt76x02_usb.h"
#include "../mt76x02_usb.h"
#include "mt76x2u.h"

static const struct usb_device_id mt76x2u_device_table[] = {
6 changes: 3 additions & 3 deletions mt76x2u_core.c → mt76x2/usb_core.c
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@
*/

#include "mt76x2u.h"
#include "dma.h"
#include "mt76x02_util.h"
#include "mt76x02_usb.h"
#include "../dma.h"
#include "../mt76x02_util.h"
#include "../mt76x02_usb.h"

static int
mt76x2u_check_skb_rooms(struct sk_buff *skb)
6 changes: 3 additions & 3 deletions mt76x2u_init.c → mt76x2/usb_init.c
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@
#include <linux/delay.h>

#include "mt76x2u.h"
#include "mt76x02_util.h"
#include "mt76x02_phy.h"
#include "mt76x2_eeprom.h"
#include "../mt76x02_util.h"
#include "../mt76x02_phy.h"
#include "eeprom.h"

static void mt76x2u_init_dma(struct mt76x2_dev *dev)
{
2 changes: 1 addition & 1 deletion mt76x2u_mac.c → mt76x2/usb_mac.c
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
*/

#include "mt76x2u.h"
#include "mt76x2_eeprom.h"
#include "eeprom.h"

static void mt76x2u_mac_reset_counters(struct mt76x2_dev *dev)
{
2 changes: 1 addition & 1 deletion mt76x2u_main.c → mt76x2/usb_main.c
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
*/

#include "mt76x2u.h"
#include "mt76x02_util.h"
#include "../mt76x02_util.h"

static int mt76x2u_start(struct ieee80211_hw *hw)
{
4 changes: 2 additions & 2 deletions mt76x2u_mcu.c → mt76x2/usb_mcu.c
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@
#include <linux/firmware.h>

#include "mt76x2u.h"
#include "mt76x2_eeprom.h"
#include "mt76x02_usb.h"
#include "eeprom.h"
#include "../mt76x02_usb.h"

#define MT_CMD_HDR_LEN 4

2 changes: 1 addition & 1 deletion mt76x2u_phy.c → mt76x2/usb_phy.c
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
*/

#include "mt76x2u.h"
#include "mt76x2_eeprom.h"
#include "eeprom.h"

void mt76x2u_phy_channel_calibrate(struct mt76x2_dev *dev)
{

0 comments on commit c6b1926

Please sign in to comment.