mt7921.h (78562b2cafc61a0c08dc949eacb942ac756aae37) | mt7921.h (975e122ddb7cd6f67bff974d2ea00c5568d2014c) |
---|---|
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> --- 187 unchanged lines hidden (view full) --- 196 u8 nr_country; 197 u8 type; 198 u8 rsv[8]; 199 u8 data[]; 200} __packed; 201 202struct mt792x_phy { 203 struct mt76_phy *mt76; | 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> --- 187 unchanged lines hidden (view full) --- 196 u8 nr_country; 197 u8 type; 198 u8 rsv[8]; 199 u8 data[]; 200} __packed; 201 202struct mt792x_phy { 203 struct mt76_phy *mt76; |
204 struct mt7921_dev *dev; | 204 struct mt792x_dev *dev; |
205 206 struct ieee80211_sband_iftype_data iftype[NUM_NL80211_BANDS][NUM_NL80211_IFTYPES]; 207 208 u64 omac_mask; 209 210 u16 noise; 211 212 s16 coverage_class; --- 32 unchanged lines hidden (view full) --- 245#define MT_EE_HW_TYPE_ENCAP BIT(0) 246 247#define mt7921_init_reset(dev) ((dev)->hif_ops->init_reset(dev)) 248#define mt7921_dev_reset(dev) ((dev)->hif_ops->reset(dev)) 249#define mt7921_mcu_init(dev) ((dev)->hif_ops->mcu_init(dev)) 250#define __mt7921_mcu_drv_pmctrl(dev) ((dev)->hif_ops->drv_own(dev)) 251#define __mt7921_mcu_fw_pmctrl(dev) ((dev)->hif_ops->fw_own(dev)) 252struct mt7921_hif_ops { | 205 206 struct ieee80211_sband_iftype_data iftype[NUM_NL80211_BANDS][NUM_NL80211_IFTYPES]; 207 208 u64 omac_mask; 209 210 u16 noise; 211 212 s16 coverage_class; --- 32 unchanged lines hidden (view full) --- 245#define MT_EE_HW_TYPE_ENCAP BIT(0) 246 247#define mt7921_init_reset(dev) ((dev)->hif_ops->init_reset(dev)) 248#define mt7921_dev_reset(dev) ((dev)->hif_ops->reset(dev)) 249#define mt7921_mcu_init(dev) ((dev)->hif_ops->mcu_init(dev)) 250#define __mt7921_mcu_drv_pmctrl(dev) ((dev)->hif_ops->drv_own(dev)) 251#define __mt7921_mcu_fw_pmctrl(dev) ((dev)->hif_ops->fw_own(dev)) 252struct mt7921_hif_ops { |
253 int (*init_reset)(struct mt7921_dev *dev); 254 int (*reset)(struct mt7921_dev *dev); 255 int (*mcu_init)(struct mt7921_dev *dev); 256 int (*drv_own)(struct mt7921_dev *dev); 257 int (*fw_own)(struct mt7921_dev *dev); | 253 int (*init_reset)(struct mt792x_dev *dev); 254 int (*reset)(struct mt792x_dev *dev); 255 int (*mcu_init)(struct mt792x_dev *dev); 256 int (*drv_own)(struct mt792x_dev *dev); 257 int (*fw_own)(struct mt792x_dev *dev); |
258}; 259 | 258}; 259 |
260struct mt7921_dev { | 260struct mt792x_dev { |
261 union { /* must be first */ 262 struct mt76_dev mt76; 263 struct mt76_phy mphy; 264 }; 265 266 const struct mt76_bus_ops *bus_ops; 267 struct mt792x_phy phy; 268 --- 51 unchanged lines hidden (view full) --- 320static inline struct mt792x_phy * 321mt7921_hw_phy(struct ieee80211_hw *hw) 322{ 323 struct mt76_phy *phy = hw->priv; 324 325 return phy->priv; 326} 327 | 261 union { /* must be first */ 262 struct mt76_dev mt76; 263 struct mt76_phy mphy; 264 }; 265 266 const struct mt76_bus_ops *bus_ops; 267 struct mt792x_phy phy; 268 --- 51 unchanged lines hidden (view full) --- 320static inline struct mt792x_phy * 321mt7921_hw_phy(struct ieee80211_hw *hw) 322{ 323 struct mt76_phy *phy = hw->priv; 324 325 return phy->priv; 326} 327 |
328static inline struct mt7921_dev * | 328static inline struct mt792x_dev * |
329mt7921_hw_dev(struct ieee80211_hw *hw) 330{ 331 struct mt76_phy *phy = hw->priv; 332 | 329mt7921_hw_dev(struct ieee80211_hw *hw) 330{ 331 struct mt76_phy *phy = hw->priv; 332 |
333 return container_of(phy->dev, struct mt7921_dev, mt76); | 333 return container_of(phy->dev, struct mt792x_dev, mt76); |
334} 335 336#define mt7921_mutex_acquire(dev) \ 337 mt76_connac_mutex_acquire(&(dev)->mt76, &(dev)->pm) 338#define mt7921_mutex_release(dev) \ 339 mt76_connac_mutex_release(&(dev)->mt76, &(dev)->pm) 340 341extern const struct ieee80211_ops mt7921_ops; 342 | 334} 335 336#define mt7921_mutex_acquire(dev) \ 337 mt76_connac_mutex_acquire(&(dev)->mt76, &(dev)->pm) 338#define mt7921_mutex_release(dev) \ 339 mt76_connac_mutex_release(&(dev)->mt76, &(dev)->pm) 340 341extern const struct ieee80211_ops mt7921_ops; 342 |
343u32 mt7921_reg_map(struct mt7921_dev *dev, u32 addr); | 343u32 mt7921_reg_map(struct mt792x_dev *dev, u32 addr); |
344 345int __mt7921_start(struct mt792x_phy *phy); | 344 345int __mt7921_start(struct mt792x_phy *phy); |
346int mt7921_register_device(struct mt7921_dev *dev); 347void mt7921_unregister_device(struct mt7921_dev *dev); 348int mt7921_dma_init(struct mt7921_dev *dev); 349int mt7921_wpdma_reset(struct mt7921_dev *dev, bool force); 350int mt7921_wpdma_reinit_cond(struct mt7921_dev *dev); 351void mt7921_dma_cleanup(struct mt7921_dev *dev); 352int mt7921_run_firmware(struct mt7921_dev *dev); 353int mt7921_mcu_set_bss_pm(struct mt7921_dev *dev, struct ieee80211_vif *vif, | 346int mt7921_register_device(struct mt792x_dev *dev); 347void mt7921_unregister_device(struct mt792x_dev *dev); 348int mt7921_dma_init(struct mt792x_dev *dev); 349int mt7921_wpdma_reset(struct mt792x_dev *dev, bool force); 350int mt7921_wpdma_reinit_cond(struct mt792x_dev *dev); 351void mt7921_dma_cleanup(struct mt792x_dev *dev); 352int mt7921_run_firmware(struct mt792x_dev *dev); 353int mt7921_mcu_set_bss_pm(struct mt792x_dev *dev, struct ieee80211_vif *vif, |
354 bool enable); | 354 bool enable); |
355int mt7921_mcu_sta_update(struct mt7921_dev *dev, struct ieee80211_sta *sta, | 355int mt7921_mcu_sta_update(struct mt792x_dev *dev, struct ieee80211_sta *sta, |
356 struct ieee80211_vif *vif, bool enable, 357 enum mt76_sta_info_state state); 358int mt7921_mcu_set_chan_info(struct mt792x_phy *phy, int cmd); | 356 struct ieee80211_vif *vif, bool enable, 357 enum mt76_sta_info_state state); 358int mt7921_mcu_set_chan_info(struct mt792x_phy *phy, int cmd); |
359int mt7921_mcu_set_tx(struct mt7921_dev *dev, struct ieee80211_vif *vif); 360int mt7921_mcu_set_eeprom(struct mt7921_dev *dev); | 359int mt7921_mcu_set_tx(struct mt792x_dev *dev, struct ieee80211_vif *vif); 360int mt7921_mcu_set_eeprom(struct mt792x_dev *dev); |
361int mt7921_mcu_get_rx_rate(struct mt792x_phy *phy, struct ieee80211_vif *vif, 362 struct ieee80211_sta *sta, struct rate_info *rate); | 361int mt7921_mcu_get_rx_rate(struct mt792x_phy *phy, struct ieee80211_vif *vif, 362 struct ieee80211_sta *sta, struct rate_info *rate); |
363int mt7921_mcu_fw_log_2_host(struct mt7921_dev *dev, u8 ctrl); 364void mt7921_mcu_rx_event(struct mt7921_dev *dev, struct sk_buff *skb); 365int mt7921_mcu_set_rxfilter(struct mt7921_dev *dev, u32 fif, | 363int mt7921_mcu_fw_log_2_host(struct mt792x_dev *dev, u8 ctrl); 364void mt7921_mcu_rx_event(struct mt792x_dev *dev, struct sk_buff *skb); 365int mt7921_mcu_set_rxfilter(struct mt792x_dev *dev, u32 fif, |
366 u8 bit_op, u32 bit_map); 367 368static inline u32 | 366 u8 bit_op, u32 bit_map); 367 368static inline u32 |
369mt7921_reg_map_l1(struct mt7921_dev *dev, u32 addr) | 369mt7921_reg_map_l1(struct mt792x_dev *dev, u32 addr) |
370{ 371 u32 offset = FIELD_GET(MT_HIF_REMAP_L1_OFFSET, addr); 372 u32 base = FIELD_GET(MT_HIF_REMAP_L1_BASE, addr); 373 374 mt76_rmw_field(dev, MT_HIF_REMAP_L1, MT_HIF_REMAP_L1_MASK, base); 375 /* use read to push write */ 376 mt76_rr(dev, MT_HIF_REMAP_L1); 377 378 return MT_HIF_REMAP_BASE_L1 + offset; 379} 380 381static inline u32 | 370{ 371 u32 offset = FIELD_GET(MT_HIF_REMAP_L1_OFFSET, addr); 372 u32 base = FIELD_GET(MT_HIF_REMAP_L1_BASE, addr); 373 374 mt76_rmw_field(dev, MT_HIF_REMAP_L1, MT_HIF_REMAP_L1_MASK, base); 375 /* use read to push write */ 376 mt76_rr(dev, MT_HIF_REMAP_L1); 377 378 return MT_HIF_REMAP_BASE_L1 + offset; 379} 380 381static inline u32 |
382mt7921_l1_rr(struct mt7921_dev *dev, u32 addr) | 382mt7921_l1_rr(struct mt792x_dev *dev, u32 addr) |
383{ 384 return mt76_rr(dev, mt7921_reg_map_l1(dev, addr)); 385} 386 387static inline void | 383{ 384 return mt76_rr(dev, mt7921_reg_map_l1(dev, addr)); 385} 386 387static inline void |
388mt7921_l1_wr(struct mt7921_dev *dev, u32 addr, u32 val) | 388mt7921_l1_wr(struct mt792x_dev *dev, u32 addr, u32 val) |
389{ 390 mt76_wr(dev, mt7921_reg_map_l1(dev, addr), val); 391} 392 393static inline u32 | 389{ 390 mt76_wr(dev, mt7921_reg_map_l1(dev, addr), val); 391} 392 393static inline u32 |
394mt7921_l1_rmw(struct mt7921_dev *dev, u32 addr, u32 mask, u32 val) | 394mt7921_l1_rmw(struct mt792x_dev *dev, u32 addr, u32 mask, u32 val) |
395{ 396 val |= mt7921_l1_rr(dev, addr) & ~mask; 397 mt7921_l1_wr(dev, addr, val); 398 399 return val; 400} 401 402#define mt7921_l1_set(dev, addr, val) mt7921_l1_rmw(dev, addr, 0, val) 403#define mt7921_l1_clear(dev, addr, val) mt7921_l1_rmw(dev, addr, val, 0) 404 | 395{ 396 val |= mt7921_l1_rr(dev, addr) & ~mask; 397 mt7921_l1_wr(dev, addr, val); 398 399 return val; 400} 401 402#define mt7921_l1_set(dev, addr, val) mt7921_l1_rmw(dev, addr, 0, val) 403#define mt7921_l1_clear(dev, addr, val) mt7921_l1_rmw(dev, addr, val, 0) 404 |
405static inline bool mt7921_dma_need_reinit(struct mt7921_dev *dev) | 405static inline bool mt7921_dma_need_reinit(struct mt792x_dev *dev) |
406{ 407 return !mt76_get_field(dev, MT_WFDMA_DUMMY_CR, MT_WFDMA_NEED_REINIT); 408} 409 410static inline void | 406{ 407 return !mt76_get_field(dev, MT_WFDMA_DUMMY_CR, MT_WFDMA_NEED_REINIT); 408} 409 410static inline void |
411mt7921_skb_add_usb_sdio_hdr(struct mt7921_dev *dev, struct sk_buff *skb, | 411mt7921_skb_add_usb_sdio_hdr(struct mt792x_dev *dev, struct sk_buff *skb, |
412 int type) 413{ 414 u32 hdr, len; 415 416 len = mt76_is_usb(&dev->mt76) ? skb->len : skb->len + sizeof(hdr); 417 hdr = FIELD_PREP(MT7921_SDIO_HDR_TX_BYTES, len) | 418 FIELD_PREP(MT7921_SDIO_HDR_PKT_TYPE, type); 419 420 put_unaligned_le32(hdr, skb_push(skb, sizeof(hdr))); 421} 422 423void mt7921_stop(struct ieee80211_hw *hw); | 412 int type) 413{ 414 u32 hdr, len; 415 416 len = mt76_is_usb(&dev->mt76) ? skb->len : skb->len + sizeof(hdr); 417 hdr = FIELD_PREP(MT7921_SDIO_HDR_TX_BYTES, len) | 418 FIELD_PREP(MT7921_SDIO_HDR_PKT_TYPE, type); 419 420 put_unaligned_le32(hdr, skb_push(skb, sizeof(hdr))); 421} 422 423void mt7921_stop(struct ieee80211_hw *hw); |
424int mt7921_mac_init(struct mt7921_dev *dev); 425bool mt7921_mac_wtbl_update(struct mt7921_dev *dev, int idx, u32 mask); | 424int mt7921_mac_init(struct mt792x_dev *dev); 425bool mt7921_mac_wtbl_update(struct mt792x_dev *dev, int idx, u32 mask); |
426void mt7921_mac_reset_counters(struct mt792x_phy *phy); 427void mt7921_mac_set_timing(struct mt792x_phy *phy); 428int mt7921_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, 429 struct ieee80211_sta *sta); 430void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif, 431 struct ieee80211_sta *sta); 432void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, 433 struct ieee80211_sta *sta); --- 8 unchanged lines hidden (view full) --- 442 443void mt7921_tx_worker(struct mt76_worker *w); 444bool mt7921_rx_check(struct mt76_dev *mdev, void *data, int len); 445void mt7921_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q, 446 struct sk_buff *skb, u32 *info); 447void mt7921_stats_work(struct work_struct *work); 448void mt7921_set_stream_he_caps(struct mt792x_phy *phy); 449void mt7921_update_channel(struct mt76_phy *mphy); | 426void mt7921_mac_reset_counters(struct mt792x_phy *phy); 427void mt7921_mac_set_timing(struct mt792x_phy *phy); 428int mt7921_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, 429 struct ieee80211_sta *sta); 430void mt7921_mac_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif, 431 struct ieee80211_sta *sta); 432void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, 433 struct ieee80211_sta *sta); --- 8 unchanged lines hidden (view full) --- 442 443void mt7921_tx_worker(struct mt76_worker *w); 444bool mt7921_rx_check(struct mt76_dev *mdev, void *data, int len); 445void mt7921_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q, 446 struct sk_buff *skb, u32 *info); 447void mt7921_stats_work(struct work_struct *work); 448void mt7921_set_stream_he_caps(struct mt792x_phy *phy); 449void mt7921_update_channel(struct mt76_phy *mphy); |
450int mt7921_init_debugfs(struct mt7921_dev *dev); | 450int mt7921_init_debugfs(struct mt792x_dev *dev); |
451 | 451 |
452int mt7921_mcu_set_beacon_filter(struct mt7921_dev *dev, | 452int mt7921_mcu_set_beacon_filter(struct mt792x_dev *dev, |
453 struct ieee80211_vif *vif, 454 bool enable); | 453 struct ieee80211_vif *vif, 454 bool enable); |
455int mt7921_mcu_uni_tx_ba(struct mt7921_dev *dev, | 455int mt7921_mcu_uni_tx_ba(struct mt792x_dev *dev, |
456 struct ieee80211_ampdu_params *params, 457 bool enable); | 456 struct ieee80211_ampdu_params *params, 457 bool enable); |
458int mt7921_mcu_uni_rx_ba(struct mt7921_dev *dev, | 458int mt7921_mcu_uni_rx_ba(struct mt792x_dev *dev, |
459 struct ieee80211_ampdu_params *params, 460 bool enable); 461void mt7921_scan_work(struct work_struct *work); 462void mt7921_roc_work(struct work_struct *work); 463void mt7921_roc_timer(struct timer_list *timer); | 459 struct ieee80211_ampdu_params *params, 460 bool enable); 461void mt7921_scan_work(struct work_struct *work); 462void mt7921_roc_work(struct work_struct *work); 463void mt7921_roc_timer(struct timer_list *timer); |
464int mt7921_mcu_uni_bss_ps(struct mt7921_dev *dev, struct ieee80211_vif *vif); 465int mt7921_mcu_drv_pmctrl(struct mt7921_dev *dev); 466int mt7921_mcu_fw_pmctrl(struct mt7921_dev *dev); | 464int mt7921_mcu_uni_bss_ps(struct mt792x_dev *dev, struct ieee80211_vif *vif); 465int mt7921_mcu_drv_pmctrl(struct mt792x_dev *dev); 466int mt7921_mcu_fw_pmctrl(struct mt792x_dev *dev); |
467void mt7921_pm_wake_work(struct work_struct *work); 468void mt7921_pm_power_save_work(struct work_struct *work); 469void mt7921_coredump_work(struct work_struct *work); | 467void mt7921_pm_wake_work(struct work_struct *work); 468void mt7921_pm_power_save_work(struct work_struct *work); 469void mt7921_coredump_work(struct work_struct *work); |
470int mt7921_wfsys_reset(struct mt7921_dev *dev); 471int mt7921_get_txpwr_info(struct mt7921_dev *dev, struct mt7921_txpwr *txpwr); | 470int mt7921_wfsys_reset(struct mt792x_dev *dev); 471int mt7921_get_txpwr_info(struct mt792x_dev *dev, struct mt7921_txpwr *txpwr); |
472int mt7921_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 473 void *data, int len); 474int mt7921_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg, 475 struct netlink_callback *cb, void *data, int len); 476int mt7921_mcu_parse_response(struct mt76_dev *mdev, int cmd, 477 struct sk_buff *skb, int seq); 478 | 472int mt7921_testmode_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 473 void *data, int len); 474int mt7921_testmode_dump(struct ieee80211_hw *hw, struct sk_buff *msg, 475 struct netlink_callback *cb, void *data, int len); 476int mt7921_mcu_parse_response(struct mt76_dev *mdev, int cmd, 477 struct sk_buff *skb, int seq); 478 |
479int mt7921e_driver_own(struct mt7921_dev *dev); 480int mt7921e_mac_reset(struct mt7921_dev *dev); 481int mt7921e_mcu_init(struct mt7921_dev *dev); 482int mt7921s_wfsys_reset(struct mt7921_dev *dev); 483int mt7921s_mac_reset(struct mt7921_dev *dev); 484int mt7921s_init_reset(struct mt7921_dev *dev); 485int __mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev); 486int mt7921e_mcu_drv_pmctrl(struct mt7921_dev *dev); 487int mt7921e_mcu_fw_pmctrl(struct mt7921_dev *dev); | 479int mt7921e_driver_own(struct mt792x_dev *dev); 480int mt7921e_mac_reset(struct mt792x_dev *dev); 481int mt7921e_mcu_init(struct mt792x_dev *dev); 482int mt7921s_wfsys_reset(struct mt792x_dev *dev); 483int mt7921s_mac_reset(struct mt792x_dev *dev); 484int mt7921s_init_reset(struct mt792x_dev *dev); 485int __mt7921e_mcu_drv_pmctrl(struct mt792x_dev *dev); 486int mt7921e_mcu_drv_pmctrl(struct mt792x_dev *dev); 487int mt7921e_mcu_fw_pmctrl(struct mt792x_dev *dev); |
488 | 488 |
489int mt7921s_mcu_init(struct mt7921_dev *dev); 490int mt7921s_mcu_drv_pmctrl(struct mt7921_dev *dev); 491int mt7921s_mcu_fw_pmctrl(struct mt7921_dev *dev); 492void mt7921_mac_add_txs(struct mt7921_dev *dev, void *data); 493void mt7921_set_runtime_pm(struct mt7921_dev *dev); | 489int mt7921s_mcu_init(struct mt792x_dev *dev); 490int mt7921s_mcu_drv_pmctrl(struct mt792x_dev *dev); 491int mt7921s_mcu_fw_pmctrl(struct mt792x_dev *dev); 492void mt7921_mac_add_txs(struct mt792x_dev *dev, void *data); 493void mt7921_set_runtime_pm(struct mt792x_dev *dev); |
494void mt7921_mcu_set_suspend_iter(void *priv, u8 *mac, 495 struct ieee80211_vif *vif); 496void mt7921_set_ipv6_ns_work(struct work_struct *work); 497 | 494void mt7921_mcu_set_suspend_iter(void *priv, u8 *mac, 495 struct ieee80211_vif *vif); 496void mt7921_set_ipv6_ns_work(struct work_struct *work); 497 |
498int mt7921_mcu_set_sniffer(struct mt7921_dev *dev, struct ieee80211_vif *vif, | 498int mt7921_mcu_set_sniffer(struct mt792x_dev *dev, struct ieee80211_vif *vif, |
499 bool enable); 500int mt7921_mcu_config_sniffer(struct mt792x_vif *vif, 501 struct ieee80211_chanctx_conf *ctx); 502int mt7921_mcu_get_temperature(struct mt792x_phy *phy); 503 504int mt7921_usb_sdio_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, 505 enum mt76_txq_id qid, struct mt76_wcid *wcid, 506 struct ieee80211_sta *sta, 507 struct mt76_tx_info *tx_info); 508void mt7921_usb_sdio_tx_complete_skb(struct mt76_dev *mdev, 509 struct mt76_queue_entry *e); 510bool mt7921_usb_sdio_tx_status_data(struct mt76_dev *mdev, u8 *update); 511 512/* usb */ 513#define MT_USB_TYPE_VENDOR (USB_TYPE_VENDOR | 0x1f) 514#define MT_USB_TYPE_UHW_VENDOR (USB_TYPE_VENDOR | 0x1e) 515 | 499 bool enable); 500int mt7921_mcu_config_sniffer(struct mt792x_vif *vif, 501 struct ieee80211_chanctx_conf *ctx); 502int mt7921_mcu_get_temperature(struct mt792x_phy *phy); 503 504int mt7921_usb_sdio_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, 505 enum mt76_txq_id qid, struct mt76_wcid *wcid, 506 struct ieee80211_sta *sta, 507 struct mt76_tx_info *tx_info); 508void mt7921_usb_sdio_tx_complete_skb(struct mt76_dev *mdev, 509 struct mt76_queue_entry *e); 510bool mt7921_usb_sdio_tx_status_data(struct mt76_dev *mdev, u8 *update); 511 512/* usb */ 513#define MT_USB_TYPE_VENDOR (USB_TYPE_VENDOR | 0x1f) 514#define MT_USB_TYPE_UHW_VENDOR (USB_TYPE_VENDOR | 0x1e) 515 |
516int mt7921u_mcu_power_on(struct mt7921_dev *dev); 517int mt7921u_wfsys_reset(struct mt7921_dev *dev); 518int mt7921u_dma_init(struct mt7921_dev *dev, bool resume); 519int mt7921u_init_reset(struct mt7921_dev *dev); 520int mt7921u_mac_reset(struct mt7921_dev *dev); 521int mt7921_mcu_uni_add_beacon_offload(struct mt7921_dev *dev, | 516int mt7921u_mcu_power_on(struct mt792x_dev *dev); 517int mt7921u_wfsys_reset(struct mt792x_dev *dev); 518int mt7921u_dma_init(struct mt792x_dev *dev, bool resume); 519int mt7921u_init_reset(struct mt792x_dev *dev); 520int mt7921u_mac_reset(struct mt792x_dev *dev); 521int mt7921_mcu_uni_add_beacon_offload(struct mt792x_dev *dev, |
522 struct ieee80211_hw *hw, 523 struct ieee80211_vif *vif, 524 bool enable); 525#ifdef CONFIG_ACPI | 522 struct ieee80211_hw *hw, 523 struct ieee80211_vif *vif, 524 bool enable); 525#ifdef CONFIG_ACPI |
526int mt7921_init_acpi_sar(struct mt7921_dev *dev); | 526int mt7921_init_acpi_sar(struct mt792x_dev *dev); |
527int mt7921_init_acpi_sar_power(struct mt792x_phy *phy, bool set_default); 528u8 mt7921_acpi_get_flags(struct mt792x_phy *phy); 529#else 530static inline int | 527int mt7921_init_acpi_sar_power(struct mt792x_phy *phy, bool set_default); 528u8 mt7921_acpi_get_flags(struct mt792x_phy *phy); 529#else 530static inline int |
531mt7921_init_acpi_sar(struct mt7921_dev *dev) | 531mt7921_init_acpi_sar(struct mt792x_dev *dev) |
532{ 533 return 0; 534} 535 536static inline int 537mt7921_init_acpi_sar_power(struct mt792x_phy *phy, bool set_default) 538{ 539 return 0; 540} 541 542static inline u8 543mt7921_acpi_get_flags(struct mt792x_phy *phy) 544{ 545 return 0; 546} 547#endif 548int mt7921_set_tx_sar_pwr(struct ieee80211_hw *hw, 549 const struct cfg80211_sar_specs *sar); 550 | 532{ 533 return 0; 534} 535 536static inline int 537mt7921_init_acpi_sar_power(struct mt792x_phy *phy, bool set_default) 538{ 539 return 0; 540} 541 542static inline u8 543mt7921_acpi_get_flags(struct mt792x_phy *phy) 544{ 545 return 0; 546} 547#endif 548int mt7921_set_tx_sar_pwr(struct ieee80211_hw *hw, 549 const struct cfg80211_sar_specs *sar); 550 |
551int mt7921_mcu_set_clc(struct mt7921_dev *dev, u8 *alpha2, | 551int mt7921_mcu_set_clc(struct mt792x_dev *dev, u8 *alpha2, |
552 enum environment_cap env_cap); 553int mt7921_mcu_set_roc(struct mt792x_phy *phy, struct mt792x_vif *vif, 554 struct ieee80211_channel *chan, int duration, 555 enum mt7921_roc_req type, u8 token_id); 556int mt7921_mcu_abort_roc(struct mt792x_phy *phy, struct mt792x_vif *vif, 557 u8 token_id); 558struct ieee80211_ops *mt7921_get_mac80211_ops(struct device *dev, 559 void *drv_data, u8 *fw_features); 560#endif | 552 enum environment_cap env_cap); 553int mt7921_mcu_set_roc(struct mt792x_phy *phy, struct mt792x_vif *vif, 554 struct ieee80211_channel *chan, int duration, 555 enum mt7921_roc_req type, u8 token_id); 556int mt7921_mcu_abort_roc(struct mt792x_phy *phy, struct mt792x_vif *vif, 557 u8 token_id); 558struct ieee80211_ops *mt7921_get_mac80211_ops(struct device *dev, 559 void *drv_data, u8 *fw_features); 560#endif |