mt76: add mt76x2_common to mt76x2-common module
Subsystems (2)
RFC v3 15/19 mt76: add mt76x2_common to mt76x2-common module
Move core related code shared between mt76x2 and mt76x2u in mt76x2-common module
Signed-off-by Lorenzo Bianconi <[email protected]>
--- drivers/net/wireless/mediatek/mt76/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt76x2.h | 21 ++ .../wireless/mediatek/mt76/mt76x2_common.c | 348 ++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76x2_dma.c | 21 -- .../net/wireless/mediatek/mt76/mt76x2_main.c | 305 --------------- 5 files changed, 370 insertions(+), 327 deletions(-) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x2_common.c
drivers/net/wireless/mediatek/mt76/Makefile +1 -1
@@ -9,7 +9,7 @@ CFLAGS_trace.o := -I$(src) mt76x2-common-y := \ mt76x2_eeprom.o mt76x2_tx_common.o mt76x2_mac_common.o \ - mt76x2_init_common.o + mt76x2_init_common.o mt76x2_common.o mt76x2e-y := \ mt76x2_pci.o mt76x2_dma.o \
drivers/net/wireless/mediatek/mt76/mt76x2.h +21 -0
@@ -284,4 +284,25 @@ void mt76x2_init_txpower(struct mt76x2_dev *dev, struct ieee80211_supported_band *sband);void mt76_write_mac_initvals (struct mt76x2_dev *dev); +int mt76x2_ampdu_action (struct ieee80211_hw *hw,struct ieee80211_vif *vif, +struct ieee80211_ampdu_params *params); +int mt76x2_sta_add (struct ieee80211_hw *hw,struct ieee80211_vif *vif, +struct ieee80211_sta *sta); +int mt76x2_sta_remove (struct ieee80211_hw *hw,struct ieee80211_vif *vif, +struct ieee80211_sta *sta); +void mt76x2_remove_interface (struct ieee80211_hw *hw, +struct ieee80211_vif *vif); +int mt76x2_set_key (struct ieee80211_hw *hw,enum set_key_cmd cmd, +struct ieee80211_vif *vif,struct ieee80211_sta *sta, +struct ieee80211_key_conf *key); +int mt76x2_conf_tx (struct ieee80211_hw *hw,struct ieee80211_vif *vif, +u16 queue,const struct ieee80211_tx_queue_params *params); +void mt76x2_configure_filter (struct ieee80211_hw *hw, +unsigned int changed_flags, +unsigned int *total_flags,u64 multicast); +void mt76x2_txq_init (struct mt76x2_dev *dev,struct ieee80211_txq *txq); +void mt76x2_sta_rate_tbl_update (struct ieee80211_hw *hw, +struct ieee80211_vif *vif, +struct ieee80211_sta *sta); +#endif
drivers/net/wireless/mediatek/mt76/mt76x2_common.c new file +348 -0
348 lines not on this page · raw message
drivers/net/wireless/mediatek/mt76/mt76x2_dma.c +0 -21
@@ -66,27 +66,6 @@ mt76x2_init_tx_queue(struct mt76x2_dev *dev, struct mt76_queue *q,return 0 ; } -void mt76x2_queue_rx_skb (struct mt76_dev *mdev,enum mt76_rxq_id q, -struct sk_buff *skb) -{ - struct mt76x2_dev *dev = container_of(mdev, struct mt76x2_dev, mt76); -void *rxwi = skb->data; - -if (q ==MT_RXQ_MCU ) { -skb_queue_tail (&dev->mcu.res_q, skb); -complete (&dev->mcu.resp_cmpl); -return ; - } - -skb_pull (skb,sizeof (struct mt76x2_rxwi )); -if (mt76x2_mac_process_rx (dev, skb, rxwi)) { -dev_kfree_skb (skb); -return ; - } - -mt76_rx (&dev->mt76, q, skb); -} -static int mt76x2_init_rx_queue (struct mt76x2_dev *dev,struct mt76_queue *q,int idx,int n_desc,int bufsize)
drivers/net/wireless/mediatek/mt76/mt76x2_main.c +0 -305
341 lines not on this page · raw message
Signature · 1 line
2.17.1