mt7915.h (beed8bea8d7485c7697dcbc8d7f9cb7303b39d3a) | mt7915.h (e2c93b68cb54448c2fef24bb719a244dcef3b79e) |
---|---|
1/* SPDX-License-Identifier: ISC */ 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#ifndef __MT7915_H 5#define __MT7915_H 6 7#include <linux/interrupt.h> 8#include <linux/ktime.h> | 1/* SPDX-License-Identifier: ISC */ 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#ifndef __MT7915_H 5#define __MT7915_H 6 7#include <linux/interrupt.h> 8#include <linux/ktime.h> |
9#include "../mt76.h" | 9#include "../mt76_connac.h" |
10#include "regs.h" 11 12#define MT7915_MAX_INTERFACES 19 13#define MT7915_MAX_WMM_SETS 4 14#define MT7915_WTBL_SIZE 288 15#define MT7916_WTBL_SIZE 544 16#define MT7915_WTBL_RESERVED (mt7915_wtbl_size(dev) - 1) 17#define MT7915_WTBL_STA (MT7915_WTBL_RESERVED - \ --- 456 unchanged lines hidden (view full) --- 474int mt7915_mcu_rdd_cmd(struct mt7915_dev *dev, enum mt7915_rdd_cmd cmd, 475 u8 index, u8 rx_sel, u8 val); 476int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3); 477int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl); 478int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level); 479void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb); 480void mt7915_mcu_exit(struct mt7915_dev *dev); 481 | 10#include "regs.h" 11 12#define MT7915_MAX_INTERFACES 19 13#define MT7915_MAX_WMM_SETS 4 14#define MT7915_WTBL_SIZE 288 15#define MT7916_WTBL_SIZE 544 16#define MT7915_WTBL_RESERVED (mt7915_wtbl_size(dev) - 1) 17#define MT7915_WTBL_STA (MT7915_WTBL_RESERVED - \ --- 456 unchanged lines hidden (view full) --- 474int mt7915_mcu_rdd_cmd(struct mt7915_dev *dev, enum mt7915_rdd_cmd cmd, 475 u8 index, u8 rx_sel, u8 val); 476int mt7915_mcu_wa_cmd(struct mt7915_dev *dev, int cmd, u32 a1, u32 a2, u32 a3); 477int mt7915_mcu_fw_log_2_host(struct mt7915_dev *dev, u8 type, u8 ctrl); 478int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level); 479void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb); 480void mt7915_mcu_exit(struct mt7915_dev *dev); 481 |
482static inline bool is_mt7915(struct mt76_dev *dev) 483{ 484 return mt76_chip(dev) == 0x7915; 485} 486 | |
487static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev) 488{ 489 return is_mt7915(&dev->mt76) ? MT7915_WTBL_SIZE : MT7916_WTBL_SIZE; 490} 491 492static inline u16 mt7915_eeprom_size(struct mt7915_dev *dev) 493{ 494 return is_mt7915(&dev->mt76) ? MT7915_EEPROM_SIZE : MT7916_EEPROM_SIZE; --- 72 unchanged lines hidden --- | 482static inline u16 mt7915_wtbl_size(struct mt7915_dev *dev) 483{ 484 return is_mt7915(&dev->mt76) ? MT7915_WTBL_SIZE : MT7916_WTBL_SIZE; 485} 486 487static inline u16 mt7915_eeprom_size(struct mt7915_dev *dev) 488{ 489 return is_mt7915(&dev->mt76) ? MT7915_EEPROM_SIZE : MT7916_EEPROM_SIZE; --- 72 unchanged lines hidden --- |