mt7921.h (ffa1bf97425bd511b105ce769976e20a845a71e9) | mt7921.h (67aa27431c7f871962fccdb70ae1f3883691e958) |
---|---|
1/* SPDX-License-Identifier: ISC */ 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#ifndef __MT7921_H 5#define __MT7921_H 6 7#include <linux/interrupt.h> 8#include <linux/ktime.h> --- 153 unchanged lines hidden (view full) --- 162 spinlock_t token_lock; 163 int token_count; 164 struct idr token; 165 166 u8 fw_debug; 167}; 168 169enum { | 1/* SPDX-License-Identifier: ISC */ 2/* Copyright (C) 2020 MediaTek Inc. */ 3 4#ifndef __MT7921_H 5#define __MT7921_H 6 7#include <linux/interrupt.h> 8#include <linux/ktime.h> --- 153 unchanged lines hidden (view full) --- 162 spinlock_t token_lock; 163 int token_count; 164 struct idr token; 165 166 u8 fw_debug; 167}; 168 169enum { |
170 HW_BSSID_0 = 0x0, 171 HW_BSSID_1, 172 HW_BSSID_2, 173 HW_BSSID_3, 174 HW_BSSID_MAX = HW_BSSID_3, 175 EXT_BSSID_START = 0x10, 176 EXT_BSSID_1, 177 EXT_BSSID_15 = 0x1f, 178 EXT_BSSID_MAX = EXT_BSSID_15, 179 REPEATER_BSSID_START = 0x20, 180 REPEATER_BSSID_MAX = 0x3f, 181}; 182 183enum { | |
184 MT_LMAC_AC00, 185 MT_LMAC_AC01, 186 MT_LMAC_AC02, 187 MT_LMAC_AC03, 188 MT_LMAC_ALTX0 = 0x10, 189 MT_LMAC_BMC0, 190 MT_LMAC_BCN0, 191}; --- 42 unchanged lines hidden (view full) --- 234int mt7921_mcu_add_key(struct mt7921_dev *dev, struct ieee80211_vif *vif, 235 struct mt7921_sta *msta, struct ieee80211_key_conf *key, 236 enum set_key_cmd cmd); 237int mt7921_set_channel(struct mt7921_phy *phy); 238int mt7921_mcu_set_chan_info(struct mt7921_phy *phy, int cmd); 239int mt7921_mcu_set_tx(struct mt7921_dev *dev, struct ieee80211_vif *vif); 240int mt7921_mcu_set_eeprom(struct mt7921_dev *dev); 241int mt7921_mcu_get_eeprom(struct mt7921_dev *dev, u32 offset); | 170 MT_LMAC_AC00, 171 MT_LMAC_AC01, 172 MT_LMAC_AC02, 173 MT_LMAC_AC03, 174 MT_LMAC_ALTX0 = 0x10, 175 MT_LMAC_BMC0, 176 MT_LMAC_BCN0, 177}; --- 42 unchanged lines hidden (view full) --- 220int mt7921_mcu_add_key(struct mt7921_dev *dev, struct ieee80211_vif *vif, 221 struct mt7921_sta *msta, struct ieee80211_key_conf *key, 222 enum set_key_cmd cmd); 223int mt7921_set_channel(struct mt7921_phy *phy); 224int mt7921_mcu_set_chan_info(struct mt7921_phy *phy, int cmd); 225int mt7921_mcu_set_tx(struct mt7921_dev *dev, struct ieee80211_vif *vif); 226int mt7921_mcu_set_eeprom(struct mt7921_dev *dev); 227int mt7921_mcu_get_eeprom(struct mt7921_dev *dev, u32 offset); |
242int mt7921_mcu_set_mac(struct mt7921_dev *dev, int band, bool enable, 243 bool hdr_trans); 244int mt7921_mcu_set_rts_thresh(struct mt7921_phy *phy, u32 val); | 228int mt7921_mcu_get_rx_rate(struct mt7921_phy *phy, struct ieee80211_vif *vif, 229 struct ieee80211_sta *sta, struct rate_info *rate); |
245int mt7921_mcu_fw_log_2_host(struct mt7921_dev *dev, u8 ctrl); 246void mt7921_mcu_rx_event(struct mt7921_dev *dev, struct sk_buff *skb); 247void mt7921_mcu_exit(struct mt7921_dev *dev); 248 | 230int mt7921_mcu_fw_log_2_host(struct mt7921_dev *dev, u8 ctrl); 231void mt7921_mcu_rx_event(struct mt7921_dev *dev, struct sk_buff *skb); 232void mt7921_mcu_exit(struct mt7921_dev *dev); 233 |
249static inline bool is_mt7921(struct mt76_dev *dev) 250{ 251 return mt76_chip(dev) == 0x7961; 252} 253 | |
254static inline void mt7921_irq_enable(struct mt7921_dev *dev, u32 mask) 255{ 256 mt76_set_irq_mask(&dev->mt76, 0, 0, mask); 257 258 tasklet_schedule(&dev->irq_tasklet); 259} 260 261static inline u32 --- 59 unchanged lines hidden (view full) --- 321 struct sk_buff *skb); 322void mt7921_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps); 323void mt7921_stats_work(struct work_struct *work); 324void mt7921_txp_skb_unmap(struct mt76_dev *dev, 325 struct mt76_txwi_cache *txwi); 326void mt7921_set_stream_he_caps(struct mt7921_phy *phy); 327void mt7921_update_channel(struct mt76_dev *mdev); 328int mt7921_init_debugfs(struct mt7921_dev *dev); | 234static inline void mt7921_irq_enable(struct mt7921_dev *dev, u32 mask) 235{ 236 mt76_set_irq_mask(&dev->mt76, 0, 0, mask); 237 238 tasklet_schedule(&dev->irq_tasklet); 239} 240 241static inline u32 --- 59 unchanged lines hidden (view full) --- 301 struct sk_buff *skb); 302void mt7921_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps); 303void mt7921_stats_work(struct work_struct *work); 304void mt7921_txp_skb_unmap(struct mt76_dev *dev, 305 struct mt76_txwi_cache *txwi); 306void mt7921_set_stream_he_caps(struct mt7921_phy *phy); 307void mt7921_update_channel(struct mt76_dev *mdev); 308int mt7921_init_debugfs(struct mt7921_dev *dev); |
329int 330mt7921_mcu_uni_add_dev(struct mt7921_dev *dev, 331 struct ieee80211_vif *vif, bool enable); 332int 333mt7921_mcu_uni_add_bss(struct mt7921_phy *phy, struct ieee80211_vif *vif, 334 bool enable); | |
335 | 309 |
336int 337mt7921_mcu_uni_add_sta(struct mt7921_dev *dev, struct ieee80211_vif *vif, 338 struct ieee80211_sta *sta, bool enable); | |
339int mt7921_mcu_uni_tx_ba(struct mt7921_dev *dev, 340 struct ieee80211_ampdu_params *params, 341 bool enable); 342int mt7921_mcu_uni_rx_ba(struct mt7921_dev *dev, 343 struct ieee80211_ampdu_params *params, 344 bool enable); 345void mt7921_scan_work(struct work_struct *work); | 310int mt7921_mcu_uni_tx_ba(struct mt7921_dev *dev, 311 struct ieee80211_ampdu_params *params, 312 bool enable); 313int mt7921_mcu_uni_rx_ba(struct mt7921_dev *dev, 314 struct ieee80211_ampdu_params *params, 315 bool enable); 316void mt7921_scan_work(struct work_struct *work); |
346int mt7921_mcu_set_channel_domain(struct mt7921_phy *phy); | |
347int mt7921_mcu_hw_scan(struct mt7921_phy *phy, struct ieee80211_vif *vif, 348 struct ieee80211_scan_request *scan_req); 349int mt7921_mcu_sched_scan_req(struct mt7921_phy *phy, 350 struct ieee80211_vif *vif, 351 struct cfg80211_sched_scan_request *sreq); 352int mt7921_mcu_sched_scan_enable(struct mt7921_phy *phy, 353 struct ieee80211_vif *vif, 354 bool enable); --- 18 unchanged lines hidden --- | 317int mt7921_mcu_hw_scan(struct mt7921_phy *phy, struct ieee80211_vif *vif, 318 struct ieee80211_scan_request *scan_req); 319int mt7921_mcu_sched_scan_req(struct mt7921_phy *phy, 320 struct ieee80211_vif *vif, 321 struct cfg80211_sched_scan_request *sreq); 322int mt7921_mcu_sched_scan_enable(struct mt7921_phy *phy, 323 struct ieee80211_vif *vif, 324 bool enable); --- 18 unchanged lines hidden --- |