mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
Remove mt76x0u_alloc_device since it just runs mt76_alloc_device. Move mt76_alloc_device call in mt76x0u_probe and in mt76x0e_probe Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
70 lines
2.0 KiB
C
70 lines
2.0 KiB
C
/*
|
|
* Copyright (C) 2014 Felix Fietkau <[email protected]>
|
|
* Copyright (C) 2015 Jakub Kicinski <[email protected]>
|
|
* Copyright (C) 2018 Stanislaw Gruszka <[email protected]>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2
|
|
* as published by the Free Software Foundation
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef MT76X0U_H
|
|
#define MT76X0U_H
|
|
|
|
#include <linux/bitfield.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/device.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/usb.h>
|
|
#include <linux/completion.h>
|
|
#include <net/mac80211.h>
|
|
#include <linux/debugfs.h>
|
|
|
|
#include "../mt76x02.h"
|
|
#include "eeprom.h"
|
|
|
|
#define MT7610E_FIRMWARE "mediatek/mt7610e.bin"
|
|
#define MT7650E_FIRMWARE "mediatek/mt7650e.bin"
|
|
|
|
#define MT7610U_FIRMWARE "mediatek/mt7610u.bin"
|
|
|
|
#define MT_USB_AGGR_SIZE_LIMIT 21 /* * 1024B */
|
|
#define MT_USB_AGGR_TIMEOUT 0x80 /* * 33ns */
|
|
|
|
static inline bool is_mt7610e(struct mt76x02_dev *dev)
|
|
{
|
|
if (!mt76_is_mmio(dev))
|
|
return false;
|
|
|
|
return mt76_chip(&dev->mt76) == 0x7610;
|
|
}
|
|
|
|
static inline bool is_mt7630(struct mt76x02_dev *dev)
|
|
{
|
|
return mt76_chip(&dev->mt76) == 0x7630;
|
|
}
|
|
|
|
/* Init */
|
|
int mt76x0_init_hardware(struct mt76x02_dev *dev);
|
|
int mt76x0_register_device(struct mt76x02_dev *dev);
|
|
void mt76x0_chip_onoff(struct mt76x02_dev *dev, bool enable, bool reset);
|
|
|
|
int mt76x0_mac_start(struct mt76x02_dev *dev);
|
|
void mt76x0_mac_stop(struct mt76x02_dev *dev);
|
|
|
|
int mt76x0_config(struct ieee80211_hw *hw, u32 changed);
|
|
|
|
/* PHY */
|
|
void mt76x0_phy_init(struct mt76x02_dev *dev);
|
|
int mt76x0_phy_wait_bbp_ready(struct mt76x02_dev *dev);
|
|
int mt76x0_phy_set_channel(struct mt76x02_dev *dev,
|
|
struct cfg80211_chan_def *chandef);
|
|
void mt76x0_phy_set_txpower(struct mt76x02_dev *dev);
|
|
void mt76x0_phy_calibrate(struct mt76x02_dev *dev, bool power_on);
|
|
#endif
|